このページは、まだ日本語ではご利用いただけません。翻訳中です。
構成
このプラグインはDB-lessモードと部分的に互換性があります。
config.storage
must be set to cookie
. The kong
strategy uses
a database, and is not supported. The plugin currently lacks checks
for this invalid configuration in DB-less mode.
互換性のあるプロトコル
Sessionプラグインは以下のプロトコルに対応しています:
grpc
, grpcs
, http
, https
, tcp
, tls
, tls_passthrough
, udp
, ws
, wss
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
string required
プラグイン名。この場合は
session
。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
name
です。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
plugin
です。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
string
プラグインのインスタンスを識別するための任意のカスタム名 (例:
session_my-service
。インスタンス名はKong ManagerとKonnectに表示されるので、 例えば複数のサービスで同じプラグインを複数のコンテキストで実行する場合に便利です。また、Kong Admin API経由で特定のプラグインインスタンスに アクセスするためにも使用できます。
インスタンス名は、次のコンテキスト内で一意である必要があります。
- Kong Gateway Enterpriseのワークスペース内
- Konnectのコントロールプレーン(CP)またはコントロールプレーン(CP)グループ内
- Kong Gateway (OSS)の全世界
-
string
プラグインが対象とするサービス名または ID。最上位の
/plugins
エンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/plugins
を使用する場合は必要ありません。 -
string
プラグインがターゲットとするルート名または ID。最上位の
/plugins
エンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/plugins
を使用する場合は必要ありません。 -
boolean default:
true
このプラグインが適用されるかどうか。
-
record required
-
string referenceable encrypted default:
lt9BJW1n5RfhCxTbNIKqsj8THW7YNdXTA0VW6KQwBUwg
The secret that is used in keyed HMAC generation.
-
string default:
cookie
Must be one of:cookie
,kong
Determines where the session data is stored.
kong
: Stores encrypted session data into Kong’s current database strategy; the cookie will not contain any session data.cookie
: Stores encrypted session data within the cookie itself.
-
string default:
default
The session audience, which is the intended target application. For example
"my-application"
.
-
number default:
900
The session cookie idle time, in seconds.
-
number default:
3600
The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.
-
number default:
86400
The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.
-
number default:
10
The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.
-
string default:
session
The name of the cookie.
-
string default:
/
The resource in the host where the cookie is available.
-
string
The domain with which the cookie is intended to be exchanged.
-
string default:
Strict
Must be one of:Strict
,Lax
,None
,Default
Determines whether and how a cookie may be sent with cross-site requests.
-
boolean default:
true
Applies the
HttpOnly
tag so that the cookie is sent only to a server.
-
boolean default:
true
Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.
-
boolean default:
false
Enables or disables persistent sessions.
-
string default:
remember
Persistent session cookie name. Use with the
remember
configuration parameter.
-
number default:
604800
The persistent session rolling timeout window, in seconds.
-
number default:
2592000
The persistent session absolute timeout limit, in seconds.
-
set of type
string
Must be one of:id
,audience
,subject
,timeout
,idling-timeout
,rolling-timeout
,absolute-timeout
List of information to include, as headers, in the response to the downstream.
-
set of type
string
Must be one of:id
,audience
,subject
,timeout
,idling-timeout
,rolling-timeout
,absolute-timeout
List of information to include, as headers, in the response to the downstream.
-
boolean default:
false
-
set of type
string
default:POST, DELETE
Must be one of:GET
,POST
,DELETE
A set of HTTP methods that the plugin will respond to.
-
string default:
session_logout
The query argument passed to logout requests.
-
string default:
session_logout
The POST argument passed to logout requests. Do not change this property.
-
-
number
Deprecation notice:
-
number
Deprecation notice:
-
number
Deprecation notice:
-
number
Deprecation notice:
-
string
Deprecation notice:
-
boolean
Deprecation notice:
-
boolean
Deprecation notice: