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 branding not applied to mfa #6021

Conversation

RushanNanayakkara
Copy link
Contributor

Proposed changes in this pull request

The MFA authentication pages does not applying application even though application level branding is enabled. This is due to the authenticator page URL not having the spId parameter.
This PR adds the spId parameter to all authentication redirect urls that are run through the default request coordinator if they are not being processed through OrganizationAuthenticator. This is since when OrganizationAuthenticator handles the request, it's at the point of SSO ing to sub org. At this point the context still holds the main organization applications spId'. Hence adding that spId` will result in having main org app branding in the sub org application. This scenario is already handled separately.

Related Issue

@jenkins-is-staging
Copy link

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 40.22%. Comparing base (dcc6780) to head (2b6aacb).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
...andler/request/impl/DefaultRequestCoordinator.java 0.00% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6021      +/-   ##
============================================
- Coverage     40.23%   40.22%   -0.01%     
+ Complexity    14223    14208      -15     
============================================
  Files          1734     1734              
  Lines        117149   117170      +21     
  Branches      20155    20159       +4     
============================================
  Hits          47134    47134              
- Misses        62761    62782      +21     
  Partials       7254     7254              
Flag Coverage Δ
unit 23.92% <0.00%> (-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/11312819038
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/11312819038

@@ -393,6 +396,10 @@ && isStepHasMultiOption(context)

if (!context.isLogoutRequest()) {
FrameworkUtils.getAuthenticationRequestHandler().handle(request, responseWrapper, context);
// Adding spIp param to the redirect URL if the authenticator is not the organization authenticator.
if (!ORGANIZATION_AUTHENTICATOR.equals(request.getParameter(AUTHENTICATOR))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we are trying skip adding sp-uuid to the consent page when it is organization authenticator. Trying to understand the how it created an issue. I hope you can proceed with the improvement exclude this and explain the issue may be via sharing the network trace where we can identify how it caused an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not for consent page. It's for the MFA pages in sub org applications.
When organization authenticator is being used, it's the point where the application auth process switches from main org to sub org. At this point the flow is still being executed at the main org level application. But the url being generated here leads to sub org first factor page. If we add the spId in the context to the URL, it'll be the main org application id, which is not valid for the sub org application page.

@RushanNanayakkara RushanNanayakkara merged commit 3a79f0b into wso2:master Oct 14, 2024
2 of 4 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.

6 participants