Skip to content
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

fix: Remove early returns in claims transformation #99

Conversation

Alexr03
Copy link
Contributor

@Alexr03 Alexr03 commented May 10, 2024

Issue:
Current implementation will flow to an early return statement when all of the following requirements are met:

  • RolesClaimTransformationSource.All is set
  • The user does not have any roles in the requested resource
  • The user does have a realm role

Expected Result:
The realm role will be applied to the principal.

Actual Result:
The realm role is not applied to the principal.

Resolution:

  • Remove early returns and allow the method to flow to the end where it will return with the final principal.
  • Added tests to check for this case.

@NikiforovAll NikiforovAll merged commit 018aaea into NikiforovAll:main May 10, 2024
9 checks passed
@NikiforovAll
Copy link
Owner

thank you for the fix

@Alexr03 Alexr03 deleted the fix/role-claim-transformation-early-returns branch May 10, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants