<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'? in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831769#M24988</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to use the&amp;nbsp;METASEC_GETNAUTH function to determine what the permissions&amp;nbsp;on specific objects (tables) are, for a user running my web application.&lt;BR /&gt;The documentation (&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n0iw8bscc5zacan1l9v1cl1abpw4.htm" target="_blank"&gt;SAS Help Center: METASEC_GETNAUTH Function&lt;/A&gt;) refers to the values of macro variables set by the %&lt;SPAN&gt;MDSECCON() and lists the meaning. First problem is that the documentation gives the prefix&amp;nbsp;_SEC_ but using MPRINT reveals it is in fact _SECAD_.&lt;BR /&gt;And programming would have been easier if the documentation would give the actual values (1, 2, 3, 4, 8 , 12, 16, 32, 48).&lt;BR /&gt;&lt;BR /&gt;But my question it this.&amp;nbsp;&lt;BR /&gt;There are nine possible values, three each for direct, indirect and ACT permissions. That's clear.&lt;BR /&gt;For each they mean 'grant', 'deny'&amp;nbsp; or 'mask'.&lt;BR /&gt;I don't really know how to interpret 'mask' ??&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 08:36:59 GMT</pubDate>
    <dc:creator>FrankPoppe</dc:creator>
    <dc:date>2022-09-05T08:36:59Z</dc:date>
    <item>
      <title>The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831769#M24988</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to use the&amp;nbsp;METASEC_GETNAUTH function to determine what the permissions&amp;nbsp;on specific objects (tables) are, for a user running my web application.&lt;BR /&gt;The documentation (&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n0iw8bscc5zacan1l9v1cl1abpw4.htm" target="_blank"&gt;SAS Help Center: METASEC_GETNAUTH Function&lt;/A&gt;) refers to the values of macro variables set by the %&lt;SPAN&gt;MDSECCON() and lists the meaning. First problem is that the documentation gives the prefix&amp;nbsp;_SEC_ but using MPRINT reveals it is in fact _SECAD_.&lt;BR /&gt;And programming would have been easier if the documentation would give the actual values (1, 2, 3, 4, 8 , 12, 16, 32, 48).&lt;BR /&gt;&lt;BR /&gt;But my question it this.&amp;nbsp;&lt;BR /&gt;There are nine possible values, three each for direct, indirect and ACT permissions. That's clear.&lt;BR /&gt;For each they mean 'grant', 'deny'&amp;nbsp; or 'mask'.&lt;BR /&gt;I don't really know how to interpret 'mask' ??&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 08:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831769#M24988</guid>
      <dc:creator>FrankPoppe</dc:creator>
      <dc:date>2022-09-05T08:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831804#M24989</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;&lt;EM&gt;Mask to extract indirect value&lt;/EM&gt;.." - I don't understand the meaning of this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would send this question to SAS tech support, to clarify the documentation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831804#M24989</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-09-05T12:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831811#M24990</link>
      <description>&lt;P&gt;Have you seen &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n0iw8bscc5zacan1l9v1cl1abpw4.htm" target="_self"&gt;this&lt;/A&gt; docu entry?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1662386465426.png" style="width: 790px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74987iCE444476A0011A68/image-dimensions/790x283?v=v2" width="790" height="283" role="button" title="Patrick_1-1662386465426.png" alt="Patrick_1-1662386465426.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 14:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831811#M24990</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-09-05T14:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831888#M24991</link>
      <description>&lt;P&gt;Yes, I have seen that page in the documentation, and that is where the problem is.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It is not correct, the name of macro variables that are created start with&amp;nbsp;&lt;SPAN&gt;_SECAD_, not _SEC_&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;It could have listed the actual numeric values (1,2,3,4,8,12,16,32,48)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;It does not explain what 'mask' means&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831888#M24991</guid>
      <dc:creator>FrankPoppe</dc:creator>
      <dc:date>2022-09-06T09:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831943#M24993</link>
      <description>Have you considered using the MDSECDS macro instead? It uses METASEC_GETNAUTH for you (the code that does this is located in &amp;lt;SASHome&amp;gt;/SASFoundation/9.4/sasautos/mdsecgp.sas)&lt;BR /&gt;&lt;BR /&gt;The way that code uses mask is (this is for explicit, but it does it for the others as well):&lt;BR /&gt;&lt;BR /&gt;         else if (band(authint, &amp;amp;_SECAD_PERM_EXPM) ) then do;&lt;BR /&gt;            if (band(authint,&amp;amp;_SECAD_PERM_EXPD )) then&lt;BR /&gt;               authorization = "Denied Explicitly";&lt;BR /&gt;            else&lt;BR /&gt;               authorization = "Granted Explicitly";&lt;BR /&gt;            end;&lt;BR /&gt;&lt;BR /&gt;%MDSECDS Security Report Macro&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/bicdc/9.4/bisecag/n0l1mpdt430djgn1bl1c3euei85w.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/bicdc/9.4/bisecag/n0l1mpdt430djgn1bl1c3euei85w.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I'll pass the documentation folks your feedback.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Sep 2022 13:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/831943#M24993</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-09-06T13:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836672#M25207</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;&amp;nbsp;Greg,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Sorry not to react earlier, in some way I missed your contribution.&lt;/P&gt;
&lt;P&gt;Yes - I did look to the MDSECDS macro. And I do use it sometimes. But in this case I only want to know what the permissions are for a specific user for a specific table object, and then that MDSECDS is rather an overload.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just checking the different authorizations is simpler here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't really understand (yet) what the function of the mask value is, but the piece of code you give shows how to handle it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Frank&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 09:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836672#M25207</guid>
      <dc:creator>FrankPoppe</dc:creator>
      <dc:date>2022-10-04T09:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836695#M25209</link>
      <description>The mask gives us a way to be more efficient in code. The result of the function will only ever be the permission and never the mask, but instead of evaluating the response like if response = 1 then, else if response = 2 then, etc etc, we can more broadly evaluate the response as: step 1, is it a act, explicit or inherited permission, then is it a grant (if not its a deny). If you're only doing this for a single user/object the efficiency here is negligible, but if you're evaluating lots of objects / users it makes the code complete faster. There are also masks for grant and deny if you don't care about the source of the permission and only its effect.</description>
      <pubDate>Tue, 04 Oct 2022 13:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836695#M25209</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-10-04T13:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836744#M25215</link>
      <description>&lt;P&gt;I think I now understand how to interpret this.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I originally understood the table as a listing of all the values that can be returned by the function. But that is not the case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The returned value is composed of three bits: a deny or grant for explicit (1 or 2), a deny or grant for ACT (4 or 8 ) and for indirect (16 or 32).&lt;/P&gt;
&lt;P&gt;The mask values (3, 12, 48) are just a helper to mask or select two bits if you are checking each of the three possible denies or grants.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 16:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/836744#M25215</guid>
      <dc:creator>FrankPoppe</dc:creator>
      <dc:date>2022-10-04T16:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: The METASEC_GETNAUTH function return 'deny', 'grant'  or 'mask'. How to interpret 'mask'?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/838419#M25255</link>
      <description>&lt;P&gt;Hello Frank,&lt;/P&gt;
&lt;P&gt;Thank you for your comments. I've updated the documentation for the METASEC_GETNAUTH= Function to show the correct prefix in the macro variable names. I've also added the integer associated with each macro variable to the table, and added a discussion of masks. The updated documentation will be available in the SAS 9.4M8 documentation update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Until then, here is an explanation of masks:&lt;/P&gt;
&lt;DIV data-font-name="g_d0_f1" data-angle="0" data-canvas-width="527.2305555555557"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f1" data-angle="0" data-canvas-width="527.2305555555557"&gt;A mask is a filter that returns an indirect result. A bitwise AND between the mask and a value within that mask produces the input value; otherwise, it produces a zero.&amp;nbsp;&lt;SPAN&gt;Three masks&amp;nbsp; -- an explicit mask (3), ACT mask (12), and an indirect mask (48) --&amp;nbsp; are provided to test whether a METASEC_GETNAUTH output&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;value applies to a given authorization category.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f5" data-angle="0" data-canvas-width="77.86137626262624"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f1" data-angle="0" data-canvas-width="56.64446969696969"&gt;
&lt;DIV data-font-name="g_d0_f1" data-angle="0" data-canvas-width="501.0083333333334"&gt;The masks can be used with the BAND function. Here is example code that&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f1" data-angle="0" data-canvas-width="255.87525252525256"&gt;illustrates how the masks can be used:&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="239.14666666666656"&gt;rc=metasec_getnauth("",objuri,n,&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="358.71999999999974"&gt;identitytypes,identitynames,&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="381.1399999999997"&gt;auth,tmppermissions,condition,&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="485.76666666666614"&gt;&amp;amp;_SECAD_RETURN_ROLE_TYPE, identitydispname);&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="22.42"&gt;...&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="201.78000000000003"&gt;authint = input(auth, 16.);&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="22.42"&gt;...&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="351.2466666666664"&gt;if (band(authint, &amp;amp;_SECAD_PERM_EXPM) ) then do;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="396.0866666666663"&gt;if (band(authint,&amp;amp;_SECAD_PERM_EXPD)) then&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="381.1399999999997"&gt;authorization = "Denied Explicitly";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;else&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="388.61333333333295"&gt;authorization = "Granted Explicitly";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;end;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="455.8733333333329"&gt;else if (band(authint, &amp;amp;_SECAD_PERM_ACTM) ) then do;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="396.0866666666663"&gt;if (band(authint,&amp;amp;_SECAD_PERM_ACTD)) then&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="351.2466666666664"&gt;authorization = "Denied by ACT";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;else&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="358.71999999999974"&gt;authorization = "Granted by ACT";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;end;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="448.3999999999995"&gt;else if (band(authint,&amp;amp;_SECAD_PERM_NDRM) ) then do;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="388.61333333333295"&gt;if (band(authint,&amp;amp;SECAD_PERM_NDRD)) then&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="381.1399999999997"&gt;authorization = "Denied Indirectly";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;else&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="388.61333333333295"&gt;authorization = "Granted Indirectly";&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="119.57333333333337"&gt;end;&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="22.42"&gt;...&lt;/DIV&gt;
&lt;DIV data-font-name="g_d0_f8" data-angle="0" data-canvas-width="22.42"&gt;The documentation was updated with the help of Greg Wootton.&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/The-METASEC-GETNAUTH-function-return-deny-grant-or-mask-How-to/m-p/838419#M25255</guid>
      <dc:creator>SylviaPowell</dc:creator>
      <dc:date>2022-10-13T15:14:59Z</dc:date>
    </item>
  </channel>
</rss>

