Skip to content

fix: resolve hosted auth bootstrap deadlock#37

Open
sammargolis wants to merge 2 commits intoci/harden-checks-and-scopefrom
fix/auth-bootstrap-deadlock
Open

fix: resolve hosted auth bootstrap deadlock#37
sammargolis wants to merge 2 commits intoci/harden-checks-and-scopefrom
fix/auth-bootstrap-deadlock

Conversation

@sammargolis
Copy link
Collaborator

Summary

  • introduces token-only identity verification path for first-login bootstrap
  • keeps membership-enforced auth for protected hosted routes
  • bootstraps user/org/membership and sets HttpOnly session cookie after successful bootstrap

Security impact

  • separates authentication from authorization to avoid deadlock while preserving authz on protected endpoints
  • uses signed HttpOnly cookie for hosted session continuity

PHI handling impact

  • no additional PHI persistence introduced
  • audit events remain non-PHI structured records

Tests executed

  • pnpm build:test
  • pnpm exec tsc --project apps/web/tsconfig.json --noEmit
  • pnpm test:no-phi-logs

Rollback plan

  • revert this PR to return to prior auth bootstrap behavior

@sammargolis sammargolis force-pushed the fix/auth-bootstrap-deadlock branch 2 times, most recently from 7e737c7 to af25b38 Compare March 2, 2026 17:19
@sammargolis sammargolis force-pushed the fix/auth-bootstrap-deadlock branch from af25b38 to 61643ca Compare March 2, 2026 17:23
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