fix(hub): preserve browser OIDC session handoff - #312
Merged
gnanirahulnutakki merged 1 commit intoJul 23, 2026
Conversation
Use an explicit Lax final session cookie so the safe console redirect receives the newly issued session after the cross-site IdP callback. Retain the host-only Secure and HttpOnly boundary, reject unsafe methods, and document the exact CSRF trade-off. GSTACK-Checkpoint: 2026-07-22/e8-oidc-session-handoff#1 Signed-off-by: Gnani Rahul Nutakki <gnani.nutakki@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SameSite=Strictto explicitSameSite=LaxRoot cause and security boundary
RFC6265bis withholds Strict cookies from top-level navigations triggered by a cross-site document context. The callback could set the session cookie successfully and then redirect to a console request that did not carry it.
Lax permits the safe top-level
GEThop but still excludes unsafe cross-site methods. The__Host-prefix,Secure,HttpOnly,Path=/, noDomain, bounded expiry, exact callback host/path, PKCE S256, state, nonce, single-use transaction, no return URL, server-side token exchange, and cookie exclusion from bearer APIs remain unchanged. Console data reads retain their purpose-bound custom same-origin proof.Primary source: https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#samesite-cookies
Verification
internal/hubserverrace suite: 10 consecutive passesmake ci: pass; zero lint findings and no reachable Go vulnerabilitiesmake e2e-isolation: pass; forced PostgreSQL RLS plus both 50,000-execution tenant fuzzersmake release-check: pass; reproducible archives, SPDX SBOM, formula, and release-derived multi-platform OCI layoutImmutable identity
ea6dff314cc4eb4e9054dc41a42d53651e5a1bcc277277ec34a0fe9f82a50ab7db54258962970b7dgnani.nutakki@gmail.comCloses #309
Part of #26