Add optional ID-JAG encryption with JWE#102
Open
mcguinness wants to merge 2 commits into
Open
Conversation
Adds an Encrypted ID-JAG subsection to the Identity Assertion JWT Authorization Grant section that defines how an IdP Authorization Server MAY encrypt an ID-JAG to its target Resource Authorization Server using JWE. The motivation is to convey claims that are sensitive or contain personal information (for example email, phone_number, sub_id, or audience-scoped enterprise identifiers) to the Resource Authorization Server without disclosing them to the Client that presents the ID-JAG, since the claims released to the Client during SSO are not necessarily the same as those released to the ID-JAG audience. Sign-then-encrypt is REQUIRED. The encrypted ID-JAG is a Nested JWT with the outer JWE protected header carrying alg, enc, cty=JWT, and kid, and the inner JWS keeping typ=oauth-id-jag+jwt. The RAS decrypts first and applies all existing processing rules to the inner JWS. Adds metadata parameters for capability advertisement and negotiation: id_jag_encryption_alg_values_supported and id_jag_encryption_enc_values_supported on both the IdP (as capability) and the RAS (as a request, when paired with an enc-marked JWK in the RAS jwks_uri), plus id_jag_encryption_required on the RAS for deployments that mandate encryption. Reconciles client-opacity points raised by the change: the DPoP cnf self-inspection diagnostic now SHOULD only be performed when the ID-JAG is not encrypted, with explicit text that the loss is a client-side diagnostic, not a weakening of proof-of-possession, since the RAS still enforces cnf after decryption. Adds a Claim Confidentiality Security Consideration and extends the Subject Identifier Disclosure consideration to point to encryption as the mitigation when downstream-required identifiers cannot be omitted. Adds normative references to RFC 7516 (JWE), RFC 7517 (JWK), and RFC 7518 (JWA). Registers the three new metadata parameters in the OAuth Authorization Server Metadata registry.
panva
reviewed
Jun 16, 2026
| - The outer JWE protected header MUST include: | ||
|
|
||
| - `alg`: the key management algorithm, registered in the "JSON Web Signature and Encryption Algorithms" registry {{RFC7518}}, that the IdP Authorization Server used to wrap the content encryption key. The IdP MUST select a value supported by the target Resource Authorization Server. | ||
| - `enc`: the content encryption algorithm, registered in the "JSON Web Signature and Encryption Algorithms" registry {{RFC7518}}, that the IdP Authorization Server used to encrypt the JWS plaintext. The IdP MUST select a value supported by the target Resource Authorization Server. |
Member
There was a problem hiding this comment.
Requiring enc is incompatible with JOSE HPKE https://datatracker.ietf.org/doc/html/draft-ietf-jose-hpke-encrypt-20 where only alg is present for the Integrated Encryption mode.
Address PR feedback that requiring the JWE enc header is incompatible with the Integrated Encryption mode defined in draft-ietf-jose-hpke- encrypt, where alg MUST be present and enc MUST NOT be present. Loosens the JWE Structure section so that enc is required only when the chosen alg uses a separate content encryption algorithm (Key Encryption mode and similar), and prohibited when the chosen alg is an Integrated Encryption mode such as the HPKE algorithms. Updates the IdP issuer processing rules, the IdP-side and RAS-side metadata descriptions for id_jag_encryption_enc_values_supported (now MAY be omitted when only Integrated Encryption modes are supported), and the algorithm negotiation rule (alg first, then enc only if the chosen alg requires it). Drops the implicit "key wrap" framing in the kid and alg descriptions so that Direct and Integrated modes are not excluded. Adds draft-ietf-jose-hpke-encrypt as an informative reference and points to it as the canonical example of an Integrated Encryption mode that prohibits enc.
Collaborator
Author
|
Good catch, thanks. Pushed 878ae99 to address this. The fix loosens the JWE header rules so that Specifically:
Added draft-ietf-jose-hpke-encrypt as an informative reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
## Encrypted ID-JAGmechanism that lets an IdP Authorization Server JWE-encrypt the ID-JAG to its target Resource Authorization Server, mirroring how OpenID Connect ID Tokens can be encrypted.Motivation
The claims an End-User has consented to release to a Client during SSO are not necessarily the same as the claims the IdP Authorization Server is permitted to release to the audience of an ID-JAG. An ID-JAG may carry sensitive attributes (
email,phone_number,sub_id, audience-scoped enterprise identifiers, etc.) that the Client should not be able to read but that the Resource Authorization Server needs for subject resolution and policy. Encryption preserves this distinction by ensuring only the RAS can decrypt the JWS.What's in the PR
## Encrypted ID-JAG {#id-jag-encryption}under# Identity Assertion JWT Authorization Grantdefining the JWE structure (outer header MUST carryalg,enc,cty: JWT,kid; SHOULD carrytyp: oauth-id-jag+jwt), sign-then-encrypt as REQUIRED, IdP-side issuer processing, RAS-side consumer processing, and a non-normative example.id_jag_encryption_alg_values_supportedandid_jag_encryption_enc_values_supportedto advertise capability, with negotiation rule (intersection with RAS values).use: enckey injwks_uri), plusid_jag_encryption_requiredfor deployments that mandate encryption.typ/aud/client_id/signature checks all run against the inner JWS.cnfself-check reconciliation: the client SHOULD only inspect the ID-JAG forcnfwhen it is not encrypted. Explicit note that this is a loss of a client-side diagnostic, not a weakening of PoP, since the RAS still enforcescnfafter decryption.## Subject Identifier Disclosureto point at encryption as the mitigation when downstream-required identifiers cannot be omitted, plus a new## Claim Confidentiality {#id-jag-claim-confidentiality}consideration.Test plan
{{id-jag-encryption}},{{ras-metadata}},{{token-request}},{{id-jag-claim-confidentiality}}).