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

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.

A client assertion, or JWT client assertion, is a short-lived token a client signs with its own private key to prove its identity to an OAuth authorization server, in place of a client secret.

Updated November 14, 2026

A client secret is like a password both the service and the server know, so anyone who reads it can pretend to be the service. With a client assertion, the service instead writes a fresh pass for each visit and signs it with a pen only it owns; the server keeps a way to check the signature, not the pen. Each pass expires quickly and carries a serial number, so a copied pass is refused the second time.

On this page

1. How a JWT client assertion works
2. Client assertion vs client secret, and other methods
3. When to use JWT client assertions
4. Pitfalls
5. How QuorumAuth handles JWT client assertions

Authenticating with a signed assertion

1. 1 Client → Authorization server Register public key, once
2. 2 Client → Client Sign a fresh assertion iss, sub, aud, exp, jti
3. 3 Client → Authorization server Token request plus assertion
4. 4 Authorization server → Authorization server Check signature, claims, jti jti recorded so replays fail
5. 5 Authorization server → Client Access token

Once, the client registers its public key with the authorization server. For each token request the client signs a fresh JWT whose claims are iss, sub, aud, exp and jti, and sends it with the request. The server verifies the signature with the registered key, checks every claim, records the jti, and returns an access token.

No secret is shared: the server holds only a public key, and each short-lived assertion is accepted once.

The simplest way for an OAuth client to authenticate to the token endpoint is a client ID and a client secret. That secret is shared: the server knows it, the client knows it, and anyone who reads it from a config file or a CI log can become the client. A JWT client assertion removes the shared secret. The client holds a private key, the server holds the matching public key, and on each token request the client signs a fresh, short-lived JWT that only it could have produced.

## How a JWT client assertion works

RFC 7523, the JSON Web Token profile for OAuth 2.0 client authentication and authorization grants, builds on the assertion framework in RFC 7521. For client authentication the flow is:

1. **Register a public key.** The client generates a key pair and registers the public key with the authorization server, directly or as a [JWKS](https://quorumauth.com/learn/what-is-a-jwks/) URL.
2. **Build the assertion.** For each token request the client creates a JWT with these claims:
   - `iss`: the client ID
   - `sub`: the client ID
   - `aud`: the authorization server, typically its token endpoint URL or issuer identifier, both listed in [the server’s discovery document, alongside its keys](https://quorumauth.com/learn/what-is-oidc-discovery/)
   - `exp`: a near expiry, for example 60 seconds ahead
   - `jti`: a unique ID, so the server can refuse replays
   - optionally `iat` and `nbf`
3. **Sign it** with the private key, for example with `RS256` or `ES256`, and include the key ID in the `kid` header.
4. **Send it** on the token request.
5. **The server verifies** the signature with the registered public key, checks every claim, records the `jti`, and issues an access token.

### The `client_assertion_type` and `client_assertion` parameters

Two form parameters carry the assertion on the token request. RFC 7521 (section 4.2) defines them, and RFC 7523 (section 2.2) fixes the value for JWTs:

- `client_assertion_type` is always `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`.
- `client_assertion` is the signed JWT itself.

They authenticate the client on any grant type. Here they replace the client secret on a client credentials grant:

```
POST /token HTTP/1.1
Host: auth.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&scope=ledger:write
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=eyJhbGciOiJFUzI1NiIsImtpZCI6ImsxIn0.eyJpc3Mi...
```

The decoded payload:

```
{
  "iss": "billing-exporter",
  "sub": "billing-exporter",
  "aud": "https://auth.example.com/token",
  "jti": "5b1f0c3e-8d1a-4a7e-9f0b-2c6d1e4f9a10",
  "exp": 1793000060,
  "iat": 1793000000
}
```

RFC 7523 also defines a second use, the JWT bearer **authorization grant**, where the JWT itself is the grant (`grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer`). That is a different job: the assertion represents a subject, not the client.

## Client assertion vs client secret, and other methods

With a client secret, every token request carries the secret itself. With a client assertion, it carries a signature that proves the client holds a private key the server never sees. The table adds the other common methods:

| Method | What is shared with the server | Replayable if intercepted | Notes |
| --- | --- | --- | --- |
| `client_secret_basic` / `client_secret_post` | The secret itself | Yes, until rotated | Simplest; weakest |
| `client_secret_jwt` | An HMAC key | Only until `exp`, and not if `jti` is tracked | Still a shared secret |
| `private_key_jwt` (RFC 7523) | A public key only | Only until `exp`, and not if `jti` is tracked | No secret on the server |
| Mutual TLS (mTLS, RFC 8705) | A certificate or its CA | No; bound to the TLS key | See [mTLS](https://quorumauth.com/learn/what-is-mtls/) |

The names `client_secret_jwt` and `private_key_jwt` come from OpenID Connect Core; RFC 7523 defines the underlying mechanism.

## When to use JWT client assertions

Use them for confidential clients and service accounts that today hold a client secret: backends, scheduled jobs, CI pipelines. They suit [machine-to-machine authentication](https://quorumauth.com/learn/what-is-machine-to-machine-authentication/) wherever mTLS to the authorization server is impractical. They can also authenticate the client on a [token exchange](https://quorumauth.com/learn/what-is-oauth-token-exchange/) request.

If your platform can attest the workload instead, [workload identity](https://quorumauth.com/learn/what-is-workload-identity/) removes even the stored key.

## Pitfalls

- **Long expiries.** An assertion valid for an hour is a one-hour bearer token. Keep `exp` short.
- **No replay check.** Without recording `jti`, a captured assertion can be reused until it expires.
- **Loose audience.** Verifiers must check that `aud` names them. An IETF draft updating RFC 7523 tightens this further, recommending the authorization server’s issuer identifier as the audience.
- **Letting the assertion choose its rights.** The server, not the request, decides the scopes a client may hold.
- **Keys that never rotate.** Support two registered keys at once so you can roll without downtime.
- **Private keys in source control.** Generate keys where the workload runs and register only the public half.

## How QuorumAuth handles JWT client assertions

QuorumAuth uses RFC 7523 signed assertions for service accounts whose authority comes from a service role. The assertion is sent through QuorumAuth’s SDK API rather than as a form-encoded `client_assertion` on a standard token endpoint. In its tested behaviour:

- The workload generates its key; an administrator registers the public half on the service account, and that becomes the account’s one live key.
- Each sign-in is a fresh assertion. What the account receives is bounded by its role in its organization, not by what the assertion asks for, and it cannot name an organization where it holds no role.
- A spent assertion cannot sign in again, and a key the account never registered is refused.
- Revoking the account, replacing its key, or unbinding its role ends what the key already earned.
- A service account bound to the deployer role may instead exchange an API key for a bearer limited to that role; an account with a service role is pointed back to its key-bound assertion.

To compare assertions with federated sign-in and API keys for each caller, see [service accounts without API keys](https://quorumauth.com/guides/service-account-without-api-key/).

Using `private_key_jwt` with a hosted identity provider today? Compare [service app credentials with attested workload identity](https://quorumauth.com/compare/okta-alternative-for-workload-identity/).

## Frequently asked questions

What is the difference between private\_key\_jwt and client\_secret\_jwt?

Both are names from OpenID Connect Core. private\_key\_jwt signs the assertion with an asymmetric private key; client\_secret\_jwt signs it with an HMAC of a shared secret. private\_key\_jwt avoids sharing any secret with the server.

Which claims must a client assertion contain?

For client authentication under RFC 7523, iss and sub set to the client ID, aud identifying the authorization server, and exp. A jti is optional in the RFC but needed if the server is to detect replay.

Is a JWT client assertion the same as an access token?

No. The assertion proves who the client is when it asks for a token. The access token is what the server returns afterwards.

How long should an assertion be valid?

Seconds to a few minutes. It is used once, immediately, so a long expiry only helps an attacker.

What is a JWT assertion?

A signed JWT presented to an authorization server as proof of something. RFC 7523 defines two uses, authenticating the client (a client assertion) and standing in for an authorization grant (the JWT bearer grant).

## Related reading

[Learn QuorumAuth What is machine-to-machine authentication?Machine-to-machine authentication lets services prove who they are to each other. Compare API keys, client credentials, JWT assertions and mutual TLS (mTLS).Read](https://quorumauth.com/learn/what-is-machine-to-machine-authentication/) [Learn QuorumAuth What is a non-human identity?A non-human identity (NHI) is an identity software uses to act without a person: service accounts, workloads, API keys, bots. Examples, risks and controls.Read](https://quorumauth.com/learn/what-is-non-human-identity/) [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.Read](https://quorumauth.com/learn/what-is-a-jwks/) [Learn QuorumAuth What is OAuth token exchange?OAuth 2.0 token exchange (RFC 8693) trades one token for another with a new audience or narrower scope. Delegation, impersonation, and examples.Read](https://quorumauth.com/learn/what-is-oauth-token-exchange/) [Learn QuorumAuth What is mTLS?Mutual TLS makes both client and server present certificates, so each side proves its identity before any data flows. How it works and where it fails.Read](https://quorumauth.com/learn/what-is-mtls/)

## 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/)
