Importing of Policy to a xml file
Steps to import policies into OES are as follows:
Note: My OES server is installed on linux enviroment.
I. On the OES server installed box create a folder migration. Eg: /OES/migration
II. Create a file jps-config.xml Eg: /OES/migration/jps-config.xml
III. Copy the content below to the jps-config.xml file create above and edit the DB connection parameters.
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<jpsConfig xmlns=”http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd”>
<property value=”off” name=”oracle.security.jps.jaas.mode”/>
<serviceProviders>
<serviceProvider class=”oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider” name=”policystore.xml.provider” type=”POLICY_STORE”>
<description>XML-based PolicyStore Provider</description>
</serviceProvider>
<serviceProvider class=”oracle.security.jps.internal.policystore.ldap.LdapPolicyStoreProvider” name=”policystore.provider” type=”POLICY_STORE”/>
</serviceProviders>
<serviceInstances>
<!– Source XML-based policy store instance –>
<serviceInstance name=”src.xml” provider=”policystore.xml.provider” location=”/OES/migration/system-jazn-data.xml”>
<description>File Based Policy Store Service Instance</description>
</serviceInstance>
<!– Destination DB-based policy store instance –>
<serviceInstance provider=”policystore.provider” name=”policystore.db.destination”>
<description>DB Based Policy Store Service Instance</description>
<property name=”policystore.type” value=”DB_ORACLE”/>
<property name=”jdbc.url” value=”jdbc:oracle:thin:@ DATABASE_HOSTNAME:1521:SID”/>
<property name=”jdbc.driver” value=”oracle.jdbc.driver.OracleDriver”/>
<property name=”security.principal” value=”XXX_APM”/>
<property name=”security.credential” value=”Password”/>
<property name=”oracle.security.jps.ldap.root.name” value=”cn=jpsroot”/>
<property name=”oracle.security.jps.farm.name” value=”cn=oes_domain”/>
</serviceInstance>
</serviceInstances>
<jpsContexts default=”default”>
<jpsContext name=”default”>
<serviceInstanceRef ref=”src.xml”/>
</jpsContext>
<jpsContext name=”sourceContext”>
<serviceInstanceRef ref=”src.xml”/>
</jpsContext>
<jpsContext name=”destinationContext”>
<serviceInstanceRef ref=”policystore.db.destination”/>
</jpsContext>
</jpsContexts>
</jpsConfig>
IV. Copy the system-jazn-data.xml that has the policy to be imported to following location /OES/migration
V. On the OES server installed box navigate to the following location $ORACLE_HOME/Oracle_IDM1/common/bin/
VI. Run the follwing command ./wlst.sh
VII. Connect the the weblogic domain where OES server is deployed. Eg: connect(‘weblogic’,’password’,’t3://localhost:7001′)
VIII. Execute the following command
Eg: migrateSecurityStore(type=”policyStore”,src=”sourceContext”,dst=”destinationContext”,configFile=”OES/migration/jps-config.xml”)
Eg: migrateSecurityStore(type=”appPolicies”, src=”sourceContext”,dst=”destinationContext”,configFile=”/OES/migration/jps-config.xml”,srcApp=”Application Name”, dstApp=”Application Name”,overWrite=”true”)
IX. Login to OES apm console and verify if the policies are imported.