Monday, February 01, 2010

Configuring BPEL Security Provider as OID

Following are the steps to configure BPEL Security Providers as OID.
By default the security provider for the BPEL will be Jazn. So if we need to modify the security provider to OID, following steps can be followed. This steps was tested and applied on the Oracle SOA Advanced Installation and not for the Enterprise Deployment Topology.

STEP1: Open a command prompt and Move to the following path
$ORACLE_HOME\bpel\system\services\install\ant-tasks

STEP2: Set the following homes
SET ORACLE_HOME=D:\Oracle\OracleAS\OracleSOANEw ( This is a sample path)
SET JAVA_HOME=$ORACLE_HOME\jdk
SET ANT_HOME= $ORACLE_HOME\ant

STEP3: If a custom realm is used and if the same realmName is used in searchbase this should be removed.
Ex: Suppose we have a Realm with dn dc=amaf, dc=ae and also we have another OU Ou=amaf, dc=amaf, dc=ae And if both are present in the user searchbase, then it is better to remove the other from the searchbase, else the below step configure_oid will fail.
Means : Remove OU=amaf,dc=amaf,dc=ae from OID searchbase
This can be done by editing orclcommonuserbase field of cn=Common,cn=Products,cn=OracleContext,dc=amaf,dc=ae

STEP4: From Enterprise Manager, modify the security provider for the oc4j_soa instance
OC4J: oc4j_soa \ Administration \ Security \ Identity Management \
Add the Internet Directory Host and Port
STEP5: Restart oc4j_soa Instanace

STEP6:Execute the configure_oid from the below path,
$ORACLE_HOME\bpel\system\services\install\ant-tasks

Syntax: "./configure_oid.bat

Ex: configure_oid orcladmin oracle123 389 false amaf seedAllUsers oc4jadmin oracle123 oc4j_soa

Above script will load BPEL users and demo users to OID and also update below xml files :

After executing the above script please note the following points
1) Some Users may fail to load to oid because of the password policy.So this can be done by modifying the password in the ldif file to matching password policy and load the users using the below command
ldapmodify -h test-app-01 -p 389 -D cn=orcladmin -w oracle123 -f $ORACLE_HOME\bpel\system\services\config\ldap\user.ldif

2) The above script also suppose to modify the Jazn.xml on oc4j_soa instance. But this script modifies the jazn.xml of the home instance. So as a workaround, we need to copy the content of jazn.xml of the Home instance and paste the same in jazn.xml of the oc4j_soa
3) Makesure in the jazn.xml contain Oracle Internet Directory Hostname and port.

jazn.xml will be in the following folder:
$ORACLE_HOME\j2ee\oc4j_soa\config

Above script also modifies the below xml files.
[java] Adding jaas-mode attribute to hw_services orion-application.xml
[java] Adding jaas-mode attribute to orabpel orion-application.xml

STEP7: Restart oc4j_soa Instanace
STEP8: Try to login to bpel console using an user in the OID