Repository navigation
Open
Description
Part of #6909. Depends on #6894.
Problem: after #6894, the token response tells the client which details
were granted, but the access token does not carry them, so a resource server
cannot enforce them. RFC 9396 §9 says the AS MUST make this data available to
the RS, through the JWT access token or the introspection response. §9.1
RECOMMENDS a top-level authorization_details claim in JWT access tokens,
filtered to the token's audience. §13 says the AS should share details on a
"need to know" basis.
Change:
- Each registered type opts in to being put in access tokens. The default is
off, so the session and schedule types from Authorization server: revocation and audit for delegated agents #6886 stay out of tokens. - A type that opts in provides a filter: given the token's audience and the
granted entries, return the entries that audience may see (possibly none).
Without a filter, the type is not put in tokens. - Add the result as a top-level
authorization_detailsclaim (registered by
RFC 9396 §14.2). Leave the claim out when it would be empty. - Bound the claim size. If it is exceeded, refuse the request rather than drop
entries silently. - Introspection: the embedded AS has no introspection endpoint today (Complete embedded AS surface: RFC 7592 management and introspection #5753 was
closed as not planned). If that endpoint is added, it must return the same
filtered entries as a top-levelauthorization_detailsmember with the
structure from §2, filtered for the RS calling it (RFC 9396 §9.2; RFC 7662
§2.2 allows a different response per protected resource). Record this as an
acceptance item on whichever issue adds the endpoint.
Acceptance:
- A type that opts in shows up in the access token, filtered by audience. Two
token exchanges for different audiences get different claims. - A type that does not opt in never appears in a token.
- Leaving the registry unset changes nothing in issued tokens.
docs/arch/17-token-exchange-delegation.mddocuments the claim.
Open questions:
- Should the claim be allowed to differ from what the token response echoed?
§7 lets the AS leave values out of what it returns to the client, and §9.2
allows "filtered and extended" data for the RS. So yes, but the type
definition must say so. - Can one hook (the
Granthook returning entries per audience) do this, or
should the filter be a separate field?
Metadata
Metadata
Assignees
Labels
No labels
Activity