このページは、まだ日本語ではご利用いただけません。翻訳中です。
構成
このプラグインはDBレスモードに対応しています。
互換性のあるプロトコル
OAuth 2.0 Introspectionプラグインは以下のプロトコルに対応しています:
 grpc, grpcs, http, https
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
- 
    name or pluginstring requiredプラグイン名。この場合は oauth2-introspection。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドはnameです。
- Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドはpluginです。
 
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
- 
      instance_namestringプラグインのインスタンスを識別するための任意のカスタム名 (例: oauth2-introspection_my-service。インスタンス名はKong ManagerとKonnectに表示されるので、 例えば複数のサービスで同じプラグインを複数のコンテキストで実行する場合に便利です。また、Kong Admin API経由で特定のプラグインインスタンスに アクセスするためにも使用できます。 インスタンス名は、次のコンテキスト内で一意である必要があります。 - Kong Gateway Enterpriseのワークスペース内
- Konnectのコントロールプレーン(CP)またはコントロールプレーン(CP)グループ内
- Kong Gateway (OSS)の全世界
 
- 
      service.name or service.idstringプラグインが対象とするサービス名または ID。最上位の /pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。
- 
      route.name or route.idstringプラグインがターゲットとするルート名または ID。最上位の /pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。
- 
    enabledboolean default:trueこのプラグインが適用されるかどうか。 
- 
  configrecord required- 
  introspection_urlstring requiredA string representing a URL, such as https://example.com/path/to/resource?q=search. 
 - 
  ttlnumber default:30The TTL in seconds for the introspection response. Set to 0 to disable the expiration. 
 - 
  token_type_hintstringThe token_type_hintvalue to associate to introspection requests.
 - 
  authorization_valuestring required referenceable encryptedThe value to set as the Authorizationheader when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is theclient_idandclient_secretas a Base64-encoded Basic Auth string (Basic MG9hNWl...).
 - 
  timeoutinteger default:10000An optional timeout in milliseconds when sending data to the upstream server. 
 - 
  keepaliveinteger default:60000An optional value in milliseconds that defines how long an idle connection lives before being closed. 
 - 
  introspect_requestboolean required default:falseA boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers X-Request-PathandX-Request-Http-Methodwill be inserted into the introspect request.
 - 
  hide_credentialsboolean default:falseAn 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. 
 - 
  run_on_preflightboolean default:trueA boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONSpreflight requests. If set tofalse, thenOPTIONSrequests will always be allowed.
 - 
  anonymousstring len_min:0An 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 consumeridorusernameattribute, and not itscustom_id.
 - 
  consumer_bystring required default:usernameMust be one of:username,client_idA string indicating whether to associate OAuth2 usernameorclient_idwith the consumer’s username. OAuth2usernameis mapped to a consumer’susernamefield, while an OAuth2client_idmaps to a consumer’scustom_id.
 - 
  custom_introspection_headersmap requiredA list of custom headers to be added in the introspection request. 
 - 
  custom_claims_forwardset of typestringrequiredA 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}.
 
- 
  
 
                      