ADR 0026: A binding policy names who may bind which actor

Decision

A store states which subjects may bind which actor, and a binding outside that statement grants nothing. oidc.edn carries the policy under :bindings, per actor, as the issuers and subjects that may bind it:

{:audience "tik"
 :bindings {"ci" [{:issuer "https://token.actions.githubusercontent.com"
                   :subject "repo:metio/tik:ref:refs/heads/main"}]}}

This adds a fourth rule to the three in ADR 0023: the token’s subject, from its issuer, must be one the policy lets bind the actor the binding names. A subject is matched exactly, or as a prefix when the pattern ends in *; the pattern spells out its own separator, because a subject’s structure differs per issuer.

A bound key speaks for its actor only for events claimed inside the window of the token that bound it, with the same 60s leeway rule 3 allows. A signature by that key on an event claimed outside the window does not verify as the actor.

Context

ADR 0023 checks that a token is genuine, about the subject the binding names, live when the binding was written, and minted for this store’s audience. None of that says which actor the subject may speak for: the actor name is whatever the binding claims. A platform issuer serves every tenant at once. Every GitHub repository can obtain a token from the same issuer with any audience it asks for, so under ADR 0023 alone a workflow in any repository could bind ci, and verify would credit its key. The binding is signed only by the key it binds, so getting that event into the store is the only barrier — a write, a merged change, or a tik import, which accepts foreign bindings by design.

The same gap blocks any issuer whose subjects are structured names, such as a SPIFFE trust domain: spiffe://example.org/ns/release/sa/tik only means something once the store says which actor it may be.

The second rule follows from what the token vouches for. The IdP signed a window, typically minutes long. Crediting the key without limit let one leaked ephemeral key sign as the actor for as long as the store exists. GitHub’s tokens are valid for five minutes either side of issue; tik’s own release job signs everything within a second of binding.

Consequences

see history · edit this page