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 authenticator management #6290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Jan 16, 2025

Issue:

With custom authentication extension feature, there will be two type of local authenticators, system defined local authenticators and user defined local authenticator. The current existing method for retrieving all local authenticators only consider system defined local authenticators and not returning returning user defined authenticators.
The code logic of those methods cannot be updated to retrieve the user defined local authenticators as well, as it required tenant domain, but those methods does not get tenant domain as parameter. Therefore, those methods will be depreciated and introduce new methods to retrieve both system and local authenticators.

@Thisara-Welmilla Thisara-Welmilla force-pushed the improve-authenticator-mgt branch from 62bf5b7 to 682372d Compare January 16, 2025 08:58
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 8 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@6640eab). Learn more about missing BASE report.
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...cation/common/ApplicationAuthenticatorService.java 0.00% 4 Missing ⚠️
...lication/mgt/ApplicationManagementServiceImpl.java 40.00% 3 Missing ⚠️
.../openjdk/nashorn/JsOpenJdkNashornGraphBuilder.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6290   +/-   ##
=========================================
  Coverage          ?   45.90%           
  Complexity        ?    14252           
=========================================
  Files             ?     1655           
  Lines             ?   101268           
  Branches          ?    17576           
=========================================
  Hits              ?    46491           
  Misses            ?    48055           
  Partials          ?     6722           
Flag Coverage Δ
unit 28.95% <33.33%> (?)

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/12807052934

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

throws AuthenticatorMgtException {

List<LocalAuthenticatorConfig> configList = new ArrayList<>(getAllUserDefinedLocalAuthenticators(tenantDomain));
configList.addAll(localAuthenticators);
Copy link
Member

Choose a reason for hiding this comment

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

At a given point of time looks like this won't return all system defined authenticators. This is because system defined authenticators are provided an input to the service.
This is fine for the moment as that is how this service is defined

@Thisara-Welmilla Thisara-Welmilla force-pushed the improve-authenticator-mgt branch 4 times, most recently from a59c5b0 to 11e2dbb Compare January 18, 2025 18:46
@Thisara-Welmilla
Copy link
Contributor Author

The Sonar reporting following issues, which are false positive.

  1. Line duplication of for (LocalAuthenticatorConfig localAuthenticatorConfig : getLocalAuthenticatorConfigsList()) {. This cannot be removed.
  2. Reminder to remove depreciated methods.

@Thisara-Welmilla Thisara-Welmilla force-pushed the improve-authenticator-mgt branch from 11e2dbb to dd2bc07 Compare January 18, 2025 19:00
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.1% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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