Conversation
Joerger
approved these changes
Apr 5, 2025
rosstimothy
approved these changes
Apr 5, 2025
This change adds support for SSO MFA in headless mode.
5e50b0d to
2bd6edf
Compare
atburke
added a commit
that referenced
this pull request
May 7, 2025
This change adds support for SSO MFA in headless mode. Co-authored-by: joerger <bjoerger@goteleport.com>
This was referenced Sep 8, 2025
ravicious
reviewed
Jan 27, 2026
Comment on lines
+68
to
+77
| if req.MFAResponse == nil && req.WebauthnAssertionResponse != nil { | ||
| req.MFAResponse = &client.MFAChallengeResponse{ | ||
| WebauthnResponse: req.WebauthnAssertionResponse, | ||
| } | ||
| } | ||
|
|
||
| mfaResp, err := req.MFAResponse.GetOptionalMFAResponseProtoReq() | ||
| if err != nil { | ||
| return nil, trace.Wrap(err) | ||
| } |
Member
There was a problem hiding this comment.
I think this might have introduced a regression where rejecting a headless login causes a panic (#58864).
2026-01-27T15:38:10.522+01:00 INFO "http: panic serving 127.0.0.1:49464: runtime error: invalid memory address or nil pointer dereference
goroutine 6747436 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1943 +0xb4
panic({0x10ee85f20?, 0x116b50be0?})
runtime/panic.go:783 +0x120
github.com/gravitational/teleport/lib/client.(*MFAChallengeResponse).GetOptionalMFAResponseProtoReq(0x14002ee0640?)
github.com/gravitational/teleport/lib/client/weblogin.go:139 +0x1c
github.com/gravitational/teleport/lib/web.(*Handler).putHeadlessState(0x14002ee0640?, {0x110703b50?, 0x14003ac6cc0?}, 0x14002ee0640, {0x14001a28940?, 0x19?, 0x14003639360?}, 0x14003639360)
github.com/gravitational/teleport/lib/web/headless.go:74 +0xfc
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithAuth.func168({0x1106fe860, 0x14004992060}, 0x14002ee0640, {0x14001a28940, 0x1, 0x1})
github.com/gravitational/teleport/lib/web/apiserver.go:5198 +0xb4
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithAuth.MakeHandler.MakeHandlerWithErrorWriter.func373({0x1106fe860, 0x14004992060}, 0x14002ee0640, {0x14001a28940, 0x1, 0x1})
…
I suppose req.MFAResponse might be nil but we attempt to read it on line 74.
Member
There was a problem hiding this comment.
The Web UI uses the same endpoint to approve and reject a headless request, but rejecting a request should not require MFA.
Edit: Fix here. #63189
teleport/web/packages/teleport/src/services/auth/auth.ts
Lines 245 to 264 in 7b3fe4c
This file contains hidden or 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
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.
This change adds support for SSO MFA in headless mode.
Follow-up to #53166.
Changelog: Added support for SSO MFA as a headless MFA method