RFC 7521 — Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants
Implemented (transitively via RFC 7523(RFC_7523.md))
Source: docs/oauth/RFC_7521.md
RFC 7521 — Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants ¶
Status: Standards Track
Published: 2015-05
L-tier / T-tier: L4 (grant) + L5 (client auth) · T5
OneAuth coverage: Implemented (transitively via RFC 7523)
See also:RFC_7523.md·LANDSCAPE.md
In one sentence ¶
RFC 7521 is the generic framework that defines how to use a signed
assertion (a SAML 2.0 bearer assertion, a JWT, anything that conforms) for
both client authentication and as a grant — concrete bindings (JWT in
RFC 7523, SAML in RFC 7522) layer on top.
What problem does it solve? ¶
| Without 7521 | With 7521 |
|---|---|
| Every assertion-based credential format (JWT, SAML, …) defines its own OAuth integration | One framework; new assertion formats plug in via separate “binding” RFCs |
| Client authentication and grant types are spec’d independently — duplicate definitions of assertions | One spec defines the shared shape; bindings specialize for assertion type |
| Implementing a new federation type means re-doing assertion validation | Shared validation contract; just the format-specific parsing differs |
7521 is the abstract spec. You almost never read it on its own — you
read it as the parent of RFC 7523 (JWT bearer) or RFC 7522
(SAML bearer). It’s listed here as a separate doc because the LANDSCAPE
ticket pairs them, and because understanding 7521 illuminates why 7523
has the shape it does.
Relatable example ¶
Consider how AWS IAM, GCP, and Azure all let you federate a workload from
GitHub Actions:
- GitHub Actions issues a workflow OIDC token (a JWT).
- The CI job presents this JWT to the cloud’s STS, which validates it and
returns cloud-native credentials.
Under the hood, this is RFC 7521 + RFC 7523:
- 7521 says: “you can authenticate a client (or grant a token) using a
signed assertion; here’s the request shape —client_assertion=...,
client_assertion_type=<URI>,grant_type=<URI>.” - 7523 says: “if the assertion is a JWT, here’s how to validate it —
signature, claims (iss/sub/aud/exp), audience matching.”
You read both together. 7521 alone is too abstract; 7523 alone is
implicit about the generic contract it inherits.
Key concepts ¶
- Two use modes (§3 + §4):
- As a grant type (§4) — the assertion is the authorization to mint
a token. E.g., “this JWT proves the user authorized this client.” - As client authentication (§5) — the assertion is the client’s
credentials at/token. Replacesclient_secret_basic.
- As a grant type (§4) — the assertion is the authorization to mint
- Same wire parameters across both modes:
client_assertion_type— the URI naming the assertion format
(urn:ietf:params:oauth:client-assertion-type:jwt-bearerfor JWT)client_assertion— the assertion bytes- For grant-type mode, also
grant_type=<assertion URI>
- Validation responsibilities (§5.2) the binding RFC must fill in:
- Signature verification against issuer’s published key
- Issuer (
iss) matches expected - Subject (
sub) identifies a valid actor - Audience (
aud) includes this AS - Lifetime (
exp,nbf) check
- Replay defenses (§5.2) —
jtifor one-time-use;nbf+expfor
short windows.
Wire example ¶
This is what the binding RFCs (7522/7523) instantiate:
POST /api/token HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
# Client authentication via assertion (§5)
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=<signed-JWT>
# Plus the actual grant request:
&grant_type=client_credentials
&scope=read+write
Or as a grant in its own right (§4):
POST /api/token HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
&assertion=<signed-JWT>
&scope=read+write
The wire shape is the framework. JWT vs SAML decides only what’s inside
the assertion.
Where it lands on the OAuth abstraction ¶
- L4 (when used as a grant) + L5 (when used as client auth). Same
framework, two purposes. - T5 (token endpoint). Both modes act at
/token. - 7521 is the parent; 7522 and 7523 are the concrete children. When
someone says “RFC 7523,” they implicitly mean “7521 + the JWT binding.”
OAuth 2.0 status ¶
Published 2015. Part of the OAuth 2.0 ecosystem. Adoption is via the
concrete bindings — pure 7521 references don’t appear on the wire because
no deployment uses 7521 abstractly.
OAuth 2.1 status ¶
Not changed by 2.1. The framework and bindings continue forward.
OneAuth status ¶
OneAuth implements RFC 7523 (JWT binding) on top of 7521’s framework. See
RFC_7523.md for the implementation details.
- Implemented: framework wire shape (via 7523)
- Not implemented: SAML binding (RFC 7522) — out of scope; no observed demand
- Not implemented: other assertion-type URIs
This is the right scope — JWT is the assertion format the world uses; SAML
is a niche in modern OAuth deployments.
When NOT to use it ¶
You don’t choose to “use 7521” — you choose its binding (7522 or 7523). The
framework’s value is to keep multi-binding implementations consistent.
Related RFCs ¶
- RFC 7523 — the JWT binding; what’s actually used
- RFC 7522 — SAML binding; niche
- RFC 6749 — the framework whose grant + client-auth slots 7521 fills
- RFC 8693 — Token Exchange; another assertion-shaped grant