-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
honor redirect to SAML SSO path if user is already authenticated #50436
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flyinghermit
requested review from
kimlisa
and removed request for
avatus and
kiosion
December 19, 2024 16:57
flyinghermit
changed the title
Redirect if path is SAML IdP SSO path
honor redirect to SAML SSO path if user is already authenticated
Dec 19, 2024
flyinghermit
commented
Dec 19, 2024
expect(history.push).toHaveBeenCalledWith(samlIdPPath, true); | ||
}); | ||
|
||
it('non-base domain redirects with base domain for a matching "/enterprise/saml-idp/sso"', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We update any other domain to base domain. This test covers that scenario.
Though, this behavior does not sit well with me and I plan to do a followup on idea of rejecting non-base URL instead of replacing it with base URL.
kimlisa
approved these changes
Dec 19, 2024
r0mant
approved these changes
Dec 19, 2024
public-teleport-github-review-bot
bot
removed request for
ravicious and
ryanclark
December 19, 2024 19:15
@flyinghermit See the table below for backport results.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In authenticated session, we always used to redirect to root path
/web
. This was done to prevent showing up Login form for users who are already authenticated but land on thehttps://proxy/web/login?redirect_uri=...
path. This breaks SAML IdP service provider initiated SSO flow when user is already authenticated but is redirected to the root login page.This PR updates such redirection behaviour in the UI so that if user has a valid web session, and the redirection path matches
enterprise/saml-idp/sso
path, the UI will honor the redirection to let user continue with SAML SSO. For non-matching path, the existing behavior of redirecting to the root/web
path is preserved.changelog: updates the UI login redirection service to honor redirection to
enterprise/saml-idp/sso
path even if user is already authenticated with Teleport.