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 error at cloning authentication context. #6498

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

Thisara-Welmilla
Copy link
Contributor

Issue:

Follwoing changes are added with this PR:

  1. Introduce new method to ApplicationAuthenticatorManager class to get serializable IdP by resource Id.
  2. Change IdentityProviderManager.getInstance() -> FrameworkServiceDataHolder.getInstance().getIdentityProviderManager()

@Thisara-Welmilla Thisara-Welmilla force-pushed the improve-cloning branch 3 times, most recently from 2b4393e to 9d1b8ef Compare February 14, 2025 11:05
* Returns extended IDP with resource ID.
* Note: The UserDefinedFederatedAuthenticatorConfig object in the IdentityProvider is not serializable using
* org.apache.commons.lang3.SerializationUtils, which is used in the authentication framework to clone the
* authentication context. Hence, use getSerializableIdPByResourceId(String, String) in FrameworkUtils,
Copy link
Member

Choose a reason for hiding this comment

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

Add @link annotation and this is not in FrameworkUtils right

Copy link
Contributor Author

@Thisara-Welmilla Thisara-Welmilla Feb 14, 2025

Choose a reason for hiding this comment

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

Cannot use link as we need to import framework component here.
Updated the commnet FrameworkUtils -> ApplicationAuthenticatorManager

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jenkins-is-staging
Copy link

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

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 46.96%. Comparing base (64a8b25) to head (bae7081).
Report is 56 commits behind head on master.

Files with missing lines Patch % Lines
...ework/config/model/OptimizedApplicationConfig.java 0.00% 4 Missing ⚠️
...n/framework/cache/AuthenticationContextLoader.java 0.00% 2 Missing ⚠️
...ork/config/model/OptimizedAuthenticatorConfig.java 0.00% 2 Missing ⚠️
...internal/core/ApplicationAuthenticatorManager.java 75.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (37.50%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6498      +/-   ##
============================================
- Coverage     47.15%   46.96%   -0.19%     
- Complexity    15278    15309      +31     
============================================
  Files          1747     1747              
  Lines        105380   106002     +622     
  Branches      19488    19646     +158     
============================================
+ Hits          49694    49786      +92     
- Misses        48631    49143     +512     
- Partials       7055     7073      +18     
Flag Coverage Δ
unit 30.50% <37.50%> (+0.01%) ⬆️

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

@Thisara-Welmilla Thisara-Welmilla merged commit 78e3ecc into wso2:master Feb 15, 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.

3 participants