docs(adr): ADR-0095 — authz kernel chain: tenant isolation as Layer 0, posture ladder, capability-derived posture (B0 of #2920)#2924
Merged
Conversation
…, monotonic posture ladder, capability-derived posture B0 of tracking issue #2920. Records the kernel-chain decisions (D1 Layer 0 extraction, D2 posture ladder incl. locked EXTERNAL semantics, D3 capability-derived posture), scopes ADR-0073's cross-tenant-RLS claim to the physical topology, documents the OR-merge spec-vs-impl divergence (W1), and rejects the Postgres-native RLS backstop per maintainer decision. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QRUvVfpvSycAHMMF2xTxs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
9 tasks
os-zhuang
marked this pull request as ready for review
July 14, 2026 15:23
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
B0 of tracking issue #2920 — the kernel-chain ADR that must land before B1/B2/B4 start. The number moves to 0095 because 0094 is taken by the permission-set pure-projection ADR (the v1 tracking issue referenced "ADR-0094" for this chain; that reference was stale).
Decisions recorded:
tenancyservice. The seeded wildcardtenant_isolationpolicy retires once Layer 0 enforces.PLATFORM_ADMIN > TENANT_ADMIN > MEMBER > EXTERNAL, resolved once inresolveAuthzContext, exactly one row-visibility injection rule per rung, strict nesting as the tested invariant. EXTERNAL semantics (explicit shares only, never OWD) are defined and test-locked now; enforcement ships when an external principal type exists.role='admin'demoted to a grant source; no enforcement-time path consults the role directly (ends the ADR-0092 D4/D5: sys_user 编辑对"同时持有 organization_admin 的平台管理员"被权限合成挡住(explicit deny 胜 wildcard allow) #2836 dual-track adjudication class).Findings surfaced while drafting (worth reviewer attention)
RLSCompiler.compileFilterOR-combines all applicable policies — the wildcardtenant_isolationpolicy is just one disjunct, so a permissive business row rule is (at the RLS layer) sufficient to admit foreign-org rows. The ADR makes resolving this a deliberate, called-out behavior change within otherwise behavior-preserving work.multishared-DB mode.Reviewer checklist
rls-compiler.ts/computeRlsFiltertenant_isolationpolicy is acceptable release-notes-wiseDocs-only change; no runtime surface. Verification = review of the decision text against the cited code (
rls-compiler.ts,security-plugin.tscomputeRlsFilter,default-permission-sets.ts,resolve-authz-context.ts,permission-evaluator.ts).Relates: #2920 (B0) · #2836 · ADR-0002/0066/0073/0093/0094
🤖 Generated with Claude Code
https://claude.ai/code/session_019QRUvVfpvSycAHMMF2xTxs
Generated by Claude Code