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

Set Default SharedProfileValueResolvingMethod for local claims in Unified Claim Manager #6302

Merged

Conversation

AnuradhaSK
Copy link
Contributor

Proposed changes in this pull request

For user defined custom claims, there can be cases where SharedProfileValueResolvingMethod claim metadata property is not set.
For system defined claims, there can be cases where system claims were persisted in the DB prior to bringing system claims handled by runtime.

To address the above two cases, relevant default values for SharedProfileValueResolvingMethod property should be set in the unified claim manager service.

Logic is:

Check whether the SharedProfileValueResolvingMethod claim property value is empty for the DB persisted claim.
If yes:

  1. Check if the claim is a system claim: Then resolve the SharedProfileValueResolvingMethod claim property value from system default claim's properties
  2. Check if the claim is a custom claim: Then set "FromOrigin" as the default value for SharedProfileValueResolvingMethod claim property

@jenkins-is-staging
Copy link

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

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

Project coverage is 46.21%. Comparing base (368134f) to head (92e88a3).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
...laim/metadata/mgt/UnifiedClaimMetadataManager.java 86.36% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6302      +/-   ##
============================================
+ Coverage     45.91%   46.21%   +0.29%     
+ Complexity    14481    14448      -33     
============================================
  Files          1672     1672              
  Lines        103141   102223     -918     
  Branches      18010    17879     -131     
============================================
- Hits          47360    47240     -120     
+ Misses        48970    48212     -758     
+ Partials       6811     6771      -40     
Flag Coverage Δ
unit 29.31% <86.36%> (+0.14%) ⬆️

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.

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@AnuradhaSK AnuradhaSK changed the title Set setDefaultSharedProfileValueResolvingMethod for local claims in Unified Claim Manager Set Default SharedProfileValueResolvingMethod for local claims in Unified Claim Manager Jan 19, 2025
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

Copy link

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12862569685
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/12862569685

@AnuradhaSK AnuradhaSK merged commit 437c166 into wso2:master Jan 20, 2025
5 checks passed
@AnuradhaSK AnuradhaSK deleted the find-default-sharedprofileresolving-method branch January 20, 2025 09: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.

3 participants