Subscribe to the Non-Human & AI Identity Journal

How do OIDC discovery and JWKS fit into identity governance?

OIDC discovery tells verifiers where to find the JWKS endpoint, while the JWKS endpoint publishes the public keys used to validate tokens. Governance teams should ensure the discovery chain is fetched over HTTPS, the issuer is validated, and key rotation is tied to credential lifecycle controls rather than ad hoc application changes.

Why This Matters for Security Teams

OIDC discovery and JWKS are not just plumbing details. They are part of the trust chain that decides whether a token was really issued by the expected authority and whether the signer’s key is still valid. In NHI governance, that matters because service accounts, API clients, and machine workloads often authenticate and authorize at machine speed, where a single weak issuer check or stale key can turn into broad lateral movement. Guidance on lifecycle control in the Ultimate Guide to NHIs shows why key handling must be tied to identity governance, not left to application teams alone. NIST’s NIST Cybersecurity Framework 2.0 reinforces the same point through asset, access, and protective control outcomes.

Teams often get this wrong by treating discovery metadata as a convenience feature instead of a governance boundary. If issuer validation, TLS enforcement, and key rotation policy are not centrally controlled, token verification becomes dependent on each application’s interpretation of the rules. That is especially risky when 71% of NHIs are not rotated within recommended time frames, according to NHI Mgmt Group’s Ultimate Guide to NHIs. In practice, many security teams encounter JWKS failures only after a compromised key or misconfigured issuer has already been used to mint trusted access.

How It Works in Practice

At runtime, the verifier first reads the OIDC discovery document to learn the issuer, supported signing algorithms, and the JWKS URI. It then fetches the JWKS to obtain the public keys needed to validate the token signature. Governance should require the discovery document and JWKS to be pulled over HTTPS, pinned to the expected issuer, and checked against a controlled trust policy. That means validating the issuer claim, not just whether the signature mathematically verifies. It also means treating key rotation as part of credential lifecycle management, similar to how NHI offboarding and revocation are handled in Lifecycle Processes for Managing NHIs.

In operational terms, practitioners usually need four controls:

  • Fetch discovery metadata only from approved HTTPS endpoints.
  • Validate issuer, audience, and signing algorithm before trusting the token.
  • Cache JWKS with expiry and refresh rules that align to key rotation policy.
  • Alert on unexpected key changes, missing keys, or issuer drift.

This is where identity governance and operational resilience intersect. NIST CSF 2.0 emphasises continuous protection and monitoring, while NIST guidance on identity assurance supports stronger validation of who or what is asserting identity. For broader lifecycle discipline, the Regulatory and Audit Perspectives section of the Ultimate Guide to NHIs is useful for aligning evidence, controls, and ownership. These controls tend to break down in multi-tenant platforms with custom auth gateways because each tenant can publish different issuers, caching rules, and key rollover timing.

Common Variations and Edge Cases

Tighter key validation often increases operational overhead, requiring organisations to balance stronger trust guarantees against release velocity and federation complexity. Best practice is evolving, and there is no universal standard for every deployment pattern, especially in ecosystems that mix internal workloads, SaaS integrations, and external identity providers.

One common edge case is key rotation during incident response. If a signer is compromised, fast revocation is desirable, but aggressive cache invalidation can also break healthy services that have not refreshed JWKS yet. Another edge case is multi-region or offline verification, where verifiers cannot always reach the discovery endpoint on demand. In those environments, current guidance suggests using short cache lifetimes, explicit issuer allowlists, and operational runbooks for emergency key rollover rather than ad hoc application updates. The Top 10 NHI Issues article is a useful reminder that visibility and rotation failures often appear together, not in isolation.

For machine identities, the governance question is not whether JWKS exists, but whether the organisation can prove the trust chain from issuer to verifier and keep that chain under lifecycle control. When OIDC is extended to APIs, service meshes, or autonomous workloads, the risk moves from identity proof to trust propagation. That is why practitioners should align discovery and JWKS management with 52 NHI Breaches Analysis patterns and review the validation process whenever the federation model changes.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-03 Key rotation and JWKS trust fit NHI credential lifecycle control.
NIST CSF 2.0 PR.AC-4 Issuer and token validation are access-control safeguards for machine identities.
NIST AI RMF Governance is needed when automated systems rely on identity assertions at runtime.

Document ownership, monitoring, and escalation for identity assertions used by autonomous systems.