keyid to a
credential differently, or not at all. This package makes the missing layer
testable, as conformance vectors plus reference verifiers, so implementations
can converge on one behavior.
- PyPI:
pip install algovoi-key-credential-binding(0.1.2) - npm:
@algovoi/key-credential-binding(0.1.1) - Self-hosted index:
pip install --index-url https://pip.algovoi.co.uk/simple/ algovoi-key-credential-binding - Source: monorepo package, vectors shared across Python and TypeScript; builds on rfc9421-verifier and rfc9421-signer.
Security advisory: scope bypass fixed in 0.1.2 / 0.1.1
Versions before Python 0.1.2 and npm 0.1.1 matched credential scope path prefixes with a raw string prefix test (CWE-863, incorrect authorization). A credential scoped to/v1/binding-receipts also admitted sibling resources
such as /v1/binding-receipts-evil. Fixed releases match prefixes only at a
path-segment boundary (path == prefix or path.startswith(prefix + "/")).
Affected: Python 0.1.0 and 0.1.1, npm 0.1.0 (now deprecated on the registry).
Fixed: Python 0.1.2, npm 0.1.1. Upgrade directly; the verifier API is
unchanged. The regression is locked by security probe S4 and conformance
vector kcb-v1-009/kcb-v1-005 coverage in both languages.
The four checks
A bound request is verified along four independent dimensions:valid holds only when all four hold. The dimensions are deliberately
separable so a failure in one is observable without collapsing into another.
Why key material comes from the credential
keyid is a lookup hint into verifier-held material, not a trust-root
selector. The verifier resolves the public key from its own credential
registry; it never fetches or reads key material nominated by the signer (an
embedded key, a jku, or an x5u). A signed artifact that nominates its own
trust root can be fabricated wholesale and still verify cleanly against the
key it supplies.
Vector kcb-v1-004 (keyid substitution) proves the point: an adversary signs
a request and spoofs an enrolled keyid. A binding verifier resolves the key
from the credential and rejects the forgery; a naive verifier that trusts a
key carried in the artifact accepts it. The vector generator asserts both
outcomes.