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

JSON 위협 방지 플러그인 구성 참조

원문 보기 위키 갱신

JSON 위협 방지 플러그인 구성 참조 (JSON Threat Protection Plugin Configuration Reference)

이 문서는 Kong의 JSON Threat Protection 플러그인에서 설정할 수 있는 모든 구성 옵션을 스키마 형태로 정리한 참조 자료예요. 요청 본문 크기, 배열 요소 수, 객체 중첩 깊이, 문자열 길이 같은 JSON 구조 제한값과 함께 위반 시 반환할 오류 상태 코드·메시지, 차단 또는 로그 전용 동작을 지정하는 방법을 항목별로 확인할 수 있어요. 각 필드의 기본값, 허용 범위, 데이터 타입이 명시되어 있어서 플러그인을 처음 구성하거나 기존 설정 값을 조정할 때 그대로 참고하기 좋아요.

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "allow_duplicate_object_entry_name": {
          "default": true,
          "description": "Allow or disallow duplicate object entry name.",
          "type": "boolean"
        },
        "allow_non_json_requests": {
          "default": false,
          "description": "Allow non-json requests to bypass the rules",
          "type": "boolean"
        },
        "enforcement_mode": {
          "default": "block",
          "description": "Enforcement mode of the security policy.",
          "enum": [
            "block",
            "log_only"
          ],
          "type": "string"
        },
        "error_message": {
          "default": "Bad Request",
          "description": "The response message when validation fails",
          "type": "string"
        },
        "error_status_code": {
          "default": 400,
          "description": "The response status code when validation fails.",
          "maximum": 499,
          "minimum": 400,
          "type": "integer"
        },
        "max_array_element_count": {
          "default": -1,
          "description": "Max number of elements in an array. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        },
        "max_body_size": {
          "default": 8192,
          "description": "Max size of the request body. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        },
        "max_container_depth": {
          "default": -1,
          "description": "Max nested depth of objects and arrays. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        },
        "max_object_entry_count": {
          "default": -1,
          "description": "Max number of entries in an object. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        },
        "max_object_entry_name_length": {
          "default": -1,
          "description": "Max string length of object name. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        },
        "max_string_value_length": {
          "default": -1,
          "description": "Max string value length. -1 means unlimited.",
          "maximum": 2147483648,
          "minimum": -1,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

관련 리소스

더 알아보기 (Learn more)