Home / OIM / Oracle Identity Manager (OIM) (PS3 only) API Initialization in external application deployed as ear on Oracle Identity Manager (OIM) managed servers.

Oracle Identity Manager (OIM) (PS3 only) API Initialization in external application deployed as ear on Oracle Identity Manager (OIM) managed servers.

When you have requirement to build some application which is deployed in Oracle Identity Manager (OIM) managed server and have to perform operation in Oracle Identity Manager (OIM) using Oracle Identity Manager (OIM) API, you need Oracle Identity Manager (OIM)client object to initialize api.

There are different ways to initialize the Oracle Identity Manager (OIM)client like using signature base login, using Oracle Identity Manager (OIM) admin user’s credentials. But you cant keep the user credentials in plain text in properties file. Using credential maps in em you can access admin user’s credentials but again you have to be aware that whenever you are changing that user’s password, you have to update the map.

To avoid all these steps Oracle Identity Manager (OIM) PS3 version provides one more way to initialize Oracle Identity Manager (OIM)client. Below are the steps/configuration you have to do in your custom application to get the Oracle Identity Manager (OIM)client object initialized.

1. Write a method in custom application class where you can initialize Oracle Identity Manager (OIM)client as shown below:

    public void login() {
        Oracle Identity Manager (OIM)InternalClient _Oracle Identity Manager (OIM)Client;

        try {
            System.out.println(“Trying to initialize Oracle Identity Manager (OIM)client”);
            _Oracle Identity Manager (OIM)Client = new Oracle Identity Manager (OIM)InternalClient(new Hashtable());
            _Oracle Identity Manager (OIM)Client.loginAsAdmin();
            System.out.println(“Oracle Identity Manager (OIM) Client login successful”);

        } catch (Exception e) {
            e.printStackTrace();
          
        }

    }

Note: Here I have used Oracle Identity Manager (OIM)InternalClient, you can type case this object to Oracle Identity Manager (OIM)client once its initialize.

2. Create jazn-data.xml file and add below details to it.


ttp://xmlns.oracle.com/ias/dtds/jazn-data.dtd”>http://xmlns.oracle.com/ias/dtds/jazn-data.dtd”>


 
 
  
     file:${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/CustomEAR/- — Specify the location where your application is deployed.
  

 

           oracle.security.jps.JpsPermission
     IdentityAssertion
   
  


3. Create jazn-data.xml file and add below details to it.


http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd” xmlns=”http://www.bea.com/ns/weblogic/weblogic-application“>
   
        jps.credstore.migration        MERGE   

   
        jps.policystore.migration        MERGE   

            oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener   

4. Copy both jazn-data.xml and weblogic-application.xml to META-INF folder of ear.
5. Build the ear and deploy on Oracle Identity Manager (OIM) Managed server. When your will call the login method, it will initialize Oracle Identity Manager (OIM)client for you.

 

Check Also

Logging into & setting up iManager

Logging into iManager is a little deceptive if trying to do it for the first …

Taking Control of Your Oracle Identity Manager Scheduler

According to Oracle’s sizing guide for Oracle Identity Manager (OIM) 10g in a large deployment …