Skip to content

P1 E8: preserve browser OIDC session across the post-callback navigation #309

Description

@gnanirahulnutakki

Problem

The browser OIDC callback mints the final __Host-sith-session cookie with SameSite=Strict and immediately redirects to the workspace console.

A browser evaluates that console navigation inside a top-level navigation initiated by the external identity provider. Under RFC6265bis, Strict cookies are withheld from top-level navigations triggered by a cross-site document context. The first console request can therefore arrive without the newly minted session and appear unauthenticated.

Parent: #26.

Required fix

  • Mint the final session cookie with explicit SameSite=Lax so the safe top-level GET redirect can carry it.
  • Retain __Host-, Secure, HttpOnly, Path=/, no Domain, the bounded session expiry, and the server-only token flow.
  • Keep transaction state, nonce, PKCE S256, exact callback host/path validation, single-use consumption, and no-return-URL behavior unchanged.
  • Update focused tests and operator documentation so the interoperability and CSRF boundary are explicit.
  • Keep browser-session cookies excluded from bearer API authentication.

Acceptance criteria

  • The callback test locks the final cookie to SameSite=Lax and all other security attributes.
  • Unsafe cross-site methods remain outside the Lax exception; console state-changing reads continue to require the existing same-origin custom proof.
  • Focused race tests and repository quality, isolation, release, and real-cluster gates remain green.
  • Final independent review reports no unresolved finding.

Security and cost

Lax is a deliberate interoperability boundary, not the primary CSRF control. It allows only safe top-level cross-site navigation while the existing purpose-bound proof, safe-method-only console surface, host-only cookie prefix, TLS, PKCE, state, nonce, and server-side exchange remain authoritative. No cloud resource, egress path, storage, or recurring cost is added.

Primary source

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingphase-1Phase 1: read-only federationsecuritySecurity hardening / isolation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions