This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
APPLIES TO:
Oracle Access Manager - Version 11.1.1.3.0 and later
Information in this document applies to any platform.
GOAL
How to export and import OAM11g policies.
SOLUTION
wlst exportPolicy and importPolicy can be used to export and import OAM policies.
[oracle@vm83 bin]$ cd /home/oracle/Oracle/Middleware/Oracle_IDM1/common/bin
[oracle@vm83 bin]$ ./wlst.sh
CLASSPATH=/home/oracle/Oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/Oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/jdk6_23/lib/tools.jar:/home/oracle/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/oracle/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/oracle/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/home/oracle/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/oracle/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/oracle/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/home/oracle/Oracle/Middleware/Oracle_IDM1/oam/server/lib/wlst/configupgrade.jar:/home/oracle/Oracle/Middleware/Oracle_IDM1/oam/server/lib/wlst/oam-wlst.jar:/home/oracle/Oracle/Middleware/Oracle_IDM1/oam/server/lib/wlst/sts-wlst.jar:/home/oracle/Oracle/Middleware/utils/config/10.3/config-launch.jar:/home/oracle/Oracle/Middleware/Oracle_IDM1/common/wlst/resources/oes-common.jar:/home/oracle/Oracle/Middleware/Oracle_IDM1/common/wlst/resources/oic-wlst.jar:/home/oracle/Oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf-wlstman.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/lib/adfscripting.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/lib/mdswlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/auditwlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/igfwlsthelp.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/jps-wlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/jrf-wlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/oamap_help.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/ossoiap_help.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/ossoiap.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/sslconfigwlst.jar:/home/oracle/Oracle/Middleware/oracle_common/common/wlst/resources/wsm-wlst.jar:/home/oracle/Oracle/Middleware/utils/config/10.3/config-launch.jar::/home/oracle/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/home/oracle/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/home/oracle/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbytools.jar::
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> connect()
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'oam_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
wls:/oam_domain/serverConfig> domainRuntime()
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)
Export policy
wls:/oam_domain/serverConfig> exportPolicy(pathTempOAMPolicyFile="/home/oracle/oam-policies.xml")
Successfully exported policies. Check log file for details.
Import policy
wls:/oam_domain/serverConfig> importPolicy(pathTempOAMPolicyFile="/home/oracle/oam-policies.xml")
Successfully imported policies. Check log file for details.
Reference:
F Introduction to Custom WLST Commands for Administrators
http://docs.oracle.com/cd/E25178_01/doc.1111/e15478/wlst.htm#BHADHECI