[OID4VCI] Issuance with Authorization Code Flow assumes same client_id for offer creation and redemption#50576
Open
tdiesler wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts OID4VCI credential-offer creation so that Authorization Code Grant offers no longer assume the same client_id is used for both offer creation and subsequent redemption, addressing #48188 (wallets may authenticate/redeem using their own client).
Changes:
- Stop binding authorization-code credential offers to the creating client (
targetClientId = nullfor auth-code offers). - Keep pre-authorized code offers bound to the authenticated client.
- Update Javadoc section headings to explicitly name the corresponding grant types.
Comments suppressed due to low confidence (1)
services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OID4VCIssuerEndpoint.java:446
- The Javadoc for the authorization-code offer section doesn’t mention the newly introduced behavior that these offers are no longer bound to the client_id used to create them (only pre-authorized offers are). Adding an explicit bullet here would help prevent future regressions and clarify the intended security model (client authorization is enforced via configured credential scopes/policies, not by matching the creator client_id).
* <b>Authorization Code Grant Offer</b>
* <ul>
* <li>If targetUser is null or empty, the generated offer is "anonymous"</li>
* <li>If targetUser is equal to the current login, the offer is "self issued"</li>
* <li>If targetUser is none of the above, the offer is "targeted"</li>
2 tasks
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
2 times, most recently
from
July 2, 2026 14:49
f496177 to
6267e81
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 3, 2026 09:30
6267e81 to
74e363e
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 3, 2026 09:38
74e363e to
57b9979
Compare
Contributor
|
@tdiesler LGTM but i just wonder why no test has to be changed for this? Maybe you should add one? |
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 3, 2026 12:46
57b9979 to
0b1cf55
Compare
Contributor
Author
Yes, good catch - I added the wanted test coverage |
dominikschlosser
approved these changes
Jul 3, 2026
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 3, 2026 14:46
0b1cf55 to
5c2a54b
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 3, 2026 14:51
5c2a54b to
5fc887a
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 13, 2026 08:12
5fc887a to
9e21a77
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 13, 2026 08:30
9e21a77 to
5fc887a
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 14, 2026 14:44
5fc887a to
1f19a27
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 14, 2026 18:27
1f19a27 to
b2a132e
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 14, 2026 18:30
234c341 to
b2a132e
Compare
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 14, 2026 19:00
b2a132e to
5fc887a
Compare
…d for offer creation and redemption closes keycloak#48188 Signed-off-by: Thomas Diesler <tdiesler@proton.me> * Stop binding authorization-code credential offers to the creating client (targetClientId = null for auth-code offers). * Keep pre-authorized code offers bound to the authenticated client. * Update Javadoc section headings to explicitly name the corresponding grant types.
tdiesler
force-pushed
the
ghi48188-auth-code-offer-client-binding
branch
from
July 15, 2026 06:18
5fc887a to
6b8ed25
Compare
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.
closes #48188
Adjusts OID4VCI credential-offer creation so that Authorization Code Grant offers no longer assume the same client_id is used for both offer creation and subsequent redemption, addressing "wallets may authenticate/redeem using their own client".