Let a human token carry the zone it is issued into, without relabelling anyone
All checks were successful
Build and Publish Container Image / build-and-push (push) Successful in 46s
All checks were successful
Build and Publish Container Image / build-and-push (push) Successful in 46s
KEY-WP-0013-T05's tenant blocker did not need the decision it was waiting on. The two proposed resolutions differ in where a human's tenant comes from -- the directory record, or the client registration -- and an implementation exists that is correct under either, so the choice can be made later without another migration. A client registration may now declare a tenant. humanTenant() resolves it by four rules: no declaration keeps the directory answer unchanged; a declared zone applies where the directory has placed the user nowhere; agreement passes; and a declared zone conflicting with a directory assignment refuses issuance rather than relabelling the user. The refusal is the design, not an edge case. A registration can bind a zone for unplaced users and can never move a placed one, so this gets the approval chain its tenant:platform without writing a general cross-tenant override into the issuer. It fails closed rather than picking a winner, because either answer would be a silent cross-tenant assertion, and it reports 403 with error_type: tenant_binding so an operator can tell a misconfigured registration from a rejected login. If the owners later populate directory tenants, the same code stops supplying the zone and starts enforcing agreement with it. Safe only because client registrations are static and deployment-owned. The tenant contract records that this rule must be revisited if dynamic client registration is ever admitted. Tests cover all four rules; neutering the conflict check fails the relabel test rather than passing silently. T05 now waits on one thing only: the client_id and callback URI from informed-decision once it has a deployed origin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uV8zoCKpA1WRAxsKRYbdH Assistant: claude-code Assistant-Model: opus Assistant-Process: 1182213@bnt-lap001 Assistant-Session: 966597b9-ae61-46a4-8b9e-1594ab3ec4ad
This commit is contained in:
parent
a73da29093
commit
329e48f64a
13 changed files with 310 additions and 14 deletions
|
|
@ -230,7 +230,7 @@ id: KEY-WP-0013-T05
|
|||
status: wait
|
||||
priority: high
|
||||
assignee: the-custodian
|
||||
blocking_reason: "Owner found 2026-09-09 (informed-decision); client ID and deployed callback still pending INFD-WP-0001-T07, and a human token cannot carry tenant:platform yet."
|
||||
blocking_reason: "Client ID and deployed callback pending INFD-WP-0001-T07 from informed-decision. The tenant blocker is resolved in code."
|
||||
state_hub_task_id: "9a782909-91db-59fa-aae7-83766f4fbb0d"
|
||||
```
|
||||
|
||||
|
|
@ -289,8 +289,35 @@ design. KeyCape leans to (2) and deliberately implemented neither: (1) is a
|
|||
directory-ownership question and (2) writes a cross-tenant capability into the
|
||||
issuer.
|
||||
|
||||
Task stays `wait` on the tenant decision, then `client_id` and callback URI from
|
||||
INFD-WP-0001-T07 once that repo has a deployed origin.
|
||||
**Tenant blocker resolved in code, 2026-09-09.** On review the choice did not
|
||||
have to be made to unblock: the two resolutions differ in where a human's tenant
|
||||
*comes from*, and an implementation exists that is correct under either. A client
|
||||
registration may now declare a `tenant`, and `humanTenant()` resolves it by four
|
||||
rules — no declaration keeps the directory answer unchanged; a declared zone
|
||||
applies when the directory has placed the user nowhere; agreement passes; and a
|
||||
declared zone that **conflicts** with a directory assignment refuses issuance
|
||||
(`403`, `error_type: tenant_binding`) rather than relabelling the user.
|
||||
|
||||
That refusal is the whole design. A registration can bind a zone for unplaced
|
||||
users and can never move a placed one, so option (2) is available now without
|
||||
writing a general cross-tenant override into the issuer, and if the owners prefer
|
||||
option (1) the same code stops supplying the zone and starts enforcing agreement
|
||||
with it — no second migration and no window where a stale registration silently
|
||||
wins. It is safe only because registrations are static and deployment-owned;
|
||||
`docs/tenant-claim-contract.md` records that this rule must be revisited if
|
||||
dynamic client registration is ever admitted.
|
||||
|
||||
Evidence: `src/internal/server/oidc/human_tenant_test.go`, four cases including
|
||||
the relabel refusal. Verified with teeth — neutering the conflict check makes
|
||||
`TestHumanTenantRefusesToRelabelAPlacedUser` fail rather than pass silently.
|
||||
`docs/tenant-claim-contract.md` carries the resolution table,
|
||||
`docs/approval-engine-auth-contract.md` states the requirement on the approver
|
||||
client, and the provisioning packet now declares `tenant: tenant:platform`.
|
||||
|
||||
Task stays `wait` on one thing only: `client_id` and callback URI from
|
||||
INFD-WP-0001-T07, once informed-decision has a deployed origin. The owners were
|
||||
asked which resolution they prefer and have not answered; that answer is no
|
||||
longer blocking, and this implementation is compatible with either.
|
||||
|
||||
## Make negative rollout evidence discriminate actual issuer refusal
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue