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 a post authenticaton handler to validate email domain during federated authentication #6177

Merged
merged 8 commits into from
Jan 27, 2025

Conversation

Yasasr1
Copy link
Contributor

@Yasasr1 Yasasr1 commented Dec 4, 2024

Proposed changes in this pull request

This pr introduces a new post authentication handler to validate the email address of the user authenticated from a federated IDP.

This handler will be invoked when email domain based organization discovery is enabled to prevent user authentication and provisioning to organizations when the authenticated user's email domain does not match with any of the mapped email domains for the organization.

Related issue

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 53.33333% with 63 lines in your changes missing coverage. Please review.

Project coverage is 46.26%. Comparing base (97d2cbf) to head (548cb20).
Report is 199 commits behind head on master.

Files with missing lines Patch % Lines
...ler/request/impl/EmailDomainValidationHandler.java 52.94% 28 Missing and 12 partials ⚠️
.../authentication/framework/util/FrameworkUtils.java 55.17% 9 Missing and 4 partials ⚠️
.../framework/internal/FrameworkServiceComponent.java 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6177      +/-   ##
============================================
+ Coverage     45.83%   46.26%   +0.42%     
+ Complexity    15127    15072      -55     
============================================
  Files          1736     1729       -7     
  Lines        107598   106789     -809     
  Branches      19666    18958     -708     
============================================
+ Hits          49320    49406      +86     
+ Misses        51246    50342     -904     
- Partials       7032     7041       +9     
Flag Coverage Δ
unit 30.36% <53.33%> (+0.10%) ⬆️

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.

@Yasasr1 Yasasr1 force-pushed the add-email-domain-validatioh branch 2 times, most recently from b25fbc7 to f2d9736 Compare December 6, 2024 08:04
@Yasasr1 Yasasr1 force-pushed the add-email-domain-validatioh branch from f2d9736 to f5cda0f Compare December 6, 2024 09:29
@Yasasr1 Yasasr1 changed the title Add a post authenticaton handler to validation email domain during federated authentication Add a post authenticaton handler to validate email domain during federated authentication Dec 6, 2024
@Yasasr1 Yasasr1 marked this pull request as draft December 13, 2024 04:23
@Yasasr1 Yasasr1 marked this pull request as ready for review January 6, 2025 04:02
@Yasasr1
Copy link
Contributor Author

Yasasr1 commented Jan 9, 2025

All above comments are addressed with a338dc7

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

AnuradhaSK
AnuradhaSK previously approved these changes Jan 24, 2025
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@Yasasr1 Yasasr1 merged commit 74ed3e6 into wso2:master Jan 27, 2025
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.

5 participants