Override Scoped Policy Configuration Properties

If a policy referenced in a policy set contains overridable properties, you can override the existing value of the property for that policy set using the Policy Set REST API.

The cURL command examples use the URL structure:
http(s)://host:port/wsm-pmrest/v2/policyset/{name}/policyreference/{policyuri}/configoverride

The following use case shows you how to:

  • Add scoped configuration overrides

  • View scoped configuration overrides

  • Delete scoped configuration overrides

To manage the configuration overrides:

  1. Specify the headers on the cURL command line:
    -H Accept:application/json
  2. Add two overriding configuration properties keystore.sig.csf.key and keystore.enc.csf.key keystores to the policy reference oracle/wss_username_token_service_policy by running the following command:
    curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/policyset/{name}/policyreference/{policyuri}/configoverride

    Example

    curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/myPolicySet1/policyreference/oracle%2wss_username_token_service_policy

    Note:

    In the URL, the "/" character in the name of a policy is encoded with "2%F"

    See Set Scoped ConfigOverride(s).

    The following shows an example of the request body.

    [
      {
        "name": "keystore.sig.csf.key",
        "value": "myKey1"
      },
      {
        "name": "keystore.enc.csf.key",
        "value": "myKey2"
      }
    ]

    The following shows an example of the response indicating the request succeeded.

    {
      "STATUSCODE": "20021",
      "MESSAGE": "Configoverride [keystore.enc.csf.key, keystore.sig.csf.key] are successfully added."
    }
  3. View the configuration properties for a policy reference by running the following command:
    curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/policyset/{name}/policyreference/{policyuri}/configoverride

    Example

    curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/policyset?type=ws-service

    See Get all Scoped ConfigOverride(s).

    The following shows an example of the response body:

    [
      {
        "name": "keystore.sig.csf.key",
        "value": "myKey1"
      },
      {
        "name": "keystore.enc.csf.key",
        "value": "myKey2"
      }
    ]
  4. Optionally, delete a specific configuration property from the policy reference oracle/wss_username_token_service_policy by running the following command:
    curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/policyset/{name}/policyreference/{policyuri}/configoverride/{propname}

    Example

    curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/myPolicySet1/policyreference/oracle%2wss_username_token_service_policy/keystore.enc.csf.key

    See Delete One Scoped ConfigOverride.

    The following shows an example of the response indicating the request succeeded.

    {
      "STATUSCODE": "20024",
      "MESSAGE": "Configoverride [keystore.enc.csf.key] are successfully deleted."
    }
  5. Optionally, delete all the configuration override properties by running the following command:
    curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/policyset/{name}/policyreference/{policyuri}/configoverride

    Example

    curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/myPolicySet1/policyreference/oracle%2wss_username_token_service_policy

    See Delete all Scoped ConfigOverride(s).

    The following shows an example of the response indicating the request succeeded.

    {
      "STATUSCODE": "20024",
      "MESSAGE": "Configoverride [keystore.sig.csf.key, keystore.enc.csf.key] are successfully deleted."
    }