OAuth 2.0 인증 플러그인 구성 참조
OAuth 2.0 인증 플러그인 구성 참조 (OAuth 2.0 Authentication Plugin Configuration Reference)
이 문서는 Kong Gateway의 OAuth 2.0 인증 플러그인에서 설정할 수 있는 모든 구성 파라미터를 정리한 참조 자료예요. Authorization Code, Client Credentials 같은 그랜트 플로우 활성화 여부부터 PKCE 처리 방식, 익명 컨슈머 지정, 스코프 필수 여부, 자격 증명 숨김 설정까지 각 필드의 타입과 기본값이 함께 담겨 있어요. 플러그인 스키마를 직접 확인하면서 내 서비스에 맞는 OAuth 2.0 구성을 만들 때 참고하면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"accept_http_if_already_terminated": {
"default": false,
"description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.",
"type": "boolean"
},
"anonymous": {
"description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.",
"type": "string"
},
"auth_header_name": {
"default": "authorization",
"description": "The name of the header that is supposed to carry the access token.",
"type": "string"
},
"enable_authorization_code": {
"default": false,
"description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).",
"type": "boolean"
},
"enable_client_credentials": {
"default": false,
"description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).",
"type": "boolean"
},
"enable_implicit_grant": {
"default": false,
"description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).",
"type": "boolean"
},
"enable_password_grant": {
"default": false,
"description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).",
"type": "boolean"
},
"global_credentials": {
"default": false,
"description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.",
"type": "boolean"
},
"hide_credentials": {
"default": true,
"description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.",
"type": "boolean"
},
"mandatory_scope": {
"default": false,
"description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.",
"type": "boolean"
},
"persistent_refresh_token": {
"default": false,
"type": "boolean"
},
"pkce": {
"default": "lax",
"description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.",
"enum": [
"lax",
"none",
"strict"
],
"type": "string"
},
"provision_key": {
"description": "The unique key the plugin has generated when it has been added to the Service. \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true
},
"realm": {
"description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.",
"type": "string"
},
"refresh_token_ttl": {
"default": 1209600,
"description": "Time-to-live value for data",
"maximum": 100000000,
"minimum": 0,
"type": "number"
},
"reuse_refresh_token": {
"default": false,
"description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.",
"type": "boolean"
},
"scopes": {
"description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.",
"items": {
"type": "string"
},
"type": "array"
},
"token_expiration": {
"default": 7200,
"description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.",
"type": "number"
}
},
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https",
"ws",
"wss"
],
"description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.",
"items": {
"enum": [
"grpc",
"grpcs",
"http",
"https",
"ws",
"wss"
],
"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)
- OAuth 2.0 인증 플러그인을 Kong Gateway에서 실제로 설정하는 절차를 단계별로 따라 할 수 있는 가이드예요 — Enable OAuth 2.0 authentication with Kong Gateway
- WebSocket 요청에도 OAuth 2.0 인증을 적용하는 방법을 다루는 실습 가이드예요 — Enable OAuth 2.0 authentication for WebSocket requests with Kong Gateway
- Kong OAuth2 토큰 인증과 OIDC를 함께 구성하는 방법을 설명해요 — Configure OIDC with Kong Oauth2 token authentication
- Kong Gateway가 제공하는 다양한 인증 방식을 전체적으로 살펴볼 수 있는 개요 문서예요 — Kong Gateway authentication