このページは、まだ日本語ではご利用いただけません。翻訳中です。
構成
このプラグインはDB-lessモードと部分的に互換性があります。
Consumers and Credentials can be created with declarative configuration.
Admin API endpoints that do POST, PUT, PATCH, or DELETE on Credentials are not available on DB-less mode.
互換性のあるプロトコル
Key Authプラグインは以下のプロトコルに対応しています:
 grpc, grpcs, http, https, ws, wss
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
- 
    name or pluginstring requiredプラグイン名。この場合は key-auth。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドはnameです。
- Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドはpluginです。
 
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
- 
      instance_namestringプラグインのインスタンスを識別するための任意のカスタム名 (例: key-auth_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- 
  key_namesarray of typestringrequired default:apikeyDescribes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen. 
 - 
  hide_credentialsboolean required default:falseAn optional boolean value telling the plugin to show or hide the credential from the upstream service. If true, the plugin strips the credential from the request.
 - 
  anonymousstringAn optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure 4xx.
 - 
  key_in_headerboolean required default:trueIf enabled (default), the plugin reads the request header and tries to find the key in it. 
 - 
  key_in_queryboolean required default:trueIf enabled (default), the plugin reads the query parameter in the request and tries to find the key in it. 
 - 
  key_in_bodyboolean required default:falseIf enabled, the plugin reads the request body. Supported MIME types: application/www-form-urlencoded,application/json, andmultipart/form-data.
 - 
  run_on_preflightboolean required default:trueA boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONSpreflight requests. If set tofalse, thenOPTIONSrequests are always allowed.
 - 
  realmstringWhen authentication fails the plugin sends WWW-Authenticateheader withrealmattribute value.
 - 
  identity_realmsset of typerecorddefault:{"scope"=>"cp", "region"=>nil, "id"=>nil}A configuration of Konnect Identity Realms that indicate where to source a consumer from. - 
  scopestring Must be one of:cp,realm
 - 
  idstringA string representing a UUID (universally unique identifier). 
 - 
  regionstring
 
- 
  
 
- 
  
 
                      