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

헤더 기반 인증서 인증 플러그인 설정 레퍼런스

원문 보기 위키 갱신

헤더 기반 인증서 인증 플러그인 설정 레퍼런스 (Header Cert Authentication Plugin Configuration Reference)

이 문서는 Kong Gateway의 인증서 인증(Cert Authentication) 플러그인에서 설정할 수 있는 옵션을 한곳에 모아 정리한 설정 레퍼런스예요. WAF나 L7 프록시가 헤더로 전달한 클라이언트 인증서를 검증하는 방식부터 CA 인증서 지정, 익명 컨슈머 처리, 캐시 만료 시간 같은 세부 동작까지 항목별 기본값과 설명을 확인할 수 있어요. 인증서 기반 인증을 내 환경에 맞게 세밀하게 조정하고 싶을 때 참고하면 좋아요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "allow_partial_chain": {
          "default": false,
          "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.",
          "type": "boolean"
        },
        "anonymous": {
          "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.",
          "type": "string"
        },
        "authenticated_group_by": {
          "default": "CN",
          "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.",
          "enum": [
            "CN",
            "DN"
          ],
          "type": "string"
        },
        "ca_certificates": {
          "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "cache_ttl": {
          "default": 60,
          "description": "Cache expiry time in seconds.",
          "type": "number"
        },
        "cert_cache_ttl": {
          "default": 60000,
          "description": "The length of time in milliseconds between refreshes of the revocation check status cache.",
          "type": "number"
        },
        "certificate_header_format": {
          "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.",
          "enum": [
            "base64_encoded",
            "url_encoded"
          ],
          "type": "string"
        },
        "certificate_header_name": {
          "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.",
          "type": "string"
        },
        "consumer_by": {
          "default": [
            "custom_id",
            "username"
          ],
          "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.",
          "items": {
            "enum": [
              "custom_id",
              "username"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "default_consumer": {
          "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.",
          "type": "string"
        },
        "http_proxy_host": {
          "description": "A string representing a host name, such as example.com.",
          "type": "string"
        },
        "http_proxy_port": {
          "description": "An integer representing a port number between 0 and 65535, inclusive.",
          "maximum": 65535,
          "minimum": 0,
          "type": "integer"
        },
        "http_timeout": {
          "default": 30000,
          "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.",
          "type": "number"
        },
        "https_proxy_host": {
          "description": "A string representing a host name, such as example.com.",
          "type": "string"
        },
        "https_proxy_port": {
          "description": "An integer representing a port number between 0 and 65535, inclusive.",
          "maximum": 65535,
          "minimum": 0,
          "type": "integer"
        },
        "revocation_check_mode": {
          "default": "IGNORE_CA_ERROR",
          "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.",
          "enum": [
            "IGNORE_CA_ERROR",
            "SKIP",
            "STRICT"
          ],
          "type": "string"
        },
        "secure_source": {
          "default": true,
          "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).",
          "type": "boolean"
        },
        "skip_consumer_lookup": {
          "default": false,
          "description": "Skip consumer lookup once certificate is trusted against the configured CA list.",
          "type": "boolean"
        },
        "ssl_verify": {
          "default": true,
          "description": "This option enables verification of the certificate presented by the server of the OCSP responder's URL and by the server of the CRL Distribution Point.",
          "type": "boolean"
        }
      },
      "required": [
        "ca_certificates",
        "certificate_header_format",
        "certificate_header_name"
      ],
      "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"
    }
  },
  "required": [
    "config"
  ]
}

관련 리소스

더 알아보기 (Learn more)

  • 인증서 기반 인증이 Kong Gateway 인증 체계에서 어떤 자리를 차지하는지 큰 그림을 볼 수 있어요 — About authentication
  • 설정의 ca_certificates 항목에서 참조하는 CA 인증서 엔티티의 구조와 관리 방법을 설명해요 — CA Certificates