Skip to content

chore: fix scope in case of empty one from policy expression#3933

Merged
wolf4ood merged 3 commits intoeclipse-edc:mainfrom
wolf4ood:fix/3923_auth2_service
Feb 28, 2024
Merged

chore: fix scope in case of empty one from policy expression#3933
wolf4ood merged 3 commits intoeclipse-edc:mainfrom
wolf4ood:fix/3923_auth2_service

Conversation

@wolf4ood
Copy link
Copy Markdown
Contributor

@wolf4ood wolf4ood commented Feb 28, 2024

What this PR changes/adds

Fixes the calculation of the scope. Currently if there are no polic pre/post validators the scopes set from the evaluation process is always empty and that will be set as scope claim in the TokenParameters that leads the OAuth2 Identity service to send the scope parameter empty to the AuthService.

The fix applied check If the scopes set deriving from the policy evaluation is empty, then no scope claim is applied

If there is a custom TokenDecorator that adds the scope claim, it will override the policy evaluation one if any.

Why it does that

bug fix OAuth2 Identity Service

Linked Issue(s)

Closes #3923

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@wolf4ood wolf4ood self-assigned this Feb 28, 2024
@wolf4ood wolf4ood added the bug Something isn't working label Feb 28, 2024
…/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImpl.java

Co-authored-by: ndr_brt <andrea.bertagnolli@gmail.com>
@wolf4ood wolf4ood merged commit 17f2e98 into eclipse-edc:main Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EDC 0.5.1 - OAuth2 Identity Service extension: scope empty and keycloak gives back error

3 participants