Repository navigation
Correct Standard Token Exchange with Dynamic Scopes feature enabled - #45820
cgeorgilakis wants to merge 1 commit into
Conversation
Closes keycloak#45716 Signed-off-by: cgeorgilakis-grnet <cgeorgilakis@admin.grnet.gr>
|
@graziang - can you kindly help |
|
actually there is a serious security issue here. we have scope privilege escalation issue. B 8000 ased on my own extension test, the exchanged token have scopes that are in source token but these scopes are not added as optional scopes on target client, still the exchanged tokens have these scopes added. |
Any idea how this could be fixed? With adding appropriate tests. |
Also new to keycloak, have not contributed to it yet, so not sure about that. I have token-exchange in my app/extension, and upgrading to 26.5.0 and toggling on dynamic scope had a test failing, returning 200 which should have returned 400. Given I have scope based access, it was a serious security issue for my app and dug deeper to find this privilege escalation. @graziang kindly help getting this PR merged. Based on my analysis, this is a serious security/privilege escalation for apps using scope level access control. |
|
DYNAMIC_SCOPES is an experimental feature and is not supported for Standard Token Exchange. From the PR, I see that with this fix the Standard Token Exchange tests are failing. The feature should not be enabled for all tests, but only for the dedicated dynamic scopes tests. |
@graziang can you help us where we can get this issue in notice and have it planned properly as part of dynamic scopes implementation? many thanks. |
We could fix DYNAMIC_SCOPES, even being experimental feature, bugs. My draft PR is correcting the default scopes of Standard Token Exchange with DYNAMIC_SCOPES enabled. Do you want to remove the failing tests and make PR ready for review? |
|
@cgeorgilakis Thanks! Superseded by: #48981 |
Closes #45716
This draft PR solves a basic problem for working the Token Exchange with dynamic scopes.
However, two tests are keeping failing. I don't know why. Any help?