The Oracle ADF Development Life Cycle

The OPSS Policy Model 20-5 ■ Allows grouping of secured artifacts in building blocks entitlements or permission sets which can be later used in authorization policies.

20.3.2 Managing Policies

Resource catalog artifacts can be managed with the policy management API. Specifically, the following interfaces, all subinterfaces of the interface oracle.security.jps.service.policystore.EntityManager, are directly relevant to the artifacts in the resource catalog: ■ GrantManager - This interface includes methods to query grants using search criteria, to obtain list of grants that satisfy various combinations of resource catalog artifacts, and to grant or revoke permissions to principals. ■ PermissionSetManager - This interface includes methods to create, modify, and query permission sets entitlements. ■ ResourceManager - This interface includes methods to create, delete, and modify resource instances. ■ ResourceTypeManager - This interface includes methods to create, delete, modify, and query resource types. For details about these interfaces, see the Javadoc document Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services. The following code snippet illustrates the creation of a resource type, a resource instance, actions, and a permission set: import oracle.security.jps.service.policystore.entitymanager.; import oracle.security.jps.service.policystore.search.; import oracle.security.jps.service.policystore.info.resource.; import oracle.security.jps.service.policystore.info.; import oracle.security.jps.service.policystore.; import java.util.; public class example { public static void mainString[] args throws Exception { ApplicationPolicy ap; ResourceTypeManager rtm = ap.getEntityManagerResourceTypeManager.class; ResourceTypeSearchQuery query = new ResourceTypeSearchQuery; query.setANDMatch; query.addQueryResourceTypeSearchQuery.SEARCH_PROPERTY.NAME, false, ComparatorType.EQUALITY, resourceType, BaseSearchQuery.MATCHER.EXACT; ListResourceTypeEntry allResourceTypes = rtm.getResourceTypesquery; ResourceManager rm = ap.getEntityManagerResourceManager.class; ResourceSearchQuery ResourceQuery = new ResourceSearchQuery; ResourceQuery.setANDMatch; ResourceQuery.addQueryResourceSearchQuery.SEARCH_PROPERTY.NAME, false, ComparatorType.EQUALITY, R2, BaseSearchQuery.MATCHER.EXACT; ListResourceEntry allResources = rm.getResourcesRT2, ResourceQuery; PermissionSetManager psm = ap.getEntityManagerPermissionSetManager.class; PermissionSetSearchQuery pssq = new PermissionSetSearchQuery; pssq.setANDMatch; pssq.addQueryPermissionSetSearchQuery.SEARCH_PROPERTY.NAME, false, ComparatorType.EQUALITY, PS1, BaseSearchQuery.MATCHER.EXACT; ListPermissionSetEntry allPermSets = psm.getPermissionSetspssq;