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

Improve user info response to return roles without internal domain appended #2674

Conversation

sadilchamishka
Copy link
Contributor

@sadilchamishka sadilchamishka commented Jan 16, 2025

Proposed changes in this pull request

Add the below config to enable this improvement.

[oauth.oidc.user_info]
remove_internal_prefix_from_roles=true

Related Issues

@sadilchamishka sadilchamishka force-pushed the improve-userinfo-response-for-roles branch from e4e88d6 to 2dcb821 Compare January 16, 2025 09:11
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 51.79%. Comparing base (b21c233) to head (ea35ff5).

Files with missing lines Patch % Lines
...openidconnect/AbstractUserInfoResponseBuilder.java 64.28% 2 Missing and 3 partials ⚠️
...dentity/oauth/config/OAuthServerConfiguration.java 42.85% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2674      +/-   ##
============================================
- Coverage     56.18%   51.79%   -4.40%     
+ Complexity     8242     6433    -1809     
============================================
  Files           631      631              
  Lines         46794    52699    +5905     
  Branches       9043    10277    +1234     
============================================
+ Hits          26291    27294    +1003     
- Misses        16728    21530    +4802     
- Partials       3775     3875     +100     
Flag Coverage Δ
unit 36.39% <57.14%> (-2.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sadilchamishka sadilchamishka force-pushed the improve-userinfo-response-for-roles branch from 49a33b9 to 63e5358 Compare January 16, 2025 10:02
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/12810813485

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12810813485
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/12810813485

@sadilchamishka sadilchamishka force-pushed the improve-userinfo-response-for-roles branch from e2a2fd6 to 18e1094 Compare January 20, 2025 16:49
shashimalcse
shashimalcse previously approved these changes Jan 21, 2025
@sadilchamishka sadilchamishka force-pushed the improve-userinfo-response-for-roles branch 2 times, most recently from ea35ff5 to 8559bcf Compare January 22, 2025 05:41
@sadilchamishka
Copy link
Contributor Author

The added test cases cover the flow. But the test classes written in the oauth endpoint module. Even the required case is validated, the code coverage is not counted as the code is covered from the a different mdoule.
Merging the PR as the logic is covered via the added test case.

@sadilchamishka sadilchamishka merged commit cecf1b2 into wso2-extensions:master Jan 22, 2025
3 of 5 checks passed
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.

4 participants