Repository navigation
feat(api): accept TENANT_AUTHZ_MODE=principal - #606
Conversation
The last PR-B slice. Everything principal mode decides on is in place: the pid claim and its refresh, relayed and delegated callers by principal, ADMIN_PRINCIPALS, principal-keyed membership and roles from a non-blocking snapshot, ZITADEL-only principals, and session revocation on unlink. ParseTenantAuthzMode stops refusing the value; whether the configuration can honour it (ADMIN_PRINCIPALS, the principal store, principals enabled) is still checked by validatePrincipalMode, now reachable through validate(). This changes no deployment: prod runs shadow, and the switch waits for the shadow window and its criterion (docs/principals.md). Refs #377 Claude-Session: https://claude.ai/code/session_0151SmHa5Uwfv9sm6G2XwDnE
|
Claude finished @mashkovd's task in 1m 23s —— View job Reviewing PR #606
Reviewed This PR flips No P1/P2 findings.
No build/test run was performed — this sandbox's Bash tool requires manual approval for Verdict: APPROVE (0 P1, 0 P2, 0 P3). |
Antigravity (agy) review — informationalModel: gemini-3.8-flash-medium · commit No significant issues found. |
Refs #377 (PR-B, last slice)
Why
ParseTenantAuthzModehas refusedprincipalsince PR-A, until the pieces principal mode decides on were in place. All of them are now on main:ADMIN_PRINCIPALS: feat(api): principal mode core for tenant authz (#377 PR-B slice 1) #595pidclaim in local tokens, carried by refresh: feat(auth): record the principal in local OAuth tokens (#377 PR-B 2a) #598What
ParseTenantAuthzModeacceptsprincipal. Every other value still refuses boot, and the error message now lists all three values.validatePrincipalMode(ADMIN_PRINCIPALS, principal store, principals enabled) is now reachable throughvalidate().TestConfigValidate_TenantAuthzModecovers it both ways:principalwith an incomplete config is still refused with every kill switch, and a complete config boots.What it does not do
It changes no deployment. Prod runs
shadow(gitopsTENANT_AUTHZ_MODE: "shadow"). The switch is a separate gitops change and waits for the shadow window (≥ 2026-10-19 ~21:35Z) and the switch criterion indocs/principals.md. B7 in gitops (wft-create-tenantwritingprincipalId) also lands before it.Mutation check: putting the refusal back fails
TestParseTenantAuthzModeandTestConfigValidate_TenantAuthzMode.🤖 Generated with Claude Code
https://claude.ai/code/session_0151SmHa5Uwfv9sm6G2XwDnE