1 Reply Latest reply on Oct 17, 2013 6:50 PM by BhaskerOFM

    How to access an External LDAP on a weblogic server using OPSS APIs.




      Can anyone let me know how I can access an External LDAP configured on a weblogic server using OPSS APIs( or alternative APIs).


      I'm currently using the below snippet and I'm getting only the Users and groups from the DefaultAutheticator on the weblogic server and not the external LDAP Server.


      I've verified the providers, users and groups on the weblogic server console and can see that external LDAP server content is being picked, but my below code does not query them.


      import oracle.security.idm.IMException;

      import oracle.security.idm.IdentityStore;

      import oracle.security.idm.Role;

      import oracle.security.jps.JpsContext;

      import oracle.security.jps.JpsContextFactory;

      import oracle.security.jps.JpsException;

      import oracle.security.jps.service.idstore.IdentityStoreService;


      List<Role> rowData = null;

      JpsContextFactory ctxf = JpsContextFactory.getContextFactory();

      JpsContext ctx = ctxf.getContext();

      IdentityStoreService storeService = ctx.getServiceInstance(IdentityStoreService.class);

      IdentityStore idStore = storeService.getIdmStore();

      rowData = this.getRoles(idStore, "*");


      Any help or pointers are highly appreciated.