Class ClientKeysOptions
Governs how the server fetches a client's JWKS from its jwks_uri
(RFC 7517), used to verify things the client signed: JAR request objects (RFC 9101)
and private_key_jwt assertions (RFC 7523).
These are SSRF controls, not tuning knobs. The URL comes from the client record,
so a fetch makes the server issue an outbound request to an address someone else chose.
Without the restrictions below that is a probe into the internal network — including cloud
metadata endpoints such as 169.254.169.254, which hand out credentials to anyone
who can reach them. Loosen them only for local development.
public sealed class ClientKeysOptions
Inheritance
Properties
AllowPrivateNetworkTargets
Allow jwks_uri to resolve to loopback, private (RFC 1918), link-local or
public bool AllowPrivateNetworkTargets { get; set; }
CacheLifetime
How long a fetched JWKS is reused before a background refresh. Default: 12 hours.
public TimeSpan CacheLifetime { get; set; }
FetchTimeout
Timeout for a single JWKS fetch. Default: 5 seconds — an authorization request is
public TimeSpan FetchTimeout { get; set; }
MaxCachedKeySets
Most jwks_uri addresses whose key sets are kept at once. With open dynamic registration every new
public int MaxCachedKeySets { get; set; }
MaxDocumentBytes
Maximum accepted JWKS document size in bytes. Default: 512 KiB. A real key set is a
public int MaxDocumentBytes { get; set; }
MinimumRefreshInterval
Minimum interval between forced refreshes of the same URL. Bounds how often an
public TimeSpan MinimumRefreshInterval { get; set; }