Skip to content

fix(auth): enforce WorkOS tenant isolation across API and UI - #1

Merged
dlynch90 merged 5 commits into
masterfrom
fix/emp-1574-workos-tenant-isolation
Nov 12, 2026
Merged

dlynch90 merged 5 commits into
masterfrom
fix/emp-1574-workos-tenant-isolation

Conversation

@dlynch90

@dlynch90 dlynch90 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace local passwords/global superuser access with verified WorkOS principals, canonical tenant membership, tenant-scoped profiles and database-enforced API namespace RLS.
  • Native-generated, reversible API-only Alembic chain preserves canonical public/workos/private owners.
  • Official AuthKit React and generated bearer clients enforce tenant/session cache teardown and cancellation. Production deployment remains separately gated.
  • Preserve native liveness; the estate overlay owns a distinct database-readiness route.

Verification

  • Actual PostgreSQL 17.11: complete backend suite passed (173 tests); native migration downgrade/replay and no-op autogeneration checks passed. This is isolated fixture evidence, not production recovery or live WorkOS proof.
  • Actual estate Compose-built image: database readiness 200, native liveness true, favicon 200 image/png; complete estate overlay suite passed (18 tests).
  • All 13 browser fixture scenarios passed locally against the built image, including inside the native Playwright image sharing the API network namespace, with no browser-security bypass and no retries.
  • Native commit/publication hooks passed: typos, Biome, Ruff, MyPy, Ty, zizmor and relevant syntax/large-file checks.
  • Hosted head 2906032: all four browser shards, browser aggregate/report merge, Docker Compose, pre-commit aggregate and zizmor passed. Test Backend failed at missing fixture inputs; it was not skipped or weakened.
  • CodeRabbit CLI reviewed the initial cutover with zero findings; the hosted CodeRabbit check is skipped on this draft, not a passing current-head review.

CI corrections

  • bac012f removes an unnecessary formatter from native SDK generation: temporary OpenAPI input is intentionally gitignored.
  • 2906032 fixes the real PKCE environment boundary: insecure HTTP Docker service hostnames lack crypto.subtle. Native service networking supplies trusted loopback, uses the declared browser origin and waits for backend liveness; no Chromium security override or weakened assertion.

Required admission — keep draft

  • Provide an approved existing isolated Supabase fixture and owner-managed API_TEST_DATABASE_URL, API_TEST_ADMIN_DATABASE_URL, API_TEST_MIGRATION_DATABASE_URL and API_TEST_ACTORS inputs. Visible inventory currently contains only production irlknjrfypumpsqbeaqi and catalog/staging mflwqmffctzvwyjiafyj, neither an approved destructive test fixture; no isolated branches are available.
  • No Pro subscription upgrade or new billing change is authorized. Production remains unchanged; a native logical dump read is not a durable backup/isolated restore.
  • Verify production custom AuthKit domain, redirect/logout/CORS settings, distinct runtime/migration secrets and genuine tenant/provider authentication/readback before deployment. Catalog/staging credentials remain separate.
  • Root estate admission and any protected merge remain independent; no deployment or three-branch merge success is claimed.

Work item: EMP-1574.

@linear

linear Bot commented Nov 8, 2026

Copy link
Copy Markdown

EMP-1574

@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@dlynch90
dlynch90 merged commit 14e1039 into master Nov 12, 2026
16 of 17 checks passed
@dlynch90
dlynch90 deleted the fix/emp-1574-workos-tenant-isolation branch November 14, 2026 21:07
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