[v17] Add OTP fallback for SSHAgentMFAWebSessionLogin (#57133)#57159
Merged
okraport merged 1 commit intobranch/v17from Jul 25, 2025
Merged
[v17] Add OTP fallback for SSHAgentMFAWebSessionLogin (#57133)#57159okraport merged 1 commit intobranch/v17from
okraport merged 1 commit intobranch/v17from
Conversation
* Add OTP fallback for SSHAgentMFAWebSessionLogin In the case Teleport `second_factor` is set to `on`, it is possible for a user to only have OTP configured. Prior to this commit this would result in a auth fail as the created challenge only supported TOTP. Server side would recieve an incomplete `AuthenticateWebUserRequest` object, which fails validation via `CheckAndSetDefaults` and as such only a failed login audit event was emitted with no additional logs. This mode of failure can be reproduced with `tsh bench -d web sessions --auth=local`. changelog: Fixed fallback for web login when second factor is set to `on` but only OTP is configured. * improve errors for unsupported web login mfa challenge * Update lib/client/weblogin.go Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com> * Update lib/client/weblogin.go Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com> * unexport SSHAgentMFAWebSessionLogin and SSHAgentLoginWeb * update sshAgentLoginWebCreateSession signature --------- Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
espadolini
approved these changes
Jul 25, 2025
marcoandredinis
approved these changes
Jul 25, 2025
Merged
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.
Backport #57133 to branch/v17
changelog: Fixed fallback for web login when second factor is set to
onbut only OTP is configured.