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

Add new VerificationAuthenticatorConfig for verification authenticators. #6041

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

Conversation

Thisara-Welmilla
Copy link
Contributor

Task issue:

With this PR following changes may introduced.

  1. Introduce new VerificationAuthenticatorConfig class for 2FA authenticators extendingc LocalAuthenticatorConfig.
  2. Those authenticator config will always have 2FA tag by default.
  3. Improve application authentication service to support managing new local custom authenticators (Local user account identification and 2FA authentication types)

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch 3 times, most recently from cd8387c to a887a38 Compare October 21, 2024 10:55
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 76.75841% with 76 lines in your changes missing coverage. Please review.

Project coverage is 40.43%. Comparing base (2466380) to head (5b5624b).
Report is 150 commits behind head on master.

Files with missing lines Patch % Lines
...ommon/dao/impl/AuthenticatorManagementDAOImpl.java 76.10% 32 Missing and 6 partials ⚠️
...on/common/exception/AuthenticatorMgtException.java 18.18% 18 Missing ⚠️
...mon/exception/AuthenticatorMgtServerException.java 0.00% 10 Missing ⚠️
.../identity/base/AuthenticatorPropertyConstants.java 0.00% 3 Missing ⚠️
...lication/common/cache/AuthenticatorCacheEntry.java 66.66% 2 Missing ⚠️
...pplication/common/cache/AuthenticatorCacheKey.java 75.00% 1 Missing and 1 partial ⚠️
.../common/model/VerificationAuthenticatorConfig.java 77.77% 1 Missing and 1 partial ⚠️
...ommon/constant/AuthenticatorMgtErrorConstants.java 94.73% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6041      +/-   ##
============================================
+ Coverage     40.21%   40.43%   +0.21%     
- Complexity    14214    14534     +320     
============================================
  Files          1740     1774      +34     
  Lines        117126   119277    +2151     
  Branches      18931    20516    +1585     
============================================
+ Hits          47106    48225    +1119     
- Misses        62792    63727     +935     
- Partials       7228     7325      +97     
Flag Coverage Δ
unit 25.07% <76.75%> (+1.08%) ⬆️

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.

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch 4 times, most recently from baa3e99 to b6248b3 Compare October 22, 2024 16:18
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch 7 times, most recently from 9d24d6f to 2e1bfb4 Compare October 24, 2024 02:49
@Thisara-Welmilla Thisara-Welmilla marked this pull request as ready for review October 24, 2024 02:49
@jenkins-is-staging
Copy link

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

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch from 2e1bfb4 to f56f045 Compare October 24, 2024 02:54
@jenkins-is-staging
Copy link

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

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch from 3a83815 to 837b98b Compare October 24, 2024 05:22
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch from 837b98b to 09372f0 Compare October 24, 2024 05:24
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-verification-authenticator-type branch from 943d689 to 5b5624b Compare October 25, 2024 17:22
Copy link

sonarcloud bot commented Oct 25, 2024

Comment on lines +314 to +319
private boolean isBasicInfoUpdated(LocalAuthenticatorConfig existingAuthenticatorConfig,
LocalAuthenticatorConfig updatedAuthenticatorConfig) {

return !existingAuthenticatorConfig.getDisplayName().equals(updatedAuthenticatorConfig.getDisplayName()) ||
existingAuthenticatorConfig.isEnabled() != updatedAuthenticatorConfig.isEnabled();
}
Copy link
Member

Choose a reason for hiding this comment

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

don't quite understand the use of this. why we really need this check ?

Copy link
Contributor Author

@Thisara-Welmilla Thisara-Welmilla Oct 28, 2024

Choose a reason for hiding this comment

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

Only display name or isEnabled updated, we need to update the IDP_AUTHENTICATOR table. So if this check failed, then only the properties will be updated.


INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server');

CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS (
Copy link
Member

Choose a reason for hiding this comment

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

why we need to add all this schema for the test ? why not we use only needed ?

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