nic-6443 commented on code in PR #13178:
URL: https://github.com/apache/apisix/pull/13178#discussion_r3381593110
##########
apisix/plugins/openid-connect.lua:
##########
@@ -76,14 +104,59 @@ local schema = {
description = "the key used for the encrypt and HMAC
calculation",
minLength = 16,
},
+ cookie_name = {
+ type = "string",
+ description = "session cookie name",
+ },
+ cookie_path = {
+ type = "string",
+ description = "cookie path scope",
+ },
+ cookie_domain = {
+ type = "string",
+ description = "cookie domain scope",
+ },
+ cookie_secure = {
+ type = "boolean",
+ description = "if true, set the Secure cookie attribute",
+ },
+ cookie_http_only = {
+ type = "boolean",
+ description = "if true, set the HttpOnly cookie attribute",
+ },
+ cookie_same_site = {
+ type = "string",
+ enum = {"Strict", "Lax", "None", "Default"},
+ description = "SameSite cookie attribute",
+ },
+ idling_timeout = {
+ type = "integer",
+ description = "idling timeout in seconds",
+ },
+ rolling_timeout = {
+ type = "integer",
+ description = "rolling timeout in seconds",
+ },
+ absolute_timeout = {
+ type = "integer",
+ description = "absolute session lifetime in seconds",
+ },
cookie = {
type = "object",
+ description =
+ "Deprecated. Kept for backward compatibility with "
+ .. "the lua-resty-session 3.x schema. Use the flat "
+ .. "session.* options (cookie_name, absolute_timeout, "
+ .. "etc.) instead.",
properties = {
lifetime = {
type = "integer",
- description = "it holds the cookie lifetime in
seconds in the future",
- }
- }
+ description =
+ "Deprecated. Mapped to absolute_timeout at "
+ .. "runtime when absolute_timeout is not set.",
+ },
+ },
+ additionalProperties = false,
Review Comment:
Breaking means that previously, extra fields could be configured under the
key "cookie". Although this behavior was undefined, after we added
`additionalProperties = false`, APISIX will directly reject the old
configurations. This offers no benefit to our current PR. I will revise the
examples in my previous comment and remove the redundant `additionalProperties
= false`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]