-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to modify session parameters? #502
Comments
You will still need a cookie which holds the session-id. You can set the Same-site value for that via configuration (see the docs of lua-resty-session). The same-site value of Keycloak shouldn't matter much (and I would have expected it to be Lax, but don't know much about Keycloak). |
you should probably use your browser's developer tools to see whether the cookie is set, what it looks like and if it is sent back when you return from the OIDC provider. |
also, please note lua-resty-openidc uses lua-resty-session 3.x, be careful to read the matching docs. I don't know whether configuration has changed in the meantime. |
I've seen a closed issue which says it upgraded to lua-resty-session 4.0.3. Is this not in the most recent release? |
So a SameSite value of Lax in the settings of the to-be-protected-site should work? |
I tried with "set $session_cookie_samesite Lax;" The first request to protected.site.tld/ does a Set-Cookie session=...;SameSite=Lax. In the nginx error log I see now that the connection to keycloak is refused... strange. Other connections a few seconds before just worked. Is there a way to get a more useful error message or some kind of debug output? So far I see only ERR_INVALID_RESPONSE in Edge (could also be the corporate proxy I'm behind ATM). I will try to check tomorrow with Firefox/Chrome and no proxy. |
Hi,
I have the "no session state found" problem. Keycloak seems to set the same site policy to strict and it seems google Chrome will enforce that at some point,
As such I want to switch the sessions storage to something else, maybe a SQL table, or SHM storage, or file storage.
How can I do that?
Environment
Expected behaviour
Actual behaviour
Minimized example
I tried
but this doesn't work, still no session state found.
I tried
local res, err = require("resty.openidc").authenticate(opts, nil, nil, { cookie = { storage = "shm", shm = { zone = "sessions"} } })
but this doesn't work either, no session state found.
Configuration and NGINX server log files
Config and logs for the minimized example, possibly provided as attachments.
The text was updated successfully, but these errors were encountered: