-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Fix scope validation for realm-level credential definitions in Authorization Code flow #39148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated scope retrieval to use realm attributes instead of client attributes Closes keycloak#39130 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
@Awambeng Hello, I will review the PR. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, it seems that the PR lacks its integration tests to check the modified codes.
Could you add the integration tests?
…d, missing) in credential issuance Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
Thank you @tnorimat for the feedback. I’ve added tests to cover the new scope validation logic at the realm level. The tests include the following cases:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are likely to be removed again under the condition, that we should decide to implement my suggested changes in #39265.
But until then the PR looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Awambeng @tnorimat @Captain-P-Goldfish @wistefan Thanks everyone for the PR and the review!
…ization Code flow (keycloak#39148) Closes keycloak#39130 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com> (cherry picked from commit ca3859b)
…ization Code flow (keycloak#39148) Closes keycloak#39130 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com> (cherry picked from commit ca3859b)
This PR updates the
checkScope
method in the OID4VC credential issuance flow to fetch the required scope from realm-level attributes instead of client attributes. This change ensures compatibility with the new design where credential definitions are no longer client-scoped but managed at the realm level.This resolves scope validation failures during credential issuance using the Authorization Code flow
Closes #39130