Configuring the Service for Multiple LDAP using WLST Configuring Other Parameters

7-10 Oracle Fusion Middleware Application Security Guide libOVD-- jpsContext name=default -- use multiple ldaps oid+ad through libOVD-- serviceInstanceRef ref=idservice.virtualize -- .....other services -- jpsContext jpsContexts jpsConfig Note that: ■ the first service instance defines the provider for Oracle Internet Directory ■ the second service instance defines the provider for Microsoft Active Directory ■ the virtualize property of the service instance is set to true, enabling multi-LDAP queries ■ the extendedProperty elements enable you to set front-end parameters if desired to override default values For more information, see Front-End Parameters in Section 7.3.1, What is Configured? .

7.3.5 Java SE Environments

In the Java SE environment, you directly modify the jps-config.xml file as follows: ■ define a new identity store service instance ■ add the new service instance to the JPS context, replacing any previously defined IdentityStore instance ■ to enable the virtualize flag in the identity store service, refer to Example 7–3 . See Section 22.2.2, Configuring an LDAP Identity Store in Java SE Applications for details.

7.4 Querying the Identity Store Programmatically

To programmatically query the LDAP identity store, you use OPSS to obtain the JPS context; this acts like a bridge to obtain the store instance, and subsequently you use the User and Role API to query the store. Example 7–4 Querying the LDAP Identity Store Programmatically try { find the JPS context JpsContextFactory ctxFactory = JpsContextFactory.getContextFactory; JpsContext ctx = ctxFactory.getContext; find the JPS IdentityStore service instance assuming the backend is ldap type LdapIdentityStore idstoreService = LdapIdentityStorectx.getServiceInstanceIdentityStoreService.class get the UserRole APIs Idmstore instance oracle.security.idm.IdentityStore idmIdentityStore = idstoreService.getIdmStore; Configuring the Identity Store Service 7-11 use the UserRole API to query id store } catch Exception e { e.printStackTrace } To see how to enable the virtualize property in the identity store service, refer to Example 7–3 . For additional information about using MBeans, see Section E.2, Configuring OPSS Services with MBeans .