8.3 Migrating Policies

You can export one or more user-created policies to an archive file using Fusion Middleware Control. You can then import the archive to move it to another repository.

Note:

Read-only documents, such as predefined policies and assertion templates, will not be imported or exported using either Fusion Middleware Control or WLST because they will already be present in the target environment.

For details about exporting and importing user-created policies using Fusion Middleware Control, refer to the following topics in Securing Web Services and Managing Policies with Oracle Web Services Manager:

Alternatively, you can use the exportWSMRepository and importWSMArchive WLST commands to export and import the policies.

To migrate policies using WLST commands:

  1. Export the OWSM policies to a supported archive file, such as a zip file, using the exportWSMRepository command.

    For example, to export all user-created OWSM policies named in the test/ directory to an archive named policies.zip, enter the following:

    wls:/jrfServer_domain/serverConfig> exportWSMRepository('/tmp/policies.zip',['policies:test/%'])
     
    Exporting "/policies/test/wss11_x509_token_with_message_protection_service_policy_test"
    Exporting "/policies/test/wss_username_token_over_ssl_service_policy_Test"
    Successfully exported "2" documents.
    
  2. Optionally, you can edit the archive after it has been created. If, for example, you do not want to migrate all the policies to the new environment, you can manually remove them from the archive.
  3. Move the archive to the new machine. Ensure that the OWSM Policy Manager is deployed on the new machine.
  4. Import the OWSM policies using the importWSMArchive command. For example, to import the policies exported in the previous step:
    wls:/jrfServer_domain/serverConfig> importWSMArchive('/tmp/policies.zip')
    
    Importing "META-INF/policies/test/wss11_x509_token_with_message_protection_service_policy_test"
    Importing "META-INF/policies/test/wss_username_token_over_ssl_service_policy_Test"
    Successfully imported "2" documents
    

For more information about these WLST commands, see "Web Services Custom WLST Commands" in WLST Command Reference for Infrastructure Components.