このページは、まだ日本語ではご利用いただけません。翻訳中です。
古いプラグインバージョンのドキュメントを閲覧しています。
構成
このプラグインは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.
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
name or plugin
string requiredプラグイン名。この場合は
session。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
nameです。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
pluginです。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
service.name or service.id
stringプラグインが対象とするサービス名または ID。最上位の
/pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。 -
route.name or route.id
stringプラグインがターゲットとするルート名または ID。最上位の
/pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。 -
enabled
boolean default:trueこのプラグインが適用されるかどうか。
-
config
record required-
secret
string referenceable encrypted default:UnXKQHe8y4hyiLqpH0BX9pSz4blZuZvIFhg11Zv87dEeThe secret that is used in keyed HMAC generation.
-
cookie_name
string default:sessionThe name of the cookie.
-
cookie_lifetime
number default:3600The duration in seconds that the session will remain open.
-
cookie_idletime
numberThe cookie idle time (in seconds); if a cookie is not used for this time period, the session becomes invalid. This value is not set by default, meaning idle time checks are disabled.
-
cookie_renew
number default:600The remaining duration in seconds of a session at which point the Plugin renews the session.
-
cookie_path
string default:/The resource in the host where the cookie is available.
-
cookie_domain
stringThe domain with which the cookie is intended to be exchanged.
-
cookie_samesite
string default:StrictMust be one of:Strict,Lax,None,offDetermines whether and how a cookie may be sent with cross-site requests.
-
Strict: The browser sends cookies only if the request originated from the website that set the cookie. -
Lax: Same-site cookies are withheld on cross-domain subrequests, but are sent when a user navigates to the URL from an external site, for example, by following a link. -
Noneoroff: Disables the same-site attribute so that a cookie may be sent with cross-site requests.Nonerequires the Secure attribute (cookie_secure) in latest browser versions. For more information, see the SameSite cookies docs on MDN.
-
-
cookie_httponly
boolean default:trueApplies the
HttpOnlytag so that the cookie is sent only to a server. See the Restrict access to cookies docs on MDN.
-
cookie_secure
boolean default:trueApplies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol. See the Restrict access to cookies docs on MDN.
-
cookie_discard
number default:10The duration in seconds after which an old session’s TTL is updated that an old cookie is discarded.
-
storage
string default:cookieMust be one of:cookie,kongDetermines 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.
-
logout_methods
array of typestringdefault:POST, DELETEMust be one of:GET,POST,DELETEThe methods that may be used to end sessions: POST, DELETE, GET.
-
logout_query_arg
string default:session_logoutThe query argument passed to logout requests.
-
logout_post_arg
string default:session_logoutThe POST argument passed to logout requests. Do not change this property.
-