Skip to content

Uniquely name coder cookies that get stripped for applications #3751

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

Closed
Emyrk opened this issue Aug 30, 2022 · 0 comments · Fixed by #3786
Closed

Uniquely name coder cookies that get stripped for applications #3751

Emyrk opened this issue Aug 30, 2022 · 0 comments · Fixed by #3786
Labels
api Area: HTTP API

Comments

@Emyrk
Copy link
Member

Emyrk commented Aug 30, 2022

Our cookie is named session_token which is quite generic. We strip this when forwarding application traffic, meaning any application hosted cannot use this cookie. I suggest we prefix all our cookies with coder_ to deconflict anything in future.

Cookie names:

coder/codersdk/client.go

Lines 23 to 25 in 3e30cdd

SessionTokenKey = "session_token"
OAuth2StateKey = "oauth_state"
OAuth2RedirectKey = "oauth_redirect"

Cookie Strip:

r.Header.Add("Cookie", httpapi.StripCoderCookies(cookieHeader))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants