본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

XML 위협 보호 정책 구성 참조

원문 보기 위키 갱신

XML 위협 보호 정책 구성 참조 (XML Threat Protection Policy Configuration Reference)

이 문서는 Kong의 XML 위협 보호 정책에 대한 구성 속성들을 JSON 스키마 형식으로 제공해요. 각 속성의 기본값과 설명을 통해 정책을 세부적으로 조정할 수 있도록 도와줘요. XML 처리 명령어 크기, 네임스페이스 수, 문서 크기 제한 등 다양한 보호 설정을 확인할 수 있어요.

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "pitarget": {
          "type": "integer",
          "description": "Maximum size of processing instruction targets.",
          "default": 1024
        },
        "pidata": {
          "type": "integer",
          "description": "Maximum size of processing instruction data.",
          "default": 1024
        },
        "bla_threshold": {
          "type": "integer",
          "minimum": 1024,
          "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.",
          "default": 8388608
        },
        "max_namespaces": {
          "type": "integer",
          "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.",
          "default": 20
        },
        "buffer": {
          "type": "integer",
          "description": "Maximum size of the unparsed buffer (see below).",
          "default": 1048576
        },
        "localname": {
          "type": "integer",
          "description": "Maximum size of the localname. This applies to tags and attributes.",
          "default": 1024
        },
        "entityname": {
          "type": "integer",
          "description": "Maximum size of entity names in EntityDecl.",
          "default": 1024
        },
        "entityproperty": {
          "type": "integer",
          "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.",
          "default": 1024
        },
        "allowed_content_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.",
          "default": []
        },
        "document": {
          "type": "integer",
          "description": "Maximum size of the entire document.",
          "default": 10485760
        },
        "namespaceuri": {
          "type": "integer",
          "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.",
          "default": 1024
        },
        "checked_content_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of Content-Type values with payloads that must be validated.",
          "default": [
            "application/xml"
          ]
        },
        "max_depth": {
          "type": "integer",
          "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.",
          "default": 50
        },
        "max_attributes": {
          "type": "integer",
          "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.",
          "default": 100
        },
        "attribute": {
          "type": "integer",
          "description": "Maximum size of the attribute value.",
          "default": 1048576
        },
        "text": {
          "type": "integer",
          "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).",
          "default": 1048576
        },
        "entity": {
          "type": "integer",
          "description": "Maximum size of entity values in EntityDecl.",
          "default": 1024
        },
        "bla_max_amplification": {
          "type": "number",
          "minimum": 1,
          "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.",
          "default": 100
        },
        "allow_dtd": {
          "type": "boolean",
          "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.",
          "default": false
        },
        "namespace_aware": {
          "type": "boolean",
          "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.",
          "default": true
        },
        "max_children": {
          "type": "integer",
          "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.",
          "default": 100
        },
        "comment": {
          "type": "integer",
          "description": "Maximum size of comments.",
          "default": 1024
        },
        "prefix": {
          "type": "integer",
          "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.",
          "default": 1024
        }
      }
    }
  }
}

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.