1. [Home](https://quorumauth.com/) /
2. [Learn](https://quorumauth.com/learn/) /
3. What is a JWKS?

Learn · QuorumAuth

# What is a JWKS?

> A JWKS publishes the public keys that verify an issuer's tokens. Learn the RFC 7517 format, how kid lookup and rotation work, and common mistakes.

A JWKS, or JSON Web Key Set, is a JSON document listing the public keys a relying party uses to verify an issuer's signed tokens.

Updated October 24, 2026

A JWKS is like a noticeboard at a club's entrance showing how to recognise the club's real stamps. The club keeps the stamp itself locked away; each stamp on a wristband carries a number, and a guard anywhere looks that number up on the board to check it. When the club gets a new stamp, it pins it up beside the old one for a while, so wristbands stamped with either still pass.

On this page

1. How a JWKS works
2. Key rotation with a JWKS
3. When you need a JWKS
4. Pitfalls
5. How QuorumAuth handles a JWKS

Checking a token with a JWKS

1. Token header names kid → Look up kid in cache
2. Look up kid in cache → Key type fits alg?found
3. Look up kid in cache ↔ Refetch set once missing / retry
4. Key type fits alg? → Verify signature, then claims

A token header names its key ID. The verifier looks the kid up in its cached JWKS. If the kid is missing, it refetches the set once. It then checks that the key type and algorithm fit the token, and verifies the signature followed by the iss, aud, exp and nbf claims.

The verifier picks the key by its kid and refetches the set only once when it meets an unknown kid.

When an API receives a signed JWT, it needs the issuer’s public key to check the signature. Hard-coding that key works until the issuer rotates it. A JSON Web Key Set solves the distribution problem: the issuer publishes its current public keys at a well-known URL in a standard format, and verifiers fetch and cache them, picking the right key by its identifier.

## How a JWKS works

The format is defined in RFC 7517, JSON Web Key. A JWKS is a JSON object with a `keys` array. Each entry is a JWK describing one key.

```
{
  "keys": [
    {
      "kty": "RSA",
      "kid": "2026-10-a",
      "use": "sig",
      "alg": "RS256",
      "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbf...",
      "e": "AQAB"
    },
    {
      "kty": "OKP",
      "crv": "Ed25519",
      "kid": "2026-10-b",
      "use": "sig",
      "x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"
    }
  ]
}
```

The common members:

| Member | Meaning |
| --- | --- |
| `kty` | Key type: `RSA`, `EC`, or `OKP` (for Ed25519, defined in RFC 8037) |
| `kid` | Key ID; the verifier matches it against the token header |
| `use` | Intended use: `sig` for signatures, `enc` for encryption |
| `alg` | Algorithm the key is meant for, such as `RS256` or `ES256` |
| `n`, `e` | RSA modulus and exponent, base64url-encoded |
| `crv`, `x`, `y` | Curve and coordinates for `EC`; `crv` and `x` for `OKP` |

### Verification step by step

1. Read the token header, for example `{"alg":"RS256","kid":"2026-10-a"}`.
2. Look up `kid` in the cached JWKS.
3. If it is missing, refetch the JWKS once and look again.
4. Check that the key’s type and `alg` fit the token’s `alg`.
5. Verify the signature, then the claims: `iss`, `aud`, `exp`, `nbf`.

### Where the JWKS lives

Issuers advertise the URL as `jwks_uri` in their [OIDC discovery](https://quorumauth.com/learn/what-is-oidc-discovery/) document or RFC 8414 metadata. Clients that authenticate with a [JWT client assertion](https://quorumauth.com/learn/what-is-jwt-client-assertion/) can also publish their own JWKS for the authorization server to fetch. SPIFFE trust bundles for JWT-based identities use the same shape.

## Key rotation with a JWKS

A JWKS makes rotation routine:

1. **Publish** the new key alongside the old one.
2. **Wait** for verifier caches to pick it up.
3. **Start signing** with the new key.
4. **Retire** the old key after the last token it signed has expired.

During the overlap both keys verify. A verifier that refetches on an unknown `kid` picks up the new key on first sight. That routine is what auditors ask regulated teams to show: see [rotatable signing keys for fintech teams](https://quorumauth.com/industries/fintech-authentication-and-key-management/).

Rotating a signing key

1. Publish new key beside old → Wait for caches
2. Wait for caches → Sign with new key
3. Sign with new key → Retire old key later old tokens expired

Four steps in order. Publish the new key alongside the old one. Wait for verifier caches to pick it up. Start signing with the new key. Retire the old key after the last token it signed has expired.

During the overlap both keys verify, so no valid token fails while the new key takes over.

## When you need a JWKS

You need one whenever more than one party verifies tokens you sign: OpenID Connect ID tokens, JWT access tokens checked by resource servers, or service tokens verified across a fleet. If only one service ever verifies, a shared configuration may suffice, but a JWKS still makes rotation easier.

## Pitfalls

- **Ignoring `kid`.** Trying every key in the set invites algorithm confusion and slows verification.
- **Trusting the token’s `alg` blindly.** Decide which algorithms you accept; never accept `none`, and never let a token switch an RSA key to HMAC.
- **Refetching on every request.** Cache the set. Refetch on an unknown `kid`, with a rate limit so forged tokens cannot make you hammer the issuer. If verification already fails, see [fixing “kid not found”](https://quorumauth.com/guides/jwks-kid-not-found/).
- **Fetching from an untrusted location.** Take the `jwks_uri` from configuration or authenticated discovery, never from the token itself.
- **Private material in the set.** A JWKS that includes `d` or other private members is a key leak.
- **Removing old keys too early.** Tokens signed with them fail before they expire.

## How QuorumAuth handles a JWKS

QuorumAuth publishes and consumes key sets for the tokens it signs. In its tested behaviour:

- **Publication.** The signing-key API returns the active keys as a JWKS, and each published key answers to a key ID of its own. Key classes that are not meant to be published never reach it, even when rotated.
- **Per-organization OIDC keys.** Each organization acting as an OpenID Provider advertises a `jwks_uri` holding exactly the keys it publishes.
- **Lazy fetch and cache.** The SDK fetches keys on first verification and serves later verifications for the same organization from cache. A known key ID is answered without contacting the authority; an unrecognised one costs exactly one discovery round-trip.
- **Forged tokens stay cheap.** A forged token is refused on the key it names, without fetching more.
- **Fail closed.** Discovery refuses a key set carrying private key material, refuses a peer that is not the expected authority, and resolver construction fails when the discovery endpoint is unreachable.
- **Format.** Ed25519 keys are published in the RFC 7517 `OKP` shape with the raw public key as unpadded base64url. During a rotation window old and new keys both resolve; afterwards only the new key does.

Each organization gets its own signing keys. See [per-organization keys and what you own](https://quorumauth.com/no-vendor-risk/).

## Frequently asked questions

What is the difference between a JWK and a JWKS?

A JWK is one key as a JSON object. A JWKS is an object with a keys array holding one or more JWKs.

Where do I find an issuer's JWKS?

OpenID Providers advertise it as jwks\_uri in their discovery document. OAuth servers publishing RFC 8414 metadata use the same field.

Should a JWKS ever contain private keys?

Never in a public set. Private JWKs exist in the format, but a published JWKS must hold public keys only.

How often should I refetch a JWKS?

Cache it, respect HTTP caching headers, and refetch when a token names a kid you do not hold, with a rate limit.

## Related reading

[Learn QuorumAuth What is OIDC discovery?OIDC discovery lets an app configure itself from one issuer URL. What /.well-known/openid-configuration contains, how clients use it, and what to check.Read](https://quorumauth.com/learn/what-is-oidc-discovery/) [Learn QuorumAuth What is a JWT client assertion?A client assertion is a signed JWT an OAuth client sends instead of a client secret. How RFC 7523 works, the client\_assertion\_type value, and what to check.Read](https://quorumauth.com/learn/what-is-jwt-client-assertion/) [Learn QuorumAuth What is an SVID?An SVID is the short-lived document that proves a workload holds a SPIFFE ID. Learn how X.509-SVIDs and JWT-SVIDs work and when to use each.Read](https://quorumauth.com/learn/what-is-an-svid/) [Learn QuorumAuth What is PKCE?PKCE stops a stolen OAuth authorization code from being redeemed by anyone but the app that asked for it. How RFC 7636 works, step by step.Read](https://quorumauth.com/learn/what-is-pkce/) [Learn QuorumAuth What is a Biscuit token?Biscuit is a public-key authorization token that any holder can narrow offline. How blocks, Datalog checks and attenuation work, compared with JWTs.Read](https://quorumauth.com/learn/what-is-a-biscuit-token/) [Guides QuorumAuth Fixing "kid not found" when verifying a JWT against a JWKS JWT verification fails because the kid is not in the JWKS? Find which of five causes you have, check it in two commands, and fix the verifier for good.Read](https://quorumauth.com/guides/jwks-kid-not-found/)

## Worked examples

- [Use cases QuorumAuth Token introspection latency: keep revocation, drop the verifier call See what a token check on every request costs in latency and verifier fleet, and how QuorumAuth verifies tokens inside your service instead.Worked use case: an illustrative business, built from the sources and formulas shown. Not a customer story.Read](https://quorumauth.com/use-cases/token-introspection-latency/)

## Talk to sales about QuorumAuth.

QuorumAuth is sold through our sales team. The Build page shows the drop-in sign-in on your origin and how to reach sales about your stack.

[Go to Build and contact sales →](https://quorumauth.com/onboarding/)
