DataPower
Gateway

Redaction - DataPower Gateway (v5 compatible)

Use the Redaction policy to completely remove or to redact specified fields from the Request body, the Response body, and the activity logs. You might find this policy useful for removing or blocking out sensitive data (for example, credit card details) for legal, security, or other reasons.

Gateway support

Note: This topic describes the Redaction policy implementation in the DataPower® Gateway (v5 compatible). If you are using the DataPower API Gateway, see Redaction - DataPower API Gateway.

For information on the different types of gateway, see API Connect gateway types.

Table 1. Table showing which gateways support this policy, and the corresponding policy version
Gateway Policy version
DataPower Gateway (v5 compatible) 1.0.0

This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see redact - DataPower Gateway (v5 compatible).

About

Properties

The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.

Table 2. Redaction policy properties
Property label Required Description Data type
Title No The title of the policy.

The default value is redact.

string
Description No A description of the policy. string
Path Yes Specifies an XPath expression that defines the field to remove or redact.

You can construct an XPath expression that is based on JSON or XML depending on whether your API requests and responses use a JSON or an XML format. If the payload is JSON, use the DataPower XML representation of the JSON content (JSONx) to construct the expression.

Note: Use a JSONx representation only to identify the XPath expressions for the fields to remove or redact. Do not change the format of any response bodies in API Manager.

To learn more about constructing XPath expressions that are based on JSON or XML, see Constructing XPath expressions to redact fields.

string
Action Yes Specifies whether you want to remove or redact the field.
Valid values:
  • remove: Completely removes the specified field.
  • redact: Redacts (obfuscates with "*"s) the field to block out the data.

The default value is redact.

Note: If a numerical value is being redacted, the redacted value is depicted as ****** and the type is changed to string.
string
From Yes Specifies where to remove or redact the specified field from.
Valid values:
  • all: Removes or redacts the specified field from the Request body, the Response body, and the activity logs.
  • request: Removes or redacts the specified field from the Request body.
  • response: Removes or redacts the specified field from the Response body.
  • logs: Removes or redacts the specified field from the activity logs.

The default value is all.

Optionally click Add item to specify additional values.

string
Tip: You can optionally click Add item to specify XPath expressions for additional fields that you want to remove or redact from the Request body, Response body, and logs.