-
Notifications
You must be signed in to change notification settings - Fork 968
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
session is expired when secrets.cookie key is rotated #2272
Labels
bug
Something is not working.
Comments
mangalaman93
changed the title
secrets.cookie session is expired when keys are rotated
session is expired when secrets.cookie key is rotated
Feb 28, 2022
I also wonder whether that means cookies are not encrypted if we specify just one key in the |
We should update the doc here too if this is accepted https://www.ory.sh/docs/kratos/guides/secret-key-rotation |
Nice find man, thank you! |
aeneasr
added a commit
that referenced
this issue
Mar 4, 2022
Previously, a misconfiguration of Gorilla's session store caused incorrect handling of the configured secrets. From now on, cookies will also be properly encrypted at all times. BREAKING CHANGE: If you are using two or more secrets for the `secrets.session`, this patch might break existing Ory Session Cookies. This has the effect that users will need to re-authenticate when visiting your app. Closes #2272
aeneasr
added a commit
that referenced
this issue
Mar 6, 2022
Previously, a misconfiguration of Gorilla's session store caused incorrect handling of the configured secrets. From now on, cookies will also be properly encrypted at all times. BREAKING CHANGE: If you are using two or more secrets for the `secrets.session`, this patch might break existing Ory Session Cookies. This has the effect that users will need to re-authenticate when visiting your app. Closes #2272
aeneasr
added a commit
that referenced
this issue
Mar 6, 2022
Previously, a misconfiguration of Gorilla's session store caused incorrect handling of the configured secrets. From now on, cookies will also be properly encrypted at all times. BREAKING CHANGE: If you are using two or more secrets for the `secrets.session`, this patch might break existing Ory Session Cookies. This has the effect that users will need to re-authenticate when visiting your app. Closes #2272
aeneasr
added a commit
that referenced
this issue
Mar 7, 2022
Previously, a misconfiguration of Gorilla's session store caused incorrect handling of the configured secrets. From now on, cookies will also be properly encrypted at all times. BREAKING CHANGE: If you are using two or more secrets for the `secrets.session`, this patch might break existing Ory Session Cookies. This has the effect that users will need to re-authenticate when visiting your app. Closes #2272
peturgeorgievv
pushed a commit
to senteca/kratos-fork
that referenced
this issue
Jun 30, 2023
Previously, a misconfiguration of Gorilla's session store caused incorrect handling of the configured secrets. From now on, cookies will also be properly encrypted at all times. BREAKING CHANGE: If you are using two or more secrets for the `secrets.session`, this patch might break existing Ory Session Cookies. This has the effect that users will need to re-authenticate when visiting your app. Closes ory#2272
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preflight checklist
Describe the bug
I believe the description for
secrets.cookie
is not accurate. The link https://www.ory.sh/docs/kratos/reference/configuration has the following description -whereas the keys provided in this parameter is directly passed to the function from repo https://github.com/gorilla/securecookie which accepts a pair of keys, a hash key and an encryption key.
Reproducing the bug
In order to reproduce the bug, I followed the quickstart and ran kratos with following configuration -
I opened the self service UI and opened http://127.0.0.1:4455/ in my browser. I created an account and logged in.
Then, I updated the configuration to the following -
The I ran the following command to restart kratos -
Then, I went to my browser again and refreshed the page. I was hoping that I will still be logged in but the page showed that login form.
I updated the configuration back to the original configuration, restarted kratos, refreshed the browser page and it showed that I was logged in again.
Relevant log output
No response
Relevant configuration
No response
Version
oryd/kratos:v0.8.0-alpha.3
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: