Security Administration (ISecurityAdmin Interface) |
Returns the authorizations that apply to a resource for specified identities and permissions.
Category: General authorization administration methods
Syntax |
GetAuthorizationsOnObj(tCtxt,resource,flags,identities,permissions,authorizations);
Parameters |
Details |
The GetAuthorizationsOnObj method returns authorizations for the resource specified by the TCTXT or RESOURCE parameter.
Grant or denial of a permission for an identity is indicated by an integer in column 2 of the array that is returned in the AUTHORIZATIONS parameter. Nine integer values are supported, which correspond with a symbol that indicates the origin of the authorization and whether the permission is granted. The integer values are described in the following table.
Integer | Symbol | Permission Type | Description |
---|---|---|---|
1 | SECAD_PERM_EXPD | Explicit Deny | Deny was specified directly on the object. |
2 | SECAD_PERM_EXPG | Explicit Grant | Grant was specified directly on the object. |
0x03 | SECAD_PERM_EXPM | Explicit Mask | Mask to extract explicit value. |
4 | SECAD_PERM_ACTD | ACT Deny | Deny from an ACT other than the default ACT. |
8 | SECAD_PERM_ACTG | ACT Grant | Grant from an ACT other than the default ACT. |
0x0C | SECAD_PERM_ACTM | ACT Mask | Mask to extract ACT value. |
16 | SECAD_PERM_NDRD | Indirect Deny | Deny from IdentityGroup inheritance or from the default ACT. |
32 | SECAD_PERM_NDRG | Indirect Grant | Grant from IdentityGroup inheritance or from the default ACT. |
0X30 | SECAD_PERM_NDRM | Indirect Mask | Mask to extract indirect value. |
Exceptions Thrown |
The SAS Open Metadata Interface explicitly returns the following exceptions for the GetAuthorizationsOnObj method:
SECAD_INVALID_TC_HANDLE
SECAD_INVALID_RESOURCE_SPEC
SECAD_INVALID_ACTION
SECAD_INVALID_IDENTITY_SPEC
SECAD_IDENTITY_DOES_NOT_EXIST
SECAD_INVALID_PERMISSION_SPEC
SECAD_NOT_AUTHORIZED
Examples |
The following code fragment shows how the GetAuthorizationsOnObj method is issued in a Java environment:
public void getAccessControlTemplateList(String transCtxt, String repositorySpec, int options, VariableArray2dOfStringHolder ACTlist ) throws Exception { try { iSecurityAdmin.GetAccessControlTemplateList( transCtxt, repositorySpec, options, ACTlist ); } catch (Exception e) { System.out.println("GetAccessControlTemplateList: Exceptions"); e.printStackTrace(); throw e; } }
The example issues the GetAuthorizationsOnObj method to get the inherited authorizations on a table that is identified by Table_URN.
public void testAuthsOnTable() throws Exception { try { // Get existing authorizations on the table. iSecurityAdmin.GetAuthorizationsOnObj( "", Table_URN, 0, Identities, Permissions, authRslt ); } catch (Exception e) { throw e; } }
Related Methods |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.