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

OAuth 2.0 인트로스펙션 플러그인 구성 참조

원문 보기 위키 갱신

OAuth 2.0 인트로스펙션 플러그인 구성 참조 (OAuth 2.0 Introspection Plugin Configuration Reference)

이 문서는 OAuth 2.0 Introspection 플러그인에서 설정할 수 있는 모든 파라미터를 스키마 형태로 정리한 구성 참조 자료예요. 인트로스펙션 엔드포인트 URL, 인증 실패 시 익명 컨슈머 처리, 업스트림으로의 자격 증명 숨김 여부, 커스텀 클레임·헤더 전달 같은 각 필드의 기본값과 의미를 한눈에 확인할 수 있어요. 일부 필드는 vault 참조나 암호화가 가능하다는 표시도 함께 제공하니 설정 전에 꼼꼼히 살펴보면 좋아요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "anonymous": {
          "default": "",
          "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"
        },
        "authorization_value": {
          "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`). \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
          "type": "string",
          "x-encrypted": true,
          "x-referenceable": true
        },
        "consumer_by": {
          "default": "username",
          "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.",
          "enum": [
            "client_id",
            "username"
          ],
          "type": "string"
        },
        "custom_claims_forward": {
          "default": [],
          "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "custom_introspection_headers": {
          "additionalProperties": {
            "type": "string"
          },
          "default": {},
          "description": "A list of custom headers to be added in the introspection request.",
          "type": "object"
        },
        "hide_credentials": {
          "default": true,
          "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.",
          "type": "boolean"
        },
        "introspect_request": {
          "default": false,
          "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.",
          "type": "boolean"
        },
        "introspection_url": {
          "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.",
          "type": "string"
        },
        "keepalive": {
          "default": 60000,
          "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.",
          "type": "integer"
        },
        "run_on_preflight": {
          "default": true,
          "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.",
          "type": "boolean"
        },
        "timeout": {
          "default": 10000,
          "description": "An optional timeout in milliseconds when sending data to the upstream server.",
          "type": "integer"
        },
        "token_type_hint": {
          "description": "The `token_type_hint` value to associate to introspection requests.",
          "type": "string"
        },
        "ttl": {
          "default": 30,
          "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.",
          "type": "number"
        }
      },
      "required": [
        "authorization_value",
        "introspection_url"
      ],
      "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)