1. Home
  2. ...
  3. Security Interceptors
  4. XML Threat Protection

XML Threat Protection

Validation of XML contents against pre-defined name, structure and value limits.

XML Threat Protection is an interceptor that validates the contents of an XML, following pre-defined limits for a range of components. Thus, it avoids malicious attacks which send information outside the expected pattern.

To configure the interceptor, we have to fill in the fields of the image below with the desired values. You can read about all the pieces of information along this page.

Field: Name Limits

Element

It specifies the maximum name size for any element in the XML.

In the example above, we can set it to 12. Then, the interceptor will check if no name exceeds 12 characters.

Attribute

It specifies the maximum size for any attribute in the XML.

In this example, the interceptor will verify if the size of the attribute CustomerID is under the limit of characters defined in the settings.

Namespace prefix

It specifies the maximum number of characters for any prefix.

In this example, it will check the number of characters of the namespace sensedia, which is 8 characters.

Processing Instruction Target

It specifies the maximum number of characters for processing instruction targets.

In this example, it will check if xml-sensedia is under the maximum number of characters. In this case, xml-sensedia has 12 characters.

Field: Structure Limits

Node depth

It specifies the maximum depth allowed.

In the example above, the depth is 4.

Attribute count per element

It specifies the amount of attributes per element.

In this example, there are two attributes: customerID and CustomerID_web.

Namespace count per element

It specifies the number of namespaces per element.

In this example, there are three: xmlns:sensedia, xmlns:manager and manager:sensedia.

Child count

It specifies the number of children of any element.

In the case above, the element Customer has five children: CompanyName, ContactName, ContactTitle, Phone and FullAddress.

Field: Value Limits

Text

It specifies the maximum number of characters in the value of any element.

In this example, the value Marketing Manager has 17 characters.

Attribute

It specifies the maximum number of characters of the value of any attribute.

In the example above, the value 6s695dp84 of the attribute CustomerID has nine characters.

Namespace URI

It specifies the maximum number of characters in the value of any namespace.

In this example, http://sensedia.com has 19 characters.

Comment

It specifies the maximum number of characters in the value of any comment.

In this example, the comment has seven characters.

Processing Instruction Data

It specifies the maximum number of characters in the value of any processing instruction data.

In this example, utf-8 has five characters and 1.0 has two characters.

Errors

Here are the errors that can be returned when the interceptor finds any irregularity regarding the specifications above.

Error
HTTP Code Request
HTTP Code Response
XMLXML format invalid400500
Name Limits/ElementName limits element exceeds the maximum allowed for this API (n)400500
Name Limits/AttributeName limits attribute exceeds the maximum allowed for this API (n)400500
Name Limits/Namespace prefixName limits namespace prefix exceeds the maximum allowed for this API (n)400500
Name Limits/Processing Instruction TargetName limits processing instruction target exceeds the maximum allowed for this API (n)400500
Structure Limits/Node depthStructure limits node depth element exceeds the maximum allowed for this API (n)400500
Structure Limits/Attribute count per elementStructure limits attribute count per element exceeds the maximum allowed for this API (n)400500
Structure Limits/Namespace count per elementStructure limits namespace count per element exceeds the maximum allowed for this API (n)400500
Structure Limits/Child countStructure limits child count exceeds the maximum allowed for this API (n)400500
Value Limits/TextValue limits text exceeds the maximum allowed for this API (n)400500
Value Limits/AttributeValue limits attribute exceeds the maximum allowed for this API (n)400500
Value Limits/Namespace URIValue limits namespace URI exceeds the maximum allowed for this API (n)400500
Value Limits/CommentValue limits comment exceeds the maximum allowed for this API (n)400500
Value Limits/Processing Instruction DataValue limits processing instruction data exceeds the maximum allowed for this API (n)400500
Invalid Content-TypeXML threat protection validation failed: Invalid Content-Type in Header -> (Content type)415415
Content-Type not foundXML threat protection validation failed: Content-Type not found in Header415415

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more