Hi,
I am trying to use the METASEC_GETNAUTH function to determine what the permissions on specific objects (tables) are, for a user running my web application.
The documentation (SAS Help Center: METASEC_GETNAUTH Function) refers to the values of macro variables set by the %MDSECCON() and lists the meaning. First problem is that the documentation gives the prefix _SEC_ but using MPRINT reveals it is in fact _SECAD_.
And programming would have been easier if the documentation would give the actual values (1, 2, 3, 4, 8 , 12, 16, 32, 48).
But my question it this.
There are nine possible values, three each for direct, indirect and ACT permissions. That's clear.
For each they mean 'grant', 'deny' or 'mask'.
I don't really know how to interpret 'mask' ??
"Mask to extract indirect value.." - I don't understand the meaning of this.
I would send this question to SAS tech support, to clarify the documentation.
Yes, I have seen that page in the documentation, and that is where the problem is.
Hi @gwootton Greg,
Sorry not to react earlier, in some way I missed your contribution.
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.
Just checking the different authorizations is simpler here.
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.
Regards,
Frank
I think I now understand how to interpret this.
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.
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).
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.
Hello Frank,
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.
Until then, here is an explanation of masks:
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.