WAS v8.5 > Script the application serving environment (wsadmin) > Welcome to scripting for web services > Configure web services applications using wsadmin.sh > Configure application and system policy sets for web services using wsadmin.sh

Update policy set attributes using wsadmin.sh

Use policy sets to centrally manage policies that are customized for the web services. Use the Jython or Jacl scripting language with the wsadmin tool to update policy set attributes. We can also query the configuration for an existing policy set and respective attributes.

When administrative security is enabled, verify that we use the correct administrative role, as the following table describes:

Administrative roles. This table describes the administrative roles and associated authorization when administrative security is enabled.

Administrative role Authorization
Administrator The Administrator role must have cell-wide access to update policy sets.
Configurator The Configurator role cannot update policy sets.
Deployer The Deployer role cannot update policy sets.
Operator The Operator role cannot update policy sets.
Monitor The Monitor role cannot update policy sets.
After creating a new policy set, we can update your policy set configuration with the updatePolicySet command. The command uses a properties object to update all attributes or a subset of attributes for the specified policy set.

  1. Launch the wsadmin scripting tool using the Jython scripting language. To learn more, see the starting the wsadmin scripting client information.
  2. View the current attribute values for the policy set of interest.

    Enter the following command to display the attribute values of the policySet1 policy set:

      AdminTask.getPolicySet('[-policySet policySet1]')

  3. Modify attributes for the policy set of interest.

    Enter the following command to modify the type and description attributes for the policySet1 policy set.

    AdminTask.updatePolicySet('-policySet policySet1 -attributes "[ [type application] [description 
    [my custom policy set to manage WSSecurity]] ]"')

    We can also use the -interactive option to update a policy set. To start -interactive mode, enter this command:

      AdminTask.updatePolicySet('-interactive')

  4. Save the configuration changes.

    Enter the following command to save your changes:


Results

If we received a success message after entering the commands, manage and customize the policy set for the web services applications.

After updating policy set attributes, we can further configure policies and policy set attachments using the commands and parameters for the PolicySetManagement group of the AdminTask object.


Related concepts:

Web services policy sets


Related


Start the wsadmin scripting client using wsadmin.sh
Create policy sets using wsadmin.sh
Delete policy sets using wsadmin.sh
Add and remove policies using wsadmin.sh
Create policy sets
Policy configuration properties for all policies


Reference:

PolicySetManagement command group for AdminTask


+

Search Tips   |   Advanced Search