Monday, March 11, 2013

Connecting to Embedded weblogic LDAP from JXplorer

Before connecting to embedded LDAP we need to change Embedded LDAP admin password.

Embedded LDAP password change:

1) Go to Domain

2) Click on Security

3) Click on Embedded LDAP

4) Change Credential and Confirm Credential and click Save.


Connecting to Embedded LDAP using JXplorer:

1) Open JXplorer

2) Click on Connect

3) Provide following values:

Host: localhost
Protocol: LDAP v3
BaseDN: dc=Domain Name
Level: User + Password
User DN: cn=Admin
Password: Password provided in Embedded LDAP in weblogic console


Same values may not work with another LDAP browser or client. 

Thanks !!

Friday, March 8, 2013

OIM 11g R2: Creating Custom Schedule Task

Steps:

  1. Prepare Schedule Task Code and xml files. Follow below link for sample schedule task code. http://www.iamidm.com/2013/03/oim-11g-r2-sample-code-for-custom.html
  2. Do Plugin Registration: http://www.iamidm.com/2013/03/oim-11g-r2-plugin-registration.html
  3. Export MDS data and place Scheduler xml file in db folder and import MDS data http://www.iamidm.com/2013/03/oim-11g-r2-exporting-and-importing-mds.html
  4. Create new schedule task in OIM Console by following below steps:
  • Login to OIM Admin Console

  • Use OIM Admin User and Login


  •  Go to Scheduler

  • Click on Create new as shown below


  •  Provide required details and select Task (which will be available with name provided inside scheduler xml file)


  • Run the created schedule task, according to code it will print "Running the OIM Sample Scheduled Task...", which says custom scheduler got created successfully. 


  •  It will be shown up in Scheduled Tasks. 


Thanks !!!

OIM 11g R2: Exporting and Importing MDS Data

MDS Data Purpose: Some configurations for Oracle Identity Manager (OIM) are now stored in an MDS repository rather than on a file system on the OIM Server. Troubleshooting configuration issue can sometimes require exporting MDS data.

Follow below step to Export and Import MDS Data

  • Weblogic Server should be running while doing following operation

1) Create directory where you want to export your MDS Data.


2) Go to IDM_HOME/common/bin folder and run wlst.cmd (in windows) or wlst.sh (in unix)


3) Run "connect()" command


4) Enter following details

Please enter your username: weblogic (Enter weblogic username)
Please enter your password:  ****** (Enter weblogic Password)
Please enter your server URL: t3://localhost:7001 (Enter weblogic server URL)


5) Run the following command to export data.

exportMetadata(application='OIMMetadata', server='oim_server1', toLocation='provide full location')


6) Data will be exported to given directory as shown below.


Below are steps for importing MDS Data.

1) Add or Modify files (below I have added one file, I used it for creating custom schedule task)


2) Run below command to import.


3) Out put looks like this


4) use "disconnect()" to disconnect.


Thursday, March 7, 2013

OIM 11g R2 Plugin Registration

For sample plugin code refer below link: 

  • Before registering class files need to be generated for plugin code. 
  • XML files required for plugin registration need to be ready 

Follow below steps for Registering plugin: 

1) Go to Project Properties (Jdeveloper) 



2)  Go to Deployment and click on new and provide Jar file name. 


3) In side jar go to filters and select class files which need to be deployed. 






4) Click ok after creation of jar file. 


5) Right click on project and click on Deploy and select jar file which was created.

 

 6)Click Next


7) Check the Output file path where jar file will get created, click finish after that.



8) Create new folder and name it as "Lib" and place jar file exported into Lib folder


 9) Place plugin.xml folder outside lib folder, Select only Lib and plugin.xml and create zip file with both the files.


 10) Plugin Utility file is located in below path.


11) Modify ant.properties as shown below


12) Run ant -f pluginregistration.xml register (in command prompt after browsing upto plugin_utility) 


13) Enter following details: 
  1. OIM User Name
  2. OIM User Password
  3. URL(t3://localhost:14000) 
  4. weblogic.jndi.WLInitialContextFactory (if it is weblogic server) 
  5. Location of zip file. 



14) You need to get following output saying plugin got registered as shown below and BUILD SUCCESSFUL


Thanks !!! 

OIM 11g R2: Sample Code for Custom Schedule Task along with xml

Below is the sample code for Scheduler which prints "Running the OIM Sample Scheduled Task..." in OIM Domain log file when ever it get executed. Print statement inside execute method need be replaced with business logic for performing other tasks.

SampleScheduledTask.java



plugin.xml (This needs to be zipped along with Lib(which contains schedule task jar file))



OIMSampleScheduledTask.xml (Need to be placed in MDS export db folder)



WLST Cmd error, The input line is too long.


Error while running wlst.cmd command :

"C:\Oracle\Middleware\jdeveloper\common\bin\wlst.cmd"

Process started

Error: 
The input line is too long.
wlst > C:\Oracle\MIDDLE~1\JDEVEL~1\common\bin\setJrfWlstEnv.cmd was unexpected at this time.

Solution: 

Make sure that all paths are correct, in the above error this error will be resolved by providing correct path of setJrfWlstEnv.cmd file. 

This Error occurs due to invalid path or invalid file location. 

Tuesday, March 5, 2013

OIM 11g R2: Java Method to get Admin Roles of Users


Initiate AdminRoleService and use getAdminRolesForUser by passing userKey to get all Admin Roles of user.



Method which returns all Admin roles of user by passing userKey. 




OIM 11G R2 Java: Method to Get all Roles of user


Initiate RoleManager and use getUserMemberships by passing userKey to get all Roles of user.



Method which returns user roles by passing userKey.



Other Posts