Data Mask Configuration
Configuration reference for the Data Mask plugin (`data-mask`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.
Parameters
See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.
request — array[object] · optional · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
An array of actions to mask sensitive information in the request.
type — string · required · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Valid values: query, header, or body
Location where sensitive information should be masked.
body_format — string · optional · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Valid values: json or urlencoded
Encoding of the request body. Required when type is body.
name — string · required · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Name of the information field that contains sensitive data. For JSON body, you can use JSONPath syntax.
action — string · required · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Valid values: regex, replace, or remove
Action to mask the sensitive data.
regex — string · optional · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Regular expressions to match the sensitive data. Required when action is regex.
value — string · optional · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Value to replace the sensitive data with. Required when action is regex or replace.
max_body_size — integer · optional · default: 1048576 · since APISIX 3.17.0 · API7 Gateway 3.2.9.2
Maximum body size allowed in bytes. If a request's body size exceeds the configured value, data masking rules will be ignored.
max_req_post_args — integer · optional · default: 100 · since APISIX 3.17.0 · API7 Gateway 3.2.14.1
Valid values: greater than or equal to 0
Maximum number of URL-encoded form fields to parse when masking request body data with body_format set to urlencoded.