Skip to content

fix(auth): preserve Basic query permissions during browser login - #56

Merged
VibeSWE merged 1 commit into
mainfrom
t3/retain-basic-auth-cache
Oct 21, 2026
Merged

VibeSWE merged 1 commit into
mainfrom
t3/retain-basic-auth-cache

Conversation

@VibeSWE

@VibeSWE VibeSWE commented Oct 21, 2026 •

Copy link
Copy Markdown

Browser login with the same credentials as an in-flight Basic-auth query could remove that query's cached session between middleware authorization and the handler's permission lookup. The query then returned User does not have access to stream despite valid credentials.

Keep the credential-keyed Basic session when issuing the browser cookie. Password changes and deletion still invalidate both tracked sessions; role changes still refresh both. Cookie logout and expiration remain session-specific.

Validation:

  • All 22 rbac::lock_order_tests pass using the full native Rust test target.
  • The new deterministic interleaving test fails against the original oidc.rs on c5e1e08f because the Basic session disappears, and passes with this fix.
  • Revocation, cookie expiration and existing lock-order race tests are included; rustfmt and git diff --check pass.
  • Independent Sol 6.1 review found no actionable security or correctness regression.

This fixes the transient authorization failure discovered during PR #55 validation. Staging conversion visibility and Parquet-file lifetime are separate fixes; no Prism/UI changes are included.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@VibeSWE
VibeSWE merged commit 3924137 into main Oct 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant