Skip to main content
Feedback

XML Threat Protection Policy Configuration Values

The following configuration values can be defined while configuring the XML Threat Protection policy on the Call Transformation page:

note
  • Only pre-processing is applicable for this policy. Post-processing is not applicable.
  • Setting a limit to -1 disables that check, allowing selective structural protection.
Field nameTypeField ValueRequired/OptionalDescription
Processing AdapterStringcom.mashery.proxy.protection.xml-threat-protectionRequiredAdapter that validates XML request bodies against configured structural limits and rejects threats with HTTP 400.
Perform Pre-processingBooleanEnabled / DisabledRequiredWhen enabled, the policy inspects the XML request body before forwarding the request to the backend.
Data to make available for pre-processing (PreInput Values)Map
Integer (-1 to specify no limit)maxElementsOptionalThe maximum number of elements allowed in an XML document. For example, <root><a>1</a><b></b></root> has three elements. Default: 1000.
Integer (-1 to specify no limit)maxDepthOptionalMaximum nesting depth of the XML structure. For example, <root><a><b>1</b></a></root> has a depth of two. Default: 100.
Integer (-1 to specify no limit)maxLengthOptionalThe maximum number of characters allowed for the entire XML document. Default: 1000.
Integer (-1 to specify no limit)maxAttributesPerElementOptionalThe maximum number of attributes allowed for a single XML element. Default: 100.
Integer (-1 to specify no limit)maxAttributeValueLengthOptionalThe maximum length of individual attribute values. Default: 100.
Integer (-1 to specify no limit)maxChildrenPerElementOptionalThe maximum number of child elements allowed for a given element. For example, <root><a><b>1</b><c>2</c></a></root> — element a has two children. Default: 100.
Integer (-1 to specify no limit)maxTextValueLengthOptionalThe maximum length of individual text node values. Default: 100.
Integer (-1 to specify no limit)maxEntitiesOptionalThe maximum number of entity expansions allowed. XML entities are a type of macro and are vulnerable to entity expansion attacks. Default: 100.
Integer (-1 to specify no limit)maxEntityDepthOptionalMaximum depth of nested entity expansions allowed. Default: 100.
BooleanallowExternalEntitiesOptionalWhether to allow the inclusion of external entities. Note: XML is vulnerable to XXE injection, so only enable this if your backend explicitly requires external entity resolution. Default: false.

Configuration Steps

Refer to Configuring Call Transformation for an Endpoint for more information on the configuration steps.

On this Page