Expand description
Read authentication (RFC-ACDP-0008 §6.2, 0.5.0 bearer_jwt).
A registry that serves non-public contexts, or that sets
anonymous_public_reads: false, answers an unauthenticated read with
not_authorized. Revocation discovery against such a vantage is then
unknown (unanswerable), never not-revoked. An AuthProvider
attached to a RegistryClient or a
CrossRegistryResolver makes those reads
answerable by presenting Authorization: Bearer <token> (RFC 6750).
The provider is asked for a token per request, by authority — the
host (plus non-default port) of the registry being read. A
bearer_jwt token’s aud is the registry that minted it, and that
registry MUST reject any other audience; asking by authority keeps one
registry’s token from ever being presented to another, including on a
cross-registry walk. Minting the token (the signed-challenge exchange)
is deployment-defined and outside the protocol, so it is the provider’s
job; this crate only presents what the provider returns.
Tokens are attached only to read requests (retrieve, lineage,
current, search), only over https, and never on a redirect to another
authority (the client follows same-authority redirects only). A bearer
token never substitutes for a producer signature on a write
(RFC-ACDP-0008 §6.2), so publish* never sends one, and neither does
the public capabilities fetch.
Structs§
- Bearer
Token - A bearer token.
DebugandDisplaynever print it. - PerAuthority
Tokens - A token per authority, replaceable at runtime — the shape a
CrossRegistryResolverwalk across several registries needs. Cheap to clone (anArchandle); a clone shares the table, so a background task can refresh tokens withSelf::setwhile readers use them. - Static
Bearer Token - One token for exactly one authority. Use on a
RegistryClientthat talks to a single registry.
Traits§
- Auth
Provider - Supplies read credentials per registry authority (RFC-ACDP-0008 §6.2).
Type Aliases§
- Auth
Future - The boxed future an
AuthProviderreturns. Boxed because the trait is used asdyn AuthProviderand the MSRV (1.86) has noasync fnin object-safe traits.