Expand description
The OpenID Connect half of the proof check: an issuer’s discovery
document, its key set, and the claims the named account’s
bot.did.credential identities say must match.
Every fetch here goes to a URL the token names, so each one is resolved
and pinned through didbot_http::pinned_client.
Structs§
- Jwks
Cache - The key sets of the issuers this server has read, each for ten minutes
(
JWKS_TTL).
Constants§
- DEFAULT_
OIDC_ FRESHNESS - How old an OpenID Connect token’s
iatmay be, absent configuration. - JWKS_
ISSUERS 🔒 - How many issuers’ key sets are held at once. Past it the set fetched longest ago makes room: an issuer a hosted account named is one of a handful, not thousands.
- JWKS_
TTL 🔒 - How long a fetched JWKS is reused before it is fetched again.
Functions§
- acceptable_
issuer 🔒 - Whether
issueris one this server will fetch keys from: on the deployment’s list when it has one, over HTTPS — or plain HTTP on this host where a development stack allows it. - claims_
match 🔒 - Whether
claims, an ID token’s payload, carries every claimidentitynames, with its value. Each is found by itsClaim::pointer: a name beginning with/is a JSON pointer (RFC 6901) into the claims, for a platform that nests them (/kubernetes.io/namespace), and any other name is a top-level claim. - issuer_
client 🔒 - The client a fetch of
urlgoes through: its host resolved once, refused at a private address, pinned to what it resolved to so the connection cannot land elsewhere, and following no redirect, which would land it elsewhere all the same. - jwks_
client 🔒 - The client the issuer’s key set is fetched through. Discovery may put
the keys on another host — Google’s sit on
www.googleapis.com— so that host is checked and pinned the way the issuer’s was. The URL keeps the issuer’s scheme and carries no credentials:https://issuer@host/is a fetch fromhost, whatever it begins with. - prove_
by_ 🔒oidc - Verifies an OpenID Connect ID token against its issuer’s keys, and
against the identities of
did, the account the request named. One of that account’s identities at the token’s issuer matching is enough.