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 support for managing custom federated authenticators. #6105

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

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Nov 5, 2024

Issue:

With this PR, the IDP management service layer is enhanced to support custom federated authentication extensions.

The following changes are included:

  • Introduced a new authenticator configuration model for user-defined federated authenticators, extending the FederatedAuthenticatorConfig class.
  • The IDP management service will accept objects from both the new and existing classes.
  • Added a new class to manage the endpoint configuration of the custom authentication extension.
  • Enhanced the service layer to accommodate endpoint configuration management for user-defined federated authenticators.
  • Improved unit tests to cover the new code changes.

API layer PR:

@Thisara-Welmilla Thisara-Welmilla marked this pull request as draft November 5, 2024 08:28
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 2 times, most recently from 6ce13a6 to e887bdf Compare November 5, 2024 08:33
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 3 times, most recently from a6d7a29 to 16268ae Compare November 5, 2024 10:12
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 93.25153% with 22 lines in your changes missing coverage. Please review.

Project coverage is 40.20%. Comparing base (ff9802f) to head (3d069a9).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
.../wso2/carbon/idp/mgt/dao/CacheBackedIdPMgtDAO.java 86.84% 3 Missing and 2 partials ⚠️
...dp/mgt/internal/IdPManagementServiceComponent.java 0.00% 4 Missing ⚠️
...g/wso2/carbon/idp/mgt/dao/IdPManagementFacade.java 97.47% 1 Missing and 2 partials ⚠️
...action/management/ActionManagementServiceImpl.java 0.00% 1 Missing and 1 partial ⚠️
...g/wso2/carbon/idp/mgt/IdentityProviderManager.java 92.59% 1 Missing and 1 partial ⚠️
.../org/wso2/carbon/idp/mgt/dao/IdPManagementDAO.java 95.65% 2 Missing ⚠️
...UserDefinedAuthenticatorEndpointConfigManager.java 97.40% 1 Missing and 1 partial ⚠️
.../main/java/org/wso2/carbon/idp/mgt/IdpManager.java 0.00% 1 Missing ⚠️
...o2/carbon/idp/mgt/util/IdPManagementConstants.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6105      +/-   ##
============================================
- Coverage     41.13%   40.20%   -0.93%     
- Complexity    14752    14823      +71     
============================================
  Files          1776     1758      -18     
  Lines        118407   118206     -201     
  Branches      19691    20827    +1136     
============================================
- Hits          48701    47520    -1181     
- Misses        62383    63473    +1090     
+ Partials       7323     7213     -110     
Flag Coverage Δ
unit 26.83% <93.25%> (+1.21%) ⬆️

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-cutsom-fed-auth-mgt-support branch 2 times, most recently from c34802d to 855a182 Compare November 5, 2024 11:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 suggestion.

Files not reviewed (2)
  • components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/dao/IdPManagementDAO.java: Evaluated as low risk
  • components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/util/IdPManagementConstants.java: Evaluated as low risk
Comments skipped due to low confidence (1)

components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/util/AuthenticatorEndpointConfigurationManager.java:166

  • The method should accept AuthenticationType as a parameter instead of hardcoding IDENTIFICATION.
return new UserDefinedFederatedAuthenticatorConfig(AuthenticatorPropertyConstants.AuthenticationType.IDENTIFICATION);

@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 5 times, most recently from 4f4026e to e282f69 Compare November 6, 2024 05:47
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 2 times, most recently from 10f347e to 21fdb39 Compare November 21, 2024 12:36
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

malithie
malithie previously approved these changes Nov 22, 2024
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 3 times, most recently from 814c4fd to 5def815 Compare November 22, 2024 13:26
@Thisara-Welmilla Thisara-Welmilla force-pushed the add-cutsom-fed-auth-mgt-support branch 4 times, most recently from 9000606 to ba2a680 Compare November 26, 2024 04:26
Copy link

sonarcloud bot commented Nov 26, 2024

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