Showing posts with label WLST. Show all posts
Showing posts with label WLST. Show all posts

Thursday, 24 August 2017

Rollback back OIM 11gR2 PS3 sandbox using WLST command

If you need to revert back the wrongly imported sandbox in OIM 11gR2, then follow the below steps.

1. run [OIM_HOME]/common/bin/wlst.sh
2. Run below WLST commands

wls:/offline> connect('weblogic','password','t3://weblogic.host:7001')
wls:/OIMDomain/serverConfig>listMetadataLabels(application='oracle.iam.console.identity.self-service.ear', server='[OIM_MANAGED_SERVER_NAME]')

4. You will get a list of all the published sandboxes label like below

Creation_Imported_08:57:24
PostMerge_IdM_TestApp_form_55_08:52:15
Creation_Imported_08:50:49
Creation_IdM_aaa_02:25:07 
........................
........................
............. so on

5. Identify the sandbox where you want OIM to point.
6. Copy the Label name.
7. Run below WLST command to promote the selected sandbox

wls:/OIMDomain/serverConfig> promoteMetadataLabel (application='oracle.iam.console.identity.self-service.ear',server='OIM_MANAGED_SERVER_NAME', name='Creation_IdM_aaa_02:25:07')

8. Restart the OIM managed servers.

Thursday, 18 May 2017

Changing SOA Admin user for OIM

SOA Admin user is an user which is required for OIM to communicate with SOA. By default OIM use weblogic as SOA Admin user, but you can change this user as per your requirement. Changes need to be done in several location. Below is a python script cn be used to change SOA Admin user.


Run this python script for $OIM_HOME/common/bin/wlst.sh


wlst> ./tmp/changeSOAAdmin.py $WL_USER $WL_PASSWORD $OIM1_URL $ADMIN_URL_T3 $WEBLOGIC_DOMAIN_NAME


------------------------------------changeSOAAdmin.py--------------------------------------
#!/usr/bin/python
import sys
wl_user=sys.argv[1]
wl_password=sys.argv[2]
oim1_url=sys.argv[3]
admin_url=sys.argv[4]
domain_name=sys.argv[5]


connect(wl_user,wl_password, oim1_url)
custom()
cd('/oracle.iam/oracle.iam:name=SOAConfig,type=XMLConfig.SOAConfig,XMLConfig=Config,Application=oim,ApplicationVersion=11.1.2.0.0')
set('Username', wl_user)
shutdown(force='true')
disconnect()

connect(wl_user,wl_password,admin_url)
deleteCred(map="oim", key="SOAAdminPassword");
createCred(map="oim", key="SOAAdminPassword", user=wl_user,password=wl_password);

edit()
startEdit()

cd('/ForeignJNDIProviders/ForeignJNDIProvider-SOA')
set('User',wl_user)
set('Password',wl_password)

save()
activate()
exit()

-------------------------------------------------------------------------------------------------------------------
The above script is doing 3 changes


1. Changing the SOA Admin Username in XMLConfig.SOAConfig
2. Recreating the SOAAdminPassword CSF
3. Updating the new user details in ForeignJNDIProvider-SOA

WLST to grant Jps Permission to OIM domain directories

You can grant Jps Permission to directories using following WLST command.


Syntax


grantPermission(codeBaseURL=[]DIRECTORY_URL', permClass=[PERMISSION_CLASS]', permTarget='[PERMISSION_TARGET]')


Example


[OIM_HOME]/common/bin/wlst.sh
connect(wl_user,wl_password, admin_url)


grantPermission(codeBaseURL='file:${XL.HomeDir}/apps/-', permClass='oracle.security.jps.JpsPermission', permTarget='IdentityAssertion')


grantPermission(codeBaseURL='file:${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/-', permClass='oracle.security.jps.JpsPermission', permTarget='IdentityAssertion')

WLST command to deploy SOA composites for OIM

You can deploy SOA composites for OIM using WLST command, without login into EM console


Syntax


sca_deployComposite(serverURL, sarLocation, [overwrite], [user], [password],
[forceDefault], [configplan], [partition])



Example


$SOA_HOME/common/bin/wlst.sh
sca_deployComposite('http://localhost:8001','/workflows/sca_ManagerApproval_rev1.2.jar',true,'weblogic','abcd1234',true,'/workflows/ManagerApproval_cfgplan.xml');

Followers

OIM API for adding process task and retry failed task

 In this blog you can find how to add new process task and retry any failed/rejected tasks using API. Adding new process task: /************...