Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


oracle.security.jps.service.policystore
Class PolicyStoreUtil

java.lang.Object
  extended by oracle.security.jps.service.policystore.PolicyStoreUtil


Deprecated. This class is deprecated. Please use oracle.security.jps.service.policystore.PolicyStore API instead.

@Deprecated
public final class PolicyStoreUtil
extends java.lang.Object

Constructor Summary
PolicyStoreUtil()
          Deprecated.  

 

Method Summary
static void addAppRolesToSubject(javax.security.auth.Subject subject)
          Deprecated.  
static void addPrincipalToAppRole(java.lang.String appID, java.security.Principal principal, java.lang.String appRoleName)
          Deprecated. 
static boolean checkPermission(java.lang.String appID, javax.security.auth.Subject subject, java.security.Permission perm)
          Deprecated. 
static boolean containsAppRole(java.lang.String appID, java.lang.String name)
          Deprecated. 
static boolean containsPrincipalAsMember(java.lang.String appID, java.lang.String appRoleName, java.security.Principal principal)
          Deprecated. 
static void createAppRole(java.lang.String appID, java.lang.String name, java.lang.String displayName, java.lang.String desc, java.lang.String guid)
          Deprecated. 
static java.util.List<JpsApplicationRole> getAllAppRoles(java.lang.String appID)
          Deprecated. 
static java.util.List<java.security.Principal> getAppRolesMembers(java.lang.String appID, java.lang.String name)
          Deprecated. 
static java.util.List<JpsApplicationRole> getGrantedAppRoles(java.security.Principal principal)
          Deprecated. 
static java.security.PermissionCollection getPermissions(java.lang.String appID, javax.security.auth.Subject subject)
          Deprecated. 
static void grant(java.security.Principal[] principals, java.security.CodeSource cs, java.security.Permission[] perms)
          Deprecated. 
static void grant(java.lang.String appID, java.security.Principal[] principals, java.security.CodeSource cs, java.security.Permission[] perms)
          Deprecated. 
static boolean hasPermission(javax.security.auth.Subject subject, java.security.Permission perm)
          Deprecated. 
static void refresh()
          Deprecated. 
static void removeAppRole(java.lang.String appID, java.lang.String name)
          Deprecated. 
static void removePrincipalFromAppRole(java.lang.String appID, java.security.Principal principal, java.lang.String appRoleName)
          Deprecated. 
static void revoke(java.security.Principal[] principals, java.security.CodeSource cs, java.security.Permission[] perms)
          Deprecated. 
static void revoke(java.lang.String appID, java.security.Principal[] principals, java.security.CodeSource cs, java.security.Permission[] perms)
          Deprecated. 
static java.util.List<AppRoleEntry> searchAppRoles(java.lang.String appID, java.lang.String rolenameExp)
          Deprecated. 
 java.lang.String toString()
          Deprecated. 

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

PolicyStoreUtil

public PolicyStoreUtil()
Deprecated. 

Method Detail

refresh

@Deprecated
public static void refresh()
Deprecated. 
Refreshes policy providers associated with current app

hasPermission

@Deprecated
public static boolean hasPermission(javax.security.auth.Subject subject,
                                               java.security.Permission perm)
                             throws PolicyStoreException
Deprecated. 
Checks if subject has permission "perm". Queries both system policies and current application's policy.
Parameters:
subject - - the subject
perm - - the permission to be checked for this subject
Returns:
true if Subject has permission
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

getPermissions

@Deprecated
public static java.security.PermissionCollection getPermissions(java.lang.String appID,
                                                                           javax.security.auth.Subject subject)
                                                         throws PolicyObjectNotFoundException,
                                                                PolicyStoreException
Deprecated. 
Gets permissions that a Subject (set of principal(s)) would have in a given application's context. This includes permissions granted to the Subject under the scope of the application and the permissions granted to the subject in the global/ system scope NOTE: oracle internal - mail nmuralid@oracle.com if you want to use this API
Parameters:
appID - - the application name
subject - - subject whose permissions are sought
Returns:
the permission collection
Throws:
PolicyObjectNotFoundException - - if this app policy does not exist
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

checkPermission

@Deprecated
public static boolean checkPermission(java.lang.String appID,
                                                 javax.security.auth.Subject subject,
                                                 java.security.Permission perm)
                               throws PolicyStoreException
Deprecated. 
Checks whether a Subject (set of principal(s)) has a permission in the context of an application, appID
Parameters:
appID - - Application name / scope of checkPermission
subject - - subject whose permissions need to be checked
perm - - permission to be checked
Returns:
true, if subject has permission, false otherwise
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

grant

@Deprecated
public static void grant(java.security.Principal[] principals,
                                    java.security.CodeSource cs,
                                    java.security.Permission[] perms)
                  throws PolicyObjectAlreadyExistsException,
                         PolicyStoreException
Deprecated. 
Grant a set of permissions to this group of principals and code source This grant persists as a system grant which is evaluated in the context of all applications. fixme? currently goes to default store
Parameters:
principals - - the set of principals to be granted the these permissions
cs - - the code source
perms - - set of permissions to be granted for this group of principals
Throws:
PolicyObjectAlreadyExistsException - - if the grantee is already granted the requested permissions.
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

revoke

@Deprecated
public static void revoke(java.security.Principal[] principals,
                                     java.security.CodeSource cs,
                                     java.security.Permission[] perms)
                   throws PolicyObjectNotFoundException,
                          PolicyStoreException
Deprecated. 
Revoke a system grant of permissions from this set of principals and codesource combination fixme? currently goes only to default Policy Store
Parameters:
principals - - the set of principals to revoke the permission(s) from
cs - - the code source
perms - - the set of permissions
Throws:
PolicyObjectNotFoundException - - If the grantee to be revoked is not found
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

grant

@Deprecated
public static void grant(java.lang.String appID,
                                    java.security.Principal[] principals,
                                    java.security.CodeSource cs,
                                    java.security.Permission[] perms)
                  throws PolicyObjectAlreadyExistsException,
                         PolicyStoreException
Deprecated. 
Grant this set of principals and code source permissions under the scope of an application, appID. These grants are effective only in the context of the application appID Deployment plugin assumed to have created tags for app not present. workaround, add tags to jazn-data-11.xml for this app
Parameters:
appID - - the application id
principals - - the set of principals to grant the permission(s) for
cs - - the code source
perms - - the set of permissions
Throws:
PolicyObjectAlreadyExistsException - - if the grantee is already granted the requested permissions.
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

revoke

@Deprecated
public static void revoke(java.lang.String appID,
                                     java.security.Principal[] principals,
                                     java.security.CodeSource cs,
                                     java.security.Permission[] perms)
                   throws PolicyObjectNotFoundException,
                          PolicyStoreException
Deprecated. 
Revoke permissions perms from this set of principals and codesource in application appID's policy, if corresponding grant present
Parameters:
appID - - the application id
principals - - the set of principals to revoke the permission(s) from
cs - - the code source
perms - - the set of permissions
Throws:
PolicyObjectNotFoundException - - If the grantee to be revoked is not found
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

containsAppRole

@Deprecated
public static boolean containsAppRole(java.lang.String appID,
                                                 java.lang.String name)
                               throws PolicyStoreException
Deprecated. 
Returns true if application appID's policy store contains ApplicationRole "name"
Parameters:
appID - - the application id
name - - the app role name
Returns:
true if this app role exists for this application, false otherwise
Throws:
PolicyStoreException - if appID not found or there is an error during this policy operation

createAppRole

@Deprecated
public static void createAppRole(java.lang.String appID,
                                            java.lang.String name,
                                            java.lang.String displayName,
                                            java.lang.String desc,
                                            java.lang.String guid)
                          throws PolicyObjectAlreadyExistsException,
                                 PolicyStoreException
Deprecated. 
Create an Application Role for application appID gotcha! if appID not found, doesnt create it Deployment plugin assumed to have done this. workaround, add tags to jazn-data-11.xml for this app
Parameters:
appID - - the application id
name - - name of the app role
displayName - - diplay name of the app role
desc - - description of the app role
guid - - guid of the app role
Throws:
PolicyObjectAlreadyExistsException - - if this app role already exists
PolicyStoreException - - if appID is not found or default Policy store not obtained or there is an error during this policy operation

searchAppRoles

@Deprecated
public static java.util.List<AppRoleEntry> searchAppRoles(java.lang.String appID,
                                                                     java.lang.String rolenameExp)
                                                   throws PolicyObjectNotFoundException,
                                                          PolicyStoreException
Deprecated. 
searches app roles for the given app id and expression
Parameters:
appID - - This is the AppId under which the search operation is performed
rolenameExp - - This could be a regular expression with role names containing wild card like "*" only
Returns:
List<AppRoleEntry>
Throws:
PolicyObjectNotFoundException - - if this appRoleName does not exist in policy store
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

removeAppRole

@Deprecated
public static void removeAppRole(java.lang.String appID,
                                            java.lang.String name)
                          throws PolicyObjectNotFoundException,
                                 PolicyStoreException
Deprecated. 
Remove Application Role "name" from Application appID
Parameters:
appID - - application id
name - - name of the app role to remove
Throws:
PolicyObjectNotFoundException - - if this app role does not exist
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

containsPrincipalAsMember

@Deprecated
public static boolean containsPrincipalAsMember(java.lang.String appID,
                                                           java.lang.String appRoleName,
                                                           java.security.Principal principal)
                                         throws PolicyStoreException
Deprecated. 
Check if ApplicationRole appRoleName contains principal
Parameters:
appID - - the application id
appRoleName - - the app role name
principal - - the principal
Returns:
true if this principal is a member of this app role
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

addPrincipalToAppRole

@Deprecated
public static void addPrincipalToAppRole(java.lang.String appID,
                                                    java.security.Principal principal,
                                                    java.lang.String appRoleName)
                                  throws PolicyObjectAlreadyExistsException,
                                         PolicyStoreException
Deprecated. 
Add principal to an Application Role in the context of Application appID
Parameters:
appID - - the application id
principal - - the principal to add
appRoleName - - the app role
Throws:
PolicyObjectAlreadyExistsException - - if this principal is already a member of this app role
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

removePrincipalFromAppRole

@Deprecated
public static void removePrincipalFromAppRole(java.lang.String appID,
                                                         java.security.Principal principal,
                                                         java.lang.String appRoleName)
                                       throws PolicyObjectNotFoundException,
                                              PolicyStoreException
Deprecated. 
remove principal from an Application Role in the application appID
Parameters:
appID - - the application id
principal - - the principal to be removed
appRoleName - - the app role name
Throws:
PolicyObjectNotFoundException - - if this principal does not exist in this appRoleName
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

addAppRolesToSubject

@Deprecated
public static void addAppRolesToSubject(javax.security.auth.Subject subject)
                                 throws PolicyStoreException
Deprecated. 
Add application Roles to a subject that has enterprise users and roles NOTE: this is used for runtime AuthZ, so subject is sensitive, and application name , appID will be derived. Also will be obsolete after ID store integration
Parameters:
subject - - the subject to add the app roles to
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

getAppRolesMembers

@Deprecated
public static java.util.List<java.security.Principal> getAppRolesMembers(java.lang.String appID,
                                                                                    java.lang.String name)
                                                                  throws PolicyObjectNotFoundException,
                                                                         PolicyStoreException
Deprecated. 
Returns Member principals of an Application Role This is merely a copy and changes made to this List of principals do not effect the in-memory representation or contents of the policystore.
Parameters:
appID - - the application id
name - - the app role name
Returns:
List of principals granted to this App role. Empty list if none granted this role.
Throws:
PolicyObjectNotFoundException - - if this appRoleName does not exist in policy store
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

getAllAppRoles

@Deprecated
public static java.util.List<JpsApplicationRole> getAllAppRoles(java.lang.String appID)
                                                         throws PolicyStoreException
Deprecated. 
Returns a list of all application roles in a given Application. This is merely a copy and changes made to this List do not effect the in-memory representation or contents of the policystore.
Parameters:
appID -
Returns:
the List<JpsApplicationRole> and empty list if no roles found
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

getGrantedAppRoles

@Deprecated
public static java.util.List<JpsApplicationRole> getGrantedAppRoles(java.security.Principal principal)
                                                             throws PolicyStoreException
Deprecated. 
Returns AppRoles associated with this principal in the policy store typcially useful for querying appRoles granted to an Enterprise User/Role principal Note: this derives the current application name fixme! principal name comparison - will do class after id integration
Parameters:
principal - - the principal to find the granted roles for
Returns:
the List<ApplicationRole> or empty list if no granted app role found
Throws:
PolicyStoreException - - if default Policy store not obtained or there is an error during this policy operation

toString

@Deprecated
public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.