Skip to content

improve: use __Secure- cookie prefix and remove domains config#87

Merged
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:improve-use-secure-cookie-name
Jan 28, 2024
Merged

improve: use __Secure- cookie prefix and remove domains config#87
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:improve-use-secure-cookie-name

Conversation

@thesuperzapper

Copy link
Copy Markdown
Member

This PR prepends __Secure- to our token cookie name when deploykf_core.deploykf_istio_gateway.gateway.tls.clientsUseHttps is true (indicating that users are connecting to deplopyKF over HTTPS), as browsers require HTTPS for the Secure attribute to be set, which itself is required to use the __Secure- prefix.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#__host-

We also set cookie_domains to an empty list in our oauth2-proxy configs, as previously oauth2-proxy was spamming [WARNING] ... logs because it could not match the cookie domain to requests (when using non-standard ports). This change should have no effect, as deployKF currently always uses the same deploykf_core.deploykf_istio_gateway.gateway.hostname for all services so there is no reason to "force" a specific top-level one.

@thesuperzapper thesuperzapper added this to the v0.1.4 milestone Jan 28, 2024
@thesuperzapper
thesuperzapper merged commit 7d1cd5e into deployKF:main Jan 28, 2024
@thesuperzapper
thesuperzapper deleted the improve-use-secure-cookie-name branch January 28, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant