-
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
Add support for SAML SLO in the WebUI #43071
Conversation
b236824
to
f80e08f
Compare
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.tsx
Outdated
Show resolved
Hide resolved
Actually... wouldn't it be simpler if the logout handler in the web api redirected the user to the SLO URL automatically? I feel like doing this on the frontend side has many downsides: we need to pass the user context to |
fa86531
to
029343e
Compare
@gzdunek This is a good idea and I've implemented it. I couldn't get |
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.
I think the decision to get rid of samlSloUrl
from the user context was good, the frontend code is much simpler now.
I left some comments, but I'd appreciate more reviews on this (from folks having more experience with auth).
One more thought: the activity checker logs the user out of teleport in case of inactivity. Is it an expected behavior that we will also log the user out of IdP? |
Yes, for now this is expected behaviour. I asked Zac and he said he'll ask product and get back to me, it's a simple change in case we want to revert it. |
72aba06
to
2434364
Compare
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.
LGTM!
78e6727
to
b13cb25
Compare
a69ea96
to
706e0d0
Compare
706e0d0
to
e32b2b4
Compare
err = h.logout(r.Context(), w, ctx) | ||
if err != nil { | ||
return nil, trace.Wrap(err) | ||
} | ||
|
||
// If the user has SAML SLO (single logout) configured, return a redirect link to the SLO URL. | ||
if user != nil && len(user.GetSAMLIdentities()) > 0 && user.GetSAMLIdentities()[0].SAMLSingleLogoutURL != "" { |
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.
user
could be non-nil even with a non-nil returned error depending on how GetUser
is implemented, please add a user = nil
in the err != nil
branch above.
Purpose
Resolves #41076
e
counterpart: https://github.com/gravitational/teleport.e/pull/4409This PR adds support for SP-initiated SAML SLO (single logout) in the WebUI (
tsh
will be a separate PR). If asingle_logout_url
(which is obtained from the IdP) is configured in the SAML auth connector, when a user logs out of Teleport, they will also be logged out of their identity provider.changelog: Add support for SAML single log-out