Skip to content

add-binding-consumer-identity: fetch_identity is compared bare, so same-named principals in two tenants of one provider are a false shared-authority refusal with no field to escape it #511

Closed

Description

@brettheap

The gap

add-binding-consumer-identity raises shared-authority-identity whenever two bindings declare different holder_refs and the same fetch_identity — correctly, and independently of secret_ref. But fetch_identity is compared as a bare string, and the consumer: block carries no field naming the namespace that issued the identity (no tenant, directory, account or realm member; the block is holder_ref, fetch_identity, requirement_ref, shared_credential_acknowledged, instantiation_stub).

A principal name is unique only inside the directory that issues it. Two genuinely different principals, in two tenants of one provider, may both be called runtime_identity — and the record has no way to say so.

Reproduction

Prototyped from the ratified spec delta (the change ships no code yet), same method the convening's seats used:

credential_bindings:
  a:
    provider: azure_key_vault
    vault: kvA
    secret_ref: s1
    consumer: {holder_ref: tenantA-sync, fetch_identity: runtime_identity}
  b:
    provider: azure_key_vault
    vault: kvB
    secret_ref: s2
    consumer: {holder_ref: tenantB-sync, fetch_identity: runtime_identity}

Result: shared-authority-identity is raised. The two principals are not the same authority; they are two directories' identically-labelled principals. The refusal is a false positive the record cannot escape, because no member of the block can carry the distinction.

Control (confirming the rule is otherwise right): one principal genuinely shared across two vaults is reported, because the finding correctly ignores vault — so the identity comparison's direction is sound and only its scope is missing.

Why it matters more than a nuisance refusal

The estate cannot silence it truthfully. The only available workaround is renaming one fetch_identity in the record while the principal keeps its real name in the provider — which makes the record false, and is the misrepresentation add-notebook-hosting-credential-custody task 4.1 already refused. A refusal whose only escape is a lie is worse than the over-report.

Prescribed fix

Add an additive optional member to the consumer: block naming the issuing namespace — the directory, account or tenant within the provider — and compare on (namespace, fetch_identity), falling back to the bare identity where the member is absent so the rule still reports rather than clears.

Naming note carried from the convening: tenant / tenant_ref are not available — adopt-subject-tenant-domain-vocabulary reserves tenant for the tenant-operator layer (contracts/policies/layer-vocabulary.yaml), and reusing it would give a ratified word a second sense in the same contract family. realm is Keycloak-specific (add-identity-brokering). identity_namespace collides with nothing and follows the existing policy_namespace compound idiom.

Being a new member, it lands under this change's own declared-at-the-minor / constrained-at-the-major phasing, and it adds a ninth shape to the enumerated warning set.

Provenance

Found by the 2026-08-29 merge_readiness_council convening on PR #493, seat LS, finding LS-F3 (with #493 decision 9); ported on Brett Heap's 2026-08-30 ruling closing #493 as superseded by #497. Re-verified against #497's ratified text by prototype on 2026-08-30 — it applies to the ratified line, not only to the superseded draft.

Activity

  1. added
    enhancement
    on Aug 30, 2026
  2. brettheap commented on Sep 3, 2026

    @brettheap
    ContributorAuthor

    RULING (recorded by lane openxfactory-smalls, session 019SkomVcCsRnrwizM9DYUny, 2026-09-03T14:42Z): Brett Heap, 2026-09-03, on the lane's written recommendations for #561/#339, #318, #511, #553 and #543 fix (b): "implement your recommendations on all these". For this issue that resolves to:

    Add identity_namespace as an additive optional member of the consumer: block naming the issuing directory/account/tenant WITHIN the provider; shared-authority-identity compares on (identity_namespace, fetch_identity) and falls back to the bare identity when the member is absent, so the rule still REPORTS rather than clears. Lands under the change's declared-at-the-minor / constrained-at-the-major phasing as the ninth warning shape. Vehicle: an OpenSpec change on credential-contracts with a code surface (schema, validator, fixtures, CHANGELOG, manifest row); the contract CUT is NOT part of it and follows the release ritual.

    CLAIMED — lane openxfactory-smalls, session 019SkomVcCsRnrwizM9DYUny, 2026-09-03T14:42Z, for the work above. Checked: no PR or branch exists for it. Stale after 4h with no PR.

    Lane: openxfactory-smalls

  3. brettheap commented on Sep 3, 2026

    @brettheap
    ContributorAuthor

    CLAIM RE-STAMPED — lane openxfactory-smalls, session 01RhXyJoZvtSmGcTdPVDKPoD, 2026-09-03T20:18Z, PR opening now.

    Vehicle: add-consumer-identity-namespace. It also carries #553 — both rulings write the requirement "Two bindings on one secret are refused unless every pair declares distinct consumers…", and a ## MODIFIED Requirements block replaces a requirement wholesale, so they ride in ONE block.

    Lane: openxfactory-smalls

  4. added a commit that references this issue on Sep 4, 2026
    6ced5d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions