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

인젝션 방지 정책 설정 참조

원문 보기 위키 갱신

인젝션 방지 정책 설정 참조 (Injection Protection Policy Configuration Reference)

이 문서는 Kong의 인젝션 방지 정책에서 설정할 수 있는 파라미터들을 JSON 스키마 형태로 보여주는 설정 참조 자료예요 검사할 인젝션 유형과 요청 내 검사 위치, 검사 실패 시 반환할 상태 코드와 메시지를 어떻게 지정하는지 확인할 수 있어요 기본 제공되는 유형 외에 custom_injections 항목으로 직접 만든 정규식을 추가할 수 있고, 차단(block)과 로그 기록(log_only) 중 정책의 시행 방식도 선택할 수 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "error_status_code": {
          "type": "integer",
          "maximum": 499,
          "minimum": 400,
          "description": "The response status code when validation fails.",
          "default": 400
        },
        "error_message": {
          "type": "string",
          "description": "The response message when validation fails",
          "default": "Bad Request"
        },
        "injection_types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "java_exception",
              "js",
              "sql",
              "sql_low_sensitivity",
              "ssi",
              "xpath_abbreviated",
              "xpath_extended"
            ]
          },
          "description": "The type of injections to check for.",
          "default": [
            "sql"
          ]
        },
        "locations": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "body",
              "headers",
              "path",
              "path_and_query",
              "query"
            ]
          },
          "description": "The locations to check for injection.",
          "default": [
            "path_and_query"
          ]
        },
        "custom_injections": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "A unique name for this injection."
              },
              "regex": {
                "type": "string",
                "description": "The regex to match against."
              }
            },
            "required": [
              "name",
              "regex"
            ]
          },
          "description": "Custom regexes to check for."
        },
        "enforcement_mode": {
          "type": "string",
          "enum": [
            "block",
            "log_only"
          ],
          "description": "Enforcement mode of the security policy.",
          "default": "block"
        }
      }
    }
  }
}

더 알아보기 (Learn more)

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