-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[installer] Add JWT cookie opts to config WEB-101 #17332
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
Conversation
Issuer: fmt.Sprintf("https://%s", ctx.Config.Domain), | ||
Cookie: CookieConfig{ |
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.
This becomes the canonical place to set the JWT cookie properties across both components.
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.
I understand why we need to pull this config out. But honestly, it's nothing we should configure as we need.
Would love to see a "CAUTION" comment here. Incl. some comments on the config settings, esp. highlighting the security implications. 🧡
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.
Will do. It's not exposed to the installer (as config for the installer), just a way to share the config between the components, which should limit the exposure
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.
Added
eafe2aa
to
bc6f64d
Compare
42fe56c
to
8b6eb2b
Compare
8b6eb2b
to
e725cca
Compare
|
||
import "testing" | ||
|
||
func TestCookieNameFromDomain(t *testing.T) { |
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.
Largely generated by ChatGPT, with a prompt to take the JS implementation of this and convert, including write table tests
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.
Works! 🎉
Thanks for the review! /unhold |
Description
We want to be able to create/read cookies on both Public API and Server. For that, we should have a shared understanding of the cookie names to look for when extracting the (JWT) session.
auth.session.cookie
config, used by both server and public-apiRelated Issue(s)
How to test
Unit tests
Preview
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options:
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish Options
Installer Options
Add desired feature flags to the end of the line above, space separated
Preview Environment Options:
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
/hold