3.8 Policy Set Management Commands

Policy sets enhance the security and manageability of an enterprise by providing a mechanism to globally attach one or more policies to a subject type. Using policy sets, an administrator can specify a default set of policies to be enforced even if none are directly attached. For detailed information about determining the type and scope of resources a policy set can be attached to, see "Defining the Type and Scope of Resources for Globally Attached Policies" in the Securing Web Services and Managing Policies with Oracle Web Services Manager.

All policy set creation, modification, or deletion commands must be performed in the context of a session. A session can only act on a single policy set.

Note:

To view the help for the WLST commands described in this section, connect to a running instance of the server and enter help('wsmManage').

The policy set management commands listed in Table 3-9 have been deprecated in this release for Oracle Infrastructure Web Services.

For Oracle Infrastructure Web Services, Oracle recommends that you use the new WLST commands listed in Table 3-8 to manage OWSM policy sets in release 12c. These commands must be executed within the context of a session using the session commands described in Session Commands.

For a complete list of deprecated commands, see "Deprecated Commands for Oracle Infrastructure Web Services" in Release Notes for Oracle Fusion Middleware Infrastructure.

Use the WLST commands listed in Table 3-6 to manage globally available policy sets.


Table 3-8 Web Services Global Policy Set Management WLST Commands

Use this command... To... Use with WLST...

cloneWSMPolicySet

Within a session, clone a new policy set from an existing policy set.

Online

createWSMPolicySet

Create a new, empty policy set within a session.

Online

deleteWSMAllPolicySets

Delete all or selected policy sets from within the OWSM repository.

Online

deleteWSMPolicySet

Delete a specified policy set within a session.

Online

displayWSMPolicySet

Display the configuration of a specified policy set.

Online

enableWSMPolicySet

Enable or disable the current policy set within a session.

Online

listWSMPolicySets

Lists the policy sets in the repository. This command will also display a policy set that is being created, modified, or deleted within the current session.

Online

selectWSMPolicySet

Specify a policy set for modification within a session.

Online

setWSMPolicySetConstraint

Specify a run-time constraint value for a policy set selected within a session.

Online

setWSMPolicySetOverride

Configure override properties to a policy set.

Online

setWSMPolicySetDescription

Specify a description for a policy set selected within a session.

Online

setWSMPolicySetScope

Set an expression that attaches a policy set to the specified resource scope.

Online

unregisterWSMResource

Unregister or remove the resource instance that describes a registered physical resource within a session.

Online

validateWSMPolicySet

Validate an existing policy set.

Online


Table 3-9 list the WLST commands that are deprecated in this release for managing Oracle Infrastructure web service global policy sets.


Table 3-9 Deprecated WLST Commands for Global Policy Set Management

Use this command... To... Use with WLST...

abortRepositorySession

Abort the current OWSM repository modification session, discarding any changes that were made to the repository during the session.

Online

attachPolicySet

Attach a policy set to the specified resource scope.

Online

attachPolicySetPolicy

Attach a policy to a policy set using the policy's URI.

Online

beginRepositorySession

Begin a session to modify the OWSM repository.

Online

clonePolicySet

Clone a new policy set from an existing policy set.

Online

commitRepositorySession

Write the contents of the current session to the OWSM repository.

Online

createPolicySet

Create a new, empty policy set.

Online

deleteAllPolicySets

Delete all or selected policy sets from within the OWSM repository.

Online

deletePolicySet

Delete a specified policy set.

Online

describeRepositorySession

Describe the contents of the current session.

Online

detachPolicySetPolicy

Detach a policy from a policy set using the policy's URI.

Online

displayPolicySet

Display the configuration of a specified policy set.

Online

enablePolicySet

Enable or disable a policy set.

Online

enablePolicySetPolicy

Enable or disable a policy attachment for a policy set using the policy's URI.

Online

listPolicySets

List the policy sets in the repository.

Online

migrateAttachments

Migrate direct policy attachments to global policy attachments if they are identical.

Online

modifyPolicySet

Specify an existing policy set for modification in the current session.

Online

setPolicySetConstraint

Specify a run-time constraint value for a policy set selected within a session.

Online

setPolicySetDescription

Specify a description for the policy set selected within a session.

Online

setPolicySetPolicyOverride

Add a configuration override to a policy reference in the current policy set.

Online

validatePolicySet

Validate an existing policy set in the repository or in a session.

Online


3.8.1 abortRepositorySession

Note:

This command has been deprecated. It is recommended that you use the abortWSMSession command, as described in "abortWSMSession".

The following examples show how to migrate to use the abortWSMSession command.

11g Release (for Repository operations):

wls:/jrfServer_domain/serverConfig> abortRepositorySession()
 

12c Release (for both Repository and PolicySubject operations):

wls:/jrfServer_domain/serverConfig> abortWSMSession()

Command Category: Policy Set Management

Use with WLST: Online

Description

Aborts the current modification session, discarding any changes that were made to the repository during the session.

Syntax

abortRepositorySession()

Example

The following example aborts the current OWSM session.

wls:/wls-domain/serverConfig>abortRepositorySession()

3.8.2 attachPolicySet

Note:

This command has been deprecated. It is recommended that you use the setWSMPolicySetScope command, as described in "setWSMPolicySetScope".

The following examples show how to migrate to use the setWSMPolicySetScope command.

11g Release:

wls:/jrfServer_domain/serverConfig> attachPolicySet ('Domain("base_domain")')
 

12c Release:

wls:/jrfServer_domain/serverConfig> setWSMPolicySetScope ('Domain("base_domain")')

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, sets an expression that attaches a policy set to the specified resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

attachPolicySet(expression)

Argument Definition

expression

Expression that attaches the policy set to the specified resource scope.

For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.


Example

The following example attaches a policy set to the specified base_domain resource.

wls:/wls-domain/serverConfig>attachPolicySet('Domain("base_domain")')

This example attaches a policy set to the specified base_domain and managed_server resources.

wls:/wls-domain/serverConfig>attachPolicySet('Domain("base_domain") and Server("managed_server")')

3.8.3 attachPolicySetPolicy

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the attachWSMPolicy command, as described in "attachWSMPolicy". The following examples show how to migrate to use the attachWSMPolicy command.

11g Release (for both Repository and PolicySubject operation on policy set):

wls:/jrfServer_domain/serverConfig> attachPolicySetPolicy ('oracle/wss_username_token_service_policy')

12c Release:

wls:/jrfServer_domain/serverConfig> attachWSMPolicy('oracle/wss_username_token_service_policy')

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, attaches a policy, identified by the specified URI, to the current policy set.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

attachPolicySetPolicy(uri)

Argument Definition

uri

URI specifying the policy to attach to the current policy set. For example, 'oracle/log_policy'.


Example

The following example attaches the OWSM logging policy to the current policy set.

wls:/wls-domain/serverConfig>attachPolicySetPolicy('oracle/log_policy')

3.8.4 beginRepositorySession

Note:

This command has been deprecated. It is recommended that you use the beginWSMSession command, as described in "beginWSMSession".

The following examples show how to migrate to use the beginWSMSession command.

11g Release (for Repository operations):

wls:/jrfServer_domain/serverConfig> beginRepositorySession()

12c Release (for both Repository and PolicySubject operations):

wls:/jrfServer_domain/serverConfig> beginWSMSession()

Command Category: Policy Set Management

Use with WLST: Online

Description

Begins a session to modify the OWSM Repository. A session can only act on a single policy subject, such as a policy set or a Fusion Middleware web service endpoint. An error will be displayed if there is already a current session.

Syntax

beginRepositorySession()

Example

The following example begins an OWSM Repository modification session.

wls:/wls-domain/serverConfig>beginRepositorySession()

3.8.5 clonePolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the cloneWSMPolicySet command, as described in "cloneWSMPolicySet". The following examples show how to migrate to use the cloneWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> clonePolicySet ('myNewPolicySet', 'myPolicySet')

12c Release:

wls:/jrfServer_domain/serverConfig> cloneWSMPolicySet ('myNewPolicySet', 'myPolicySet')

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, clones a new policy set from an existing policy set. When cloning an existing policy set, all values and attachments in the source policy set are copied into the new policy set, although you can supply a different expression identifying the resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a session will result in an error.

Syntax

clonePolicySet(name, source,[attachTo=None],[description=None],[enable='true'])

Argument Definition

name

Name of the new policy set clone.

source

Name of the source policy set that will be cloned.

attachTo=None

Optional. Expression that attaches the policy set to the specified resource scope. For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

If this argument is set to None, then the expression used in the source policy set to identify the scope of resources is retained.

description=None

Optional. Description for the new policy set.

If this argument is set to None, then the description used in the source policy set is retained.

enable='true'

Optional. Specifies whether to enable or disable the policy set. Valid options are:

  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Example

The first example creates a policy set by cloning the existing myPolicySet policy set to create a new mynewPolicySet. The second example also creates a policy set, but narrows the resource scope to policy subjects in the specified jaxwsejb30ws application in the domain.

wls:/wls-domain/serverConfig>clonePolicySet('myNewPolicySet','myPolicySet')
wls:/wls-domain/serverConfig>clonePolicySet('myNewPolicySet','myPolicySet','Application("jaxwsejb30ws")')

3.8.6 cloneWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, clones a new policy set from an existing policy set. When cloning an existing policy set, all values and attachments in the source policy set are copied into the new policy set, although you can supply a different expression identifying the resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a session will result in an error.

Syntax

cloneWSMPolicySet(name,source,[scope=None],[description=None],[enable='true'])

Argument Definition

name

Name of the new policy set clone.

source

Name of the source policy set that will be cloned.

scope=None

Optional. Expression that attaches the policy set to the specified resource scope. For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

If this argument is not specified, then the expression used in the source policy set to identify the scope of resources is retained.

description=None

Optional. Description for the new policy set.

If this argument is not specified, then the description used in the source policy set is retained.

enable='true'

Optional. Specifies whether to enable or disable the policy set. If you omit this argument, the policy set is enabled.Valid options are:

  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Examples

The first example creates a policy set by cloning the existing myPolicySet policy set to create a new mynewPolicySet. The second example also creates a policy set, but narrows the resource scope to policy subjects in the specified jaxwsejb30ws application in the domain.

wls:/wls-domain/serverConfig>cloneWSMPolicySet('myNewPolicySet','myPolicySet')
wls:/wls-domain/serverConfig>cloneWSMPolicySet('myNewPolicySet','myPolicySet','Application("jaxwsejb30ws")')

3.8.7 commitRepositorySession

Note:

This command has been deprecated. It is recommended that you use the commitWSMSession command, as described in "commitWSMSession".

The following examples show how to migrate to use the commitWSMSession command.

11g Release (for Repository operations):

wls:/jrfServer_domain/serverConfig> commitRepositorySession()

12c Release (for both Repository and PolicySubject operations):

wls:/jrfServer_domain/serverConfig> commitWSMSession()

Command Category: Policy Set Management

Use with WLST: Online

Description

Writes the contents of the current session to the OWSM Repository. Messages are displayed that describe what was committed. An error will be displayed if there is no current session.

Syntax

commitRepositorySession()

Example

The following example commits the current repository modification session.

wls:/wls-domain/serverConfig>commitRepositorySession()

3.8.8 createPolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the createWSMPolicySet command, as described in "createWSMPolicySet". The following examples show how to migrate to use the createWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> createPolicySet('myPolicySet', 'ws-service', 'Domain("base_domain")')

12c Release:

wls:/jrfServer_domain/serverConfig> createWSMPolicySet ('myPolicySet', 'ws-service', 'Domain("base_domain")')

Command Category: Policy Set Management

Use with WLST: Online

Description

Creates a new, empty policy set within a session. When creating a new policy set, you must specify the type of policy subject that the policy set will apply to, and a supported expression that defines a valid resource scope in a supported format.

Issuing this command outside of a session will result in an error.

Syntax

createPolicySet(name,type,attachTo,[description=None],[enable='true'])

Argument Definition

name

Name of the new, empty policy set.

type

The type of policy subject to which the new policy set applies. The type of policy subject must be one of the policy subjects described in "Understanding Policy Subjects" in Understanding Oracle Web Services Manager.

attachTo

Expression that attaches the policy set to the specified resource scope. For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

description

Optional. Description of the new policy set. If no description is specified, then the description for a new policy set will be "Global policy attachments for <type>", where <type> is the subject type.

enable

Optional. Specifies whether to enable or disable the new policy set. Valid options are:

  • true—Enables the new policy set. The default is true.

  • false—Disables the new policy set.

If you omit this argument, the policy set is enabled.


Example

The first example creates a new policy set and specifies the resource scope to only ws-service types (Web Service Endpoint) in the base_domain domain. The second example creates a new policy set, but also narrows the resource scope to only sca-service types (SOA Service) in the soa_server1 server in the domain.

wls:/wls-domain/serverConfig>createPolicySet('myPolicySet','ws-service','Domain("base_domain")')
wls:/wls-domain/serverConfig>createPolicySet('myPolicySet','sca-service','Server("soa_server1")','My policySet')

3.8.9 createWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, creates a new, empty policy set. When creating a new policy set, you must specify the type of policy subject that the policy set will apply to, and provide a supported expression that defines a valid resource scope in a supported format.

Issuing this command outside of a session will result in an error.

Syntax

createWSMPolicySet(name,type,scope,[description=None],[enable='true'])

Argument Definition

name

Name of the new, empty policy set.

type

The type of policy subject that the new policy set applies to. The type of policy subject must be one of the policy subjects described in "Understanding Policy Subjects" in Understanding Oracle Web Services Manager.

scope

Optional. Expression that attaches the policy set to the specified resource scope. For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

If this argument is not specified, then the expression used in the source policy set to identify the scope of resources is retained.

description=None

Optional. Description of the new policy set. If no description is specified, then the description for a new policy set will be "Global policy attachments for <type>", where <type> is the subject type.

enable='true'

Optional. Specifies whether to enable or disable the new policy set. Valid options are:

  • true—Enables the new policy set. The default is true.

  • false—Disables the new policy set.

If you omit this argument, the policy set is enabled.


Examples

The following example creates a new policy set and specifies the resource scope to only ws-service types (Web Service Endpoint) in the base_domain domain.

wls:/wls-domain/serverConfig>createWSMPolicySet('myPolicySet','ws-service','Domain("base_domain")')

The following example creates a new policy set, but also narrows the resource scope to only sca-service types (SOA Service) in the soa_server1 server in the domain.

wls:/wls-domain/serverConfig>createWSMPolicySet('myPolicySet','sca-service','Server("soa_server1")','My policySet')

The following example creates a new policy set, narrowing the resource scope to only sca-rest-reference types (SOA RESTful references) in the base_domain domain.

wls:/wls-domain/serverConfig>createWSMPolicySet('myPolicySet','sca-rest-reference','Domain("base_domain")','My policySet')

The following example creates a new policy set, narrowing the resource scope to only sca-rest-reference types (OSB RESTful business services) in the base_domain domain.

wls:/wls-domain/serverConfig>createWSMPolicySet('myPolicySet','biz-rest-service','Domain("base_domain")','My policySet')

3.8.10 deleteAllPolicySets

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the deleteWSMAllPolicySets command, as described in "deleteWSMAllPolicySets". The following examples show how to migrate to use the deleteWSMAllPolicySets command.

11g Release:

wls:/jrfServer_domain/serverConfig> deleteAllPolicySets()
 

12c Release:

wls:/jrfServer_domain/serverConfig> deleteWSMAllPolicySets()

Command Category: Policy Set Management

Use with WLST: Online

Description

Deletes all or selected policy sets from within the OWSM repository. You can specify whether to force deletion of all the policy sets, or prompt to select individual policy sets for deletion. If deletion of any policy set fails then this operation throws an exception and no policy sets are deleted.

Syntax

deleteAllPolicySets([mode])

Argument Definition

mode

Optional. The action to be taken for performing policy set deletion. Valid options are:

  • force—Automatically delete all policy sets without prompting.

  • prompt—Request user confirmation for each policy set deletion. Available options are yes, no, and cancel. If you select cancel for any property set deletion, the operation is canceled and no policy sets are deleted.

If no mode is specified, this argument defaults to prompt mode.


Examples

The following example automatically deletes all policy sets from the respository without prompting.

wls:/jrfServer_domain/serverConfig> deleteAllPolicySets("force") 
 
Starting Operation deleteAllPolicySets ...
 
All policy sets were deleted successfully from repository.
 
deleteAllPolicySets Operation Completed. 

The following examples delete selected policy sets from the repository.

wls:/jrfServer_domain/serverConfig> deleteAllPolicySets()

or

wls:/jrfServer_domain/serverConfig> deleteAllPolicySets('prompt')
 
Starting Operation deleteAllPolicySets ...
 
Policy Set Name: create_policyset_6
Select "create_policyset_6" for deletion (yes/no/cancel)? no
Policy Set Name: create_policyset_8
Select "create_policyset_8" for deletion (yes/no/cancel)? yes
Policy Set Name: create_policyset_21
Select "create_policyset_21" for deletion (yes/no/cancel)? no 
Policy Set Name: create_policyset_10
Select "create_policyset_10" for deletion (yes/no/cancel)? yes
 
All the selected policy sets were deleted successfully from repository.
 
deleteAllPolicySets Operation Completed.

3.8.11 deleteWSMAllPolicySets

Command Category: Policy Set Management

Use with WLST: Online

Description

Deletes all or selected policy sets within a session. You can specify whether to force deletion of all the policy sets, or prompt to select individual policy sets for deletion. If deletion of any policy set fails then this operation throws an exception and no policy sets are deleted.

Syntax

deleteWSMAllPolicySets([mode])

Argument Definition

mode

Optional. The action to be taken for performing policy set deletion. Valid options are:

  • force—Automatically delete all policy sets without prompting.

  • prompt—Request user confirmation for each policy set deletion. Available options are yes, no, and cancel. If you select cancel for any property set deletion, the operation is canceled and no policy sets are deleted.

If no mode is specified, this argument defaults to prompt mode.


Examples

The following example automatically deletes all policy sets from the respository without prompting.

wls:/jrfServer_domain/serverConfig> deleteWSMAllPolicySets("force") 
 
Starting Operation deleteWSMAllPolicySets ...
 
All policy sets were deleted successfully from repository.
 
deleteWSMAllPolicySets Operation Completed. 

The following examples delete selected policy sets from the repository.

wls:/jrfServer_domain/serverConfig> deleteWSMAllPolicySets()

or

wls:/jrfServer_domain/serverConfig> deleteWSMAllPolicySets('prompt')
 
Starting Operation deleteWSMAllPolicySets ...
 
Policy Set Name: create_policyset_6
Select "create_policyset_6" for deletion (yes/no/cancel)? no
Policy Set Name: create_policyset_8
Select "create_policyset_8" for deletion (yes/no/cancel)? yes
Policy Set Name: create_policyset_21
Select "create_policyset_21" for deletion (yes/no/cancel)? no 
Policy Set Name: create_policyset_10
Select "create_policyset_10" for deletion (yes/no/cancel)? yes
 
All the selected policy sets were deleted successfully from repository.
 
deleteWSMAllPolicySets Operation Completed.

3.8.12 deletePolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the deleteWSMPolicySet command, as described in "deleteWSMPolicySet". The following examples show how to migrate to use the deleteWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> deletePolicySet('myPolicySet')
 

12c Release:

wls:/jrfServer_domain/serverConfig> deleteWSMPolicySet ('myPolicySet')

Command Category: Policy Set Management

Use with WLST: Online

Description

Deletes a specified policy set within a session. If the session already contains a different policy set, an error will display. If the session already contains the named policy set, then a creation will be undone or a modification will be converted into a deletion.

Issuing this command outside of a session will result in an error.

Syntax

deletePolicySet(name)

Argument Definition

name

Name of the policy set to be deleted.


Example

The following example deletes a specified myPolicySet policy set.

wls:/wls-domain/serverConfig>deletePolicySet('myPolicySet')

3.8.13 deleteWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, deletes a specified policy set. If the session already contains a different policy set, an error will display. If the session already contains the named policy set, then a creation will be undone or a modification will be converted into a deletion.

Issuing this command outside of a session will result in an error.

Syntax

deleteWSMPolicySet(name)

Argument Definition

name

Name of the policy set to be deleted.


Examples

The following example deletes a specified myPolicySet policy set.

wls:/wls-domain/serverConfig>deleteWSMPolicySet('myPolicySet')

3.8.14 describeRepositorySession

Note:

This command has been deprecated. It is recommended that you use the describeWSMSession command, as described in "describeWSMSession". The following examples show how to migrate to use the describeWSMSession command.

11g Release (for Repository operations):

wls:/jrfServer_domain/serverConfig> describeRepositorySession()

12c Release (for both Repository and Policy Subject operations):

wls:/jrfServer_domain/serverConfig> describeWSMSession()

Command Category: Policy Set Management

Use with WLST: Online

Description

Describes the contents of the current session. This will either indicate that the session is empty or list the name of the policy subject that is being updated, along with the type of update (create, modify, or delete). An error will be displayed if there is no current session.

Syntax

describeRepositorySession()

Example

The following example describes the current repository modification session.

wls:/wls-domain/serverConfig>describeRepositorySession()

3.8.15 detachPolicySetPolicy

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the detachWSMPolicy command, as described in "detachWSMPolicy". The following examples show how to migrate to use the detachWSMPolicy command.

11g Release (for both Repository and Policy Subject operations on policy set):

wls:/jrfServer_domain/serverConfig> detachPolicySetPolicy ('oracle/wss_username_token_service_policy')

12c Release:

wls:/jrfServer_domain/serverConfig> detachWSMPolicy('oracle/wss_username_token_service_policy')

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, detaches a policy, identified by a specified URI, from the current policy set.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

detachPolicySetPolicy(uri)

Argument Definition

uri

URI specifying the policy to detach to the current policy set. For example, oracle/log_policy'.


Example

The following example detaches the OWSM logging policy from the current policy set.

wls:/wls-domain/serverConfig> detachPolicySetPolicy('oracle/log_policy')

3.8.16 displayPolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the displayWSMPolicySet command, as described in "displayWSMPolicySet". The following examples show how to migrate to use the displayWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> displayPolicySet('myPolicySet')
 

12c Release:

wls:/jrfServer_domain/serverConfig> displayWSMPolicySet ('myPolicySet')

Command Category: Policy Set Management

Use with WLST: Online

Description

Displays the configuration of a specified policy set. If the policy set is being modified in the current session, then that version will be displayed; otherwise, the latest version in the repository will be displayed. An error will display if the policy set does not exist.

This command can be issued outside of a session.

Syntax

displayPolicySet([name])

Argument Definition

name

Optional. Name of the policy set to be displayed.

If a name is not specified, the configuration of the policy set, if any, in the current session is displayed or an error message is displayed.


Example

The following example displays the configuration of the myPolicySet policy set.

wls:/wls-domain/serverConfig>displayPolicySet('myPolicySet')

3.8.17 displayWSMResource

Note:

This command applies to Oracle Infrastructure and RESTful Web services. It does not apply to Java EE Web services in this release.

Command Category: Respository

Use with WLST: Online

Description

Displays the configuration of a registered resource instance. If the resource instance is being modified in the current session, then that version will be displayed; otherwise, the latest version in the repository will be displayed. An error will display if the resource instance does not exist. This command can be issued outside of a session.

displayWSMResource(resourceName=None), (resourceName=Type)

Argument Definition

resourceName

The name of an existing resource instance. This is a combination of platform name, domain name, and logical name of resource, separated by a forward slash. If null, then the currently selected resource will be displayed.

resourceType

Specifies the type of resource. The value must be one of the following:

  • application–An application resource.

  • domain–A management domain resource.

  • server–A server resource.

If the resourceType is omitted, than it will default to the application value.


Examples

The following example displays the configuration of the application named myApplication in the base_cell domain on the IBM WebSphere application server.

wls:/wls-domain/serverConfig> displayWSMResource('/WAS/base_cell/myApplication')

The following example displays the configuration of the base_cell domain on the IBM WebSphere application server.

wls:/wls-domain/serverConfig> displayWSMResource('/WAS/base_cell','domain')

Since the resourceType argument is omitted, the following example displays...

displayWSMResource()

3.8.18 displayWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Displays the configuration of a specified policy set. If the policy set is being modified in the current session, then that version will be displayed; otherwise, the latest version in the repository will be displayed. An error will display if the policy set does not exist.

This command can be issued outside of a session.

Syntax

displayWSMPolicySet([name])

Argument Definition

name

Optional. Name of the policy set to be displayed.

If a name is not specified, the configuration of the policy set, if any, in the current session is displayed or an error message is displayed.


Examples

The following example displays the configuration of the myPolicySet policy set.

wls:/wls-domain/serverConfig>displayWSMPolicySet('myPolicySet')

3.8.19 enablePolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the enableWSMPolicySet command, as described in "enableWSMPolicySet". The following examples show how to migrate to use the enableWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> enablePolicySet(true)

12c Release:

wls:/jrfServer_domain/serverConfig> enableWSMPolicySet(true)

Command Category: Policy Set Management

Use with WLST: Online

Description

Enables or disables the current policy set within a session. If not specified, this command enables the policy set.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

enablePolicySet([enable=True])

Argument Definition

enable

Optional. Specifies whether to enable or disable the policy set. Valid options are:

  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Example

The following example enables the current policy set.

wls:/wls-domain/serverConfig>enablePolicySet(true)

3.8.20 enablePolicySetPolicy

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the enableWSMPolicySet command, as described in "enableWSMPolicySet". The following examples show how to migrate to use the enableWSMPolicySet command.

11g Release:

wls:/wls-domain/serverConfig>enablePolicySetPolicy('/oracle/log_policy',false) 

12c Release:

wls:/wls-domain/serverConfig>enableWSMPolicy('/oracle/log_policy',false) 

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, enables or disables the policy attachment, which is identified by the provided URI in the current policy set. If not specified, this command enables the policy set. An error displays if the identified policy is not currently attached to the policy set.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

enablePolicySetPolicy(uri,[enable=true])

Argument Definition

uri

URI specifying the policy attachment within the policy set.

enable

Optional. Specifies whether to enable or disable the policy attachment specified by the URI in the policy set. Valid options are:

  • true—Enables the specified policy attachment in the policy set. The default is true.

  • false—Disables specified policy attachment in the policy set.

If you omit this argument, the policy set attachment is enabled.


Example

The following example disables the specified logging policy attachment within the current policy set.

wls:/wls-domain/serverConfig>enablePolicySetPolicy('/oracle/log_policy',false) 

3.8.21 enableWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, enables or disables the current policy set. If the optional enable argument is not specified, this command enables the policy set by default.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

enableWSMPolicySet([enable=True])

Argument Definition

enable

Optional. Specifies whether to enable or disable the policy set. Valid options are:

  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Examples

The following example enables the current policy set.

wls:/wls-domain/serverConfig>enableWSMPolicySet(true)

3.8.22 listPolicySets

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the listWSMPolicySets command, as described in "listWSMPolicySets". The following examples show how to migrate to use the listWSMPolicySets command.

11g Release:

wls:/wls-domain/serverConfig>listPolicySets('ws-service')

12c Release:

wls:/wls-domain/serverConfig>listWSMPolicySets('ws-service')

Command Category: Policy Set Management

Use with WLST: Online

Description

Lists the policy sets in the repository. This command will also display a policy set that is being created, modified, or deleted within the current session. You can list all the policy sets or limit the display to include only those that apply to specific policy subject resource types.

Syntax

listPolicySets([type=None])

Argument Definition

type=None

Optional. Specifies the type of policy subject for which the associated policy sets will be displayed. The type of policy subject must be one of the policy subjects described in "Understanding Policy Subjects" in Understanding Oracle Web Services Manager

If this argument is set to None, then all the policy sets stored in the repository will be listed.


Example

The first two examples list policy sets by either the ws-service or ws-client resource types. The third example lists all the policy sets stored in the repository.

wls:/wls-domain/serverConfig>listPolicySets('ws-service')
wls:/wls-domain/serverConfig>listPolicySets('ws-client')
wls:/wls-domain/serverConfig>listPolicySets()

3.8.23 listWSMPolicySets

Command Category: Policy Set Management

Use with WLST: Online

Description

Lists the policy sets in the repository. This command will also display a policy set that is being created, modified, or deleted within the current session. You can list all the policy sets or use the type argument to limit the display to include only those sets that apply to specific policy subject resource types.

Syntax

listWSMPolicySets([type=None])

Argument Definition

type=None

Optional. Specifies the type of policy subject for which the associated policy sets will be displayed. The type of policy subject must be one of the policy subjects described in "Understanding Policy Subjects" in Understanding Oracle Web Services Manager.

If this argument is set to None, then all the policy sets stored in the repository will be listed.


Examples

The first two examples list policy sets by either the ws-service or ws-client resource types. Whereas, the third example lists all the policy sets stored in the repository.

wls:/wls-domain/serverConfig>listWSMPolicySets('ws-service')
wls:/wls-domain/serverConfig>listWSMPolicySets('ws-client')
wls:/wls-domain/serverConfig>listWSMPolicySets()

3.8.24 migrateAttachments

Note:

This command has been deprecated. It is recommended that you use the migrateWSMAttachments command, as described in "migrateWSMAttachments". The following examples show how to migrate to use the migrateWSMAttachments command.

11g Release:

wls:/jrfServer_domain/serverConfig> migrateAttachments()
 

12c Release:

wls:/jrfServer_domain/serverConfig> migrateWSMAttachments()

Command Category: Policy Set Management

Use with WLST: Online

Description

Migrates direct (local) policy attachments that are identical to the external global policy attachments that would otherwise be attached to each policy subject in the current domain. You can specify whether to force the migration, prompt for confirmation before each migration, or simply list the migrations that would occur. A direct policy attachment is identical if its URI is the same as one provided by a global policy attachment, and if it does not have any scoped configuration overrides.

Note:

A direct attachment with an unscoped override will be migrated but an attachment with a scoped override will not. This is because after running the migrateAttachments() command, the enforcement of the policies on all subjects remains the same, even though some policies are globally attached.

Whether forced or prompted, the command lists each direct policy attachment that is migrated. This output will identify the policy subject that was modified, the URI of the identical policy reference, and the name of the global policy attachment document that duplicated the direct attachment.

Syntax

migrateAttachments([mode])

Argument Definition

mode

The action to be taken for each policy attachment that can be migrated. Valid options are:

  • force—Automatically migrate all identical policy attachments without prompting.

  • preview—List all policy attachments that can be migrated, but does not perform any migration.

  • prompt—Request user confirmation before migrating each policy attachment.

If no mode is specified, this argument defaults to prompt mode.


Example

The following examples describe how to use the repository attachment migration modes.

wls:/wls-domain/serverConfig>migrateAttachments()
wls:/wls-domain/serverConfig>migrateAttachments('force')
wls:/wls-domain/serverConfig>migrateAttachments('preview')
wls:/wls-domain/serverConfig>migrateAttachments('prompt')

3.8.25 modifyPolicySet

Note:

For Oracle Infrastructure Web Services, it is recommended that you use the selectWSMPolicySet command, as described in "selectWSMPolicySet". The following examples show how to migrate to use the selectWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> modifyPolicySet('myPolicySet')
 

12c Release:

wls:/jrfServer_domain/serverConfig> selectWSMPolicySet ('myPolicySet')

Command Category: Policy Set Management

Use with WLST: Online

Description

Specifies a policy set for modification in the current session. The latest version of the named policy set will be loaded into the current session. If the session already contains a different policy set, then an error will be displayed; if the session already contains the named policy set, then no action will be taken. Subsequent attempts to modify the named policy set will show the current version in the session.

Issuing this command outside of a session will result in an error.

Syntax

modifyPolicySet(name)

Argument Definition

name

Name of the policy set to be modified in the current session.


Example

The following example opens the myPolicySet policy set for modification in the current session.

wls:/wls-domain/serverConfig>modifyPolicySet('myPolicySet')

3.8.26 selectWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, specifies a policy set for modification. The latest version of the named policy set is loaded into the current session. If the session already contains a different policy set, then an error will be displayed; if the session already contains the named policy set, then no action will be taken. Subsequent attempts to modify the named policy set will show the current version in the session.

Issuing this command outside of a session will result in an error.

Syntax

selectWSMPolicySet(name)

Argument Description

name

Name of the policy set to be modified in the current session.


Examples

The following example selects a policy set in the current session named myPolicySet.

wls:/wls-domain/serverConfig> selectWSMPolicySet('myPolicySet')

3.8.27 setPolicySetConstraint

Note:

This command has been deprecated. It is recommended that you use the setWSMPolicySetConstraint command, as described in "setWSMPolicySetConstraint". The following examples show how to migrate to use the setWSMPolicySetConstraint command.

11g Release:

wls:/jrfServer_domain/serverConfig> setPolicySetConstraint ('HTTPHeader("VIRTUAL_HOST_TYPE","external")')
 

12c Release:

wls:/jrfServer_domain/serverConfig> setWSMPolicySetConstraint ('HTTPHeader("VIRTUAL_HOST_TYPE","external")')

Command Category: Policy Set Management

Use with WLST: Online

Description

Specifies a run-time constraint value for a policy set selected within a session. Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

For more information, see "Specifying Run-time Constraints in Policy Sets" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

Syntax

setPolicySetConstraint(constraint)

Argument Definition

constraint

Expression that specifies the run-time context to which the policy set applies. If not specified, the policy set applies to all run-time contexts.


Example

The following example specifies that the policy set apply only to requests from external clients.

wls:/wls-domain/serverConfig> setPolicySetConstraint('HTTPHeader("VIRTUAL_HOST_TYPE","external")')

The following example specifies that the policy set apply only to requests from non-external clients.

wls:/wls-domain/serverConfig> setPolicySetConstraint('!HTTPHeader("VIRTUAL_HOST_TYPE","external")')

3.8.28 setPolicySetDescription

Note:

This command has been deprecated. It is recommended that you use the setWSMPolicySetDescription command, as described in "setWSMPolicySetDescription". The following examples show how to migrate to use the setWSMPolicySetDescription command.

11g Release:

wls:/jrfServer_domain/serverConfig> setPolicySetDescription ('Global policy set for web service endpoint.')

12c Release:

wls:/jrfServer_domain/serverConfig> setWSMPolicySetDescription ('Global policy set for web service endpoint.')

Command Category: Policy Set Management

Use with WLST: Online

Description

Specifies a description for a policy set selected within a session.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

setPolicySetDescription(description)

Argument Definition

description

Describes a policy set.


Example

The following example creates a description for a policy set.

wls:/wls-domain/serverConfig>setPolicySetDescription('PolicySetDescription')

3.8.29 setPolicySetPolicyOverride

Note:

This command has been deprecated. It is recommended that you use the setWSMPolicyOverride command, as described in "setWSMPolicyOverride". The following examples show how to migrate to use the setWSMPolicyOverride command.

11g Release:

wls:/jrfServer_domain/serverConfig> setPolicySetPolicyOverride ('oracle/wss_username_token_service_policy', 'reference.priority', '10')
 

12c Release:

wls:/jrfServer_domain/serverConfig> setWSMPolicyOverride ('oracle/wss_username_token_service_policy', 'reference.priority', '10')
 

Command Category: Policy Set Management

Use with WLST: Online

Description

Adds a configuration override, described by a name, value pair, to an attached policy reference in the current policy set. The value argument is optional. If the value argument is omitted, the property specified by the name argument is removed from the policy reference in the policy set. If the property specified by the name argument already exists and a value argument is provided, the current value is overwritten by the new value specified with the value argument.

Issuing this command outside of a session containing a policy set that is being created or modified results in an error.

Syntax

setPolicySetPolicyOverride(uri,name,[value=None])

Argument Definition

URI

String representing the OWSM policy URI, for example, 'oracle/wss10_saml_token_service_policy' to which the override properties will be applied.

name

String representing the name of the override property.

For example: ['reference.priority']

value

Optional. String representing the value of the property. If this argument is not specified, the property specified by the name argument, if it exists, is removed.


Example

The following example specifies a configuration override for the reference.priority property for the oracle/wss10_saml_token_service_policy to a value of 1.

wls:/wls-domain/serverConfig> setPolicySetPolicyOverride('oracle/wss10_saml_token_service_policy', 'reference.priority','1')

The following example removes the property reference.priority from the oracle/wss10_saml_token_service_policy in the policy set.

wls:/wls-domain/serverConfig> setPolicySetPolicyOverride('oracle/wss10_saml_token_service_policy', 'reference.priority')

3.8.30 setWSMPolicySetConstraint

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, specifies a constraint value for a policy set selected within a session. Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

For more information, see "Specifying Run-time Constraints in Policy Sets" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

Syntax

setWSMPolicySetConstraint(constraint)

Argument Definition

constraint

Expression that specifies the run-time context to which the policy set applies. If not specified, the policy set applies to all run-time contexts.


Examples

The following example specifies that the policy set applies only to requests from external clients.

wls:/wls-domain/serverConfig> setWSMPolicySetConstraint('HTTPHeader("VIRTUAL_HOST_TYPE","external")')

The following example specifies that the policy set applies only to requests from non-external clients.

wls:/wls-domain/serverConfig> setWSMPolicySetConstraint('!HTTPHeader("VIRTUAL_HOST_TYPE","external")')

3.8.31 setWSMPolicySetDescription

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, specifies a description for a policy set. Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

setWSMPolicySetDescription(description)

Argument Definition

description

Describes a policy set.


Examples

The following example creates a description for a policy set.

wls:/wls-domain/serverConfig>setWSWPolicySetDescription('PolicySetDescription')

3.8.32 setWSMPolicySetOverride

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, adds a configuration override, described by a name-value pair, to the currently selected policy set. The override is unscoped to any specific policy reference. The value argument is optional. If the value argument is omitted, a null is assumed for value, and the property specified by the name argument is removed from the policy set. If the property specified by the name argument already exists and a value argument is provided, the current value is overwritten by the new value.

You must start a session and select the policy set (using the selectWSMPolicySet command), before initiating the command. Issuing this command outside of a session containing a policy subject that is being created or modified results in an error.

Syntax

setWSMPolicySetOverride(name,[value=None])

Argument Description

name

String representing the name of the override property. For example: ['on.behalf.of']

value

Optional. String representing the value of the property. If this argument is not specified, a null is assumed and the property specified by the name argument is removed, if one exists with the same name.


Examples

The following example specifies a configuration override for the on.behalf.of property for the policy set selected in the session to a value of true.

wls:/wls-domain/serverConfig> setWSMPolicySetOverride('on.behalf.of','true')

The following example removes the property on.behalf.of from the policy set.

wls:/wls-domain/serverConfig> setWSMPolicySetOverride('on.behalf.of')

3.8.33 setWSMPolicySetScope

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, sets an expression that attaches a policy set to the specified resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a session containing a policy set that is being created or modified will result in an error.

Syntax

setWSMPolicySetScope(expression)

Argument Definition

expression

Expression that attaches the policy set to the specified resource scope.

For details about specifying the resource scope expression, see "Defining the Resource Scope" in Securing Web Services and Managing Policies with Oracle Web Services Manager.


Examples

The following example attaches a policy set to the specified base_domain resource.

wls:/wls-domain/serverConfig>setWSMPolicySetScope('Domain("base_domain")')

This example attaches a policy set to the specified base_domain and managed_server resources.

wls:/wls-domain/serverConfig>setWSMPolicySetScope('Domain("base_domain") and Server("managed_server")')

3.8.34 unregisterWSMResource

Command Category: Repository

Use with WLST: Online

Description

Within a session, unregisters or removes the resource instance that describes a physical resource, such as an application server, or unregister a sub-resource existing within a resource instance. The sub-resource holds the information about the client and service ports of a resource. Issuing this command outside of a session will result in an error.

Syntax

unregisterWSMResource(resource, [assembly=None], [subject=None])

Arguments Description

resource

Name of existing resource instance. This is a combination of platform name, domain name, and logical name, separated by a forward slash.

assembly

Name of assembly used to identify a sub-resource within a resource instance. This is the combination of module type and module name, separated by a hash character.

subject

Name of the subject identifying the sub-resource. This is a combination of sub-resource type; that is, either "server" or "client" and service, or reference name and port name, separated by a hash character.


Examples

The following example unregisters the myApplication in the base_domain on the IBM WebSphere application server.

wls:/jrfServer_domain/serverConfig> unregisterWSMResource ('/WAS/base_cell/myApplication')

The following example registers the IBM WebSphere platform domain WAS/base_cell.

wls:/jrfServer_domain/serverConfig> registerWSMResource ('WAS/base_cell')

The following example unregisters the base_domain on the IBM WebSphere application server.

wls:/jrfServer_domain/serverConfig> unregisterWSMResource (‘/WAS/base_cell')

The following example unregisters the StockQuoteServicePort endpoint that resides on the IBM WebSphere platform in the application /WAS/base_cell/myApplication.

wls:/jrfServer_domain/serverConfig> unregisterWSMResource (‘/WAS/base_cell/myApplication', ‘web# myModule', ‘service(StockQuoteService# StockQuoteServicePort)')

3.8.35 validatePolicySet

Note:

This command has been deprecated. It is recommended that you use the validateWSMPolicySet command, as described in "validateWSMPolicySet". The following examples show how to migrate to use the validateWSMPolicySet command.

11g Release:

wls:/jrfServer_domain/serverConfig> validatePolicySet ('myPolicySet')

12c Release:

wls:/jrfServer_domain/serverConfig> validateWSMPolicySet ('myPolicySet')

Command Category: Policy Set Management

Use with WLST: Online

Description

Validates an existing policy set. If a policy set name is provided, the command will validate the specified policy set. If no policy set name is specified, the command will validate the policy set in the current session.

An error message displays if the policy set does not exist, or a name is not provided and the session is not active, or if the OWSM repository does not contain a suitable policy set.

Syntax

validatePolicySet([name=None])

Argument Definition

name

Optional. Name of the policy set to validate. If a name is not provided then the command will validate the policy set being created or modified in the current session.


Example

The first example validates the policy set in the current session. The second example validates the specified myPolicySet policy set.

wls:/wls-domain/serverConfig>validatePolicySet()
wls:/wls-domain/serverConfig>validatePolicySet('myPolicySet')

3.8.36 validateWSMPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a session, validates an existing policy set. If a policy set name is provided, the specified policy set is validated. If no policy set name is specified, the policy set in the current session is validated.

If the policy set does not exist, if a name is not provided and the session is not active, or if the repository does not contain a suitable policy set, an error message is displayed.

Syntax

validateWSMPolicySet([name=None])

Argument Definition

name

Optional. Name of the policy set to validate. If a name is not provided then the command will validate the policy set being created or modified in the current session.


Examples

The first example validates the policy set in the current session. The second example validates the specified myPolicySet policy set.

wls:/wls-domain/serverConfig> validateWSMPolicySet()
wls:/wls-domain/serverConfig> validateWSMPolicySet('myPolicySet')