WLST - migrateSecurityStore

Card Puncher Data Processing

About

Migration utility of the security stores:

This utility works online and offline.

Syntax and Config file

migrateSecurityStore(configFile="<jps config file loc>", src="<sourceContext>", dst="<destinationContext>", type="{credStore|keyStore|globalPolicies...)

More:

help('migrateSecurityStore')

You can find a configFile example:

  • in the config fmw directory (fmw_home/user_projects/domains/bifoundation_domain/config/fmwconfig) named jps-config.xml.
  • in the documentation: Migrating Policies Manually

Example

XML Policy Store Migration Steps

Structure

  • Create a working directory
  • Copy the source file system-jazn-data.xml in the subdirectory source
  • Copy the target file system-jazn-data.xml in the subdirectory target
  • Create the configuration jpsMigration.xml with the below content

Jps Config File

<?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" schema-major-version="11" schema-minor-version="1">

	<serviceProviders>

		<serviceProvider class="oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider" name="policystore.xml.provider" type="POLICY_STORE">
			<description>XML-based policy store provider</description>
		</serviceProvider>

	</serviceProviders>

	<serviceInstances>
		<!-- Source XML-based policy store instance -->
		<serviceInstance location="./source/system-jazn-data.xml" provider="policystore.xml.provider" name="policystore.xml.source">
			<description>Replace location with the full path of the folder where the source system-jazn-data.xml is located in the file system </description>
		</serviceInstance>
		
		<serviceInstance location="./target/system-jazn-data.xml" provider="policystore.xml.provider" name="policystore.xml.target">
			<description>Replace location with the full path of the folder where the target system-jazn-data.xml is located in the file system </description>
		</serviceInstance>

	</serviceInstances>

	<jpsContexts>
		<jpsContext name="XMLsourceContext">
			<serviceInstanceRef ref="policystore.xml.source"/>
		</jpsContext>
		
		<jpsContext name="XMLtargetContext">
			<serviceInstanceRef ref="policystore.xml.target"/>
		</jpsContext>
		
	</jpsContexts>
</jpsConfig>

Command

  • Start wlst in the working directory
  • Start the following commando:
migrateSecurityStore(type="appPolicies", configFile="jpsMigration.xml", src="XMLsourceContext", dst="XMLtargetContext", srcApp="obi",migrateIdStoreMapping="true",reportFile="reportFile.html",preserveAppRoleGuid="true")

The migrateIdStoreMapping is important in order to preserve the members

Wlst Migratesecuritystore Migrateidstoremapping

  • Output:
Feb 4, 2014 12:30:56 PM oracle.security.jps.internal.common.util.XmlSchemaValidationUtil$StrictErrorHandler warning
WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: line 2 co
lumn 272.
Feb 4, 2014 12:30:56 PM oracle.security.jps.internal.common.util.XmlSchemaValidationUtil$StrictErrorHandler error
WARNING: Failed to validate the xml content. cvc-complex-type.2.4.a: Invalid content was found starting with element 'description'. One of '{"http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1
.xsd":property}' is expected. Location: line 15 column 17.
Feb 4, 2014 12:30:56 PM oracle.security.jps.internal.common.util.XmlSchemaValidationUtil$StrictErrorHandler error
WARNING: Failed to validate the xml content. cvc-complex-type.4: Attribute 'default' must appear on element 'jpsContexts'. Location: line 56 column 15.
WLS ManagedService is not up running. Fall back to use system properties for configuration.
JPS-05984

Support

Null Pointer Exception

When an error occurs, the script likes to keep the config file structure in memory. Just try to restart the Wlst interpreter.

Documentation / Reference







Share this page:
Follow us:
Task Runner