-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Add support for setting SameSite and Secure attribute for auth cookie we set #5248
Conversation
"auth-token" cookie we set when authentication against st2api from st2web. For backward compatibility reasons it defaults to none.
I noticed we also don't set I will also add an option for that and default it to True since it's a best security practice. In case someone doesn't run StackStorm over https (bad idea), they will need to set it to False. I will open st2docs upgrade notes entry which documents how to do that. Also keep in mind that this cookie is pretty much only used when logging via token / api key in query parameters (which pretty much only means st2web for our official stuff). |
cookie we set and default it to True for security reasons. Also default SameSite attribute to Lax.
This reverts commit dde0617.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh. nice.
I have a doc wording suggestion committed, and a question about none
vs None
.
confusion between none and None.
@cognifloyd I pushed a change which renames Hopefully CI and tests will pass since my local dev environment is totally toast and I don't have multiple hours to spend to try to fix it at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. I'm not merging right now since we're in code freeze for the 3.6 release.
Now that v3.6.0 merge freeze is over, I will go ahead and merge it into master. |
This pull request includes a small "security hardening" change.
It allows operator to configure value for
SameSite
attribute (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite, https://web.dev/samesite-cookies-explained/) which is set with theauth-token
cookie we set in some situations (e.g. when authenticating via st2web and similar).The value defaults to
Lax
which should work as a good secure default (defining it to Strict may break some in some situations, see the link above).TODO