Repository navigation
[OID4VCI] Migrate CredentialsOffer to multiple grant types - Part2 - #46947
Conversation
72a4fa3 to
2157646
Compare
There was a problem hiding this comment.
Hello @tdiesler - I reviewed and approve of the changes in this PR. However, it'd help if you could clarify how you intend to use the now supported issuer state field.
| @JsonProperty(ISSUER_STATE) | ||
| private String issuerState; | ||
|
|
||
| public PreAuthorizedCode getPreAuthorizedCode() { | ||
| return preAuthorizedCode; | ||
| public String getIssuerState() { | ||
| return issuerState; | ||
| } |
There was a problem hiding this comment.
As per my review, this is the main point of this PR. Could you clarify how this will be leveraged (in a subsequent PR?) and what are security concerns if the wallet sends back an unexpected value? My apologies if that's asking you to repeat yourself.
There was a problem hiding this comment.
Yes, this is part of PR #46950
Currently, the issuer state is simply the base64 encoded CredentialOfferState.Id
With so many "identifiers" floating around, it is perhaps useful to mention that this id is a server generated opaque id that identifies the internal CredentialOfferState. The offer state can now be retrieved using these three keys ...
- CredentialOfferUri.Nonce (which is the id that the wallet uses to get the offer)
- pre-authorized_code (which the token endpoint uses when a pre-auth code is redeemed)
- CredentialOfferState.Id (which the authorization endpoint uses when given an issuer_state)
Also worth noting, that credential_identifier is no longer a key by which an offer state can be found. Instead it is (as intended by the spec) an identifier for a variation of claims that are available for a given credential_configuration_id. It is a property defined by the Issuer (i.e. vc.credential_identifier) on the client scope. It is no longer generated nor is it necessarily a UUID - I changed the test accordingly.
Currently, we only support a single value for this property - it should be multiple and there should be some mapping that results in different claims or claim values depending on credential_identifier
There was a problem hiding this comment.
Thank you for the detailed context. It helps a lot to have CredentialOfferState.Id. I was even planning to add it for for JWT pre auth code PR I'm working on.
There was a problem hiding this comment.
Currently, we only support a single value for this property - it should be multiple and there should be some mapping that results in different claims or claim values depending on credential_identifier
#46264
This can turn to be quite complicated, but depends on what exactly is in the scope for this "mapping support" . For me, the 1:1 mapping between credential_configuration_id and credential_identifier would be OK and it is sufficient to support just that for OID4VCI specification support as it is up to the Keycloak (Issuer) on what credential_identifiers it returns in the tokenResponse inside authorization_details . But support for "Authorization groups" of user profile would be likely OK . Added comment to the #46264 as I guess that is rather a place where to discuss the details of this?
Signed-off-by: Thomas Diesler <tdiesler@proton.me>
There was a problem hiding this comment.
@tdiesler @IngridPuppet Thanks for the PR and review! Added inline comment, but not a blocker for this PR (Added rather comment to #46264 for some clarification).
| @JsonProperty(ISSUER_STATE) | ||
| private String issuerState; | ||
|
|
||
| public PreAuthorizedCode getPreAuthorizedCode() { | ||
| return preAuthorizedCode; | ||
| public String getIssuerState() { | ||
| return issuerState; | ||
| } |
There was a problem hiding this comment.
Currently, we only support a single value for this property - it should be multiple and there should be some mapping that results in different claims or claim values depending on credential_identifier
#46264
This can turn to be quite complicated, but depends on what exactly is in the scope for this "mapping support" . For me, the 1:1 mapping between credential_configuration_id and credential_identifier would be OK and it is sufficient to support just that for OID4VCI specification support as it is up to the Keycloak (Issuer) on what credential_identifiers it returns in the tokenResponse inside authorization_details . But support for "Authorization groups" of user profile would be likely OK . Added comment to the #46264 as I guess that is rather a place where to discuss the details of this?
|
merci |
…46947) closes keycloak#46976 Signed-off-by: Thomas Diesler <tdiesler@proton.me>
closes #46976
related #46385
[OID4VCI] Add support for authorization_code grant - Part2