Commit Graph
4 Commits
Author SHA1 Message Date
Tobiasz Heller c8abfa0209 Windows Webauthn connect with webauthncli package 2022-10-14 09:59:24 +02:00
Tobiasz Heller 9394cc263e Fix running ssh command on multiple nodes with mfa per session (#15641) 2022-09-06 12:40:18 +00:00
Alan Parra 70a0ad132e Consistently prompt for OTPs as password (#11346)
Introduce the prompt.Password function and use it consistently whenever we read
a password, OTP or PIN.

The PR makes it easy to support PINs during MFA authentication, so now we do so.
It also adds the capability to mock prompt.Stdin() for tests, adding a uniform
way to fake user input in tests without having to swap functions.

Complements #10953 and #9160.

* Prompt for OTPs as passwords (take 1), read PINs on MFA authentication
* Add the prompt.Password method
* Add Stdin mocking capabilities to the prompt package
* Delegate password reads to prompt.Stdin().ReadPassword()
* Remove stdinHijack from PromptMFAChallenge
* Change api_login_test.go to FakeReader
* Change tsh_test.go to FakeReader
* Retire client.ReadPassword in favor of prompt.Password
2022-03-28 17:16:00 +00:00
Alex McGrath 39977efc00 Add tests for motd fixes
Part of this includes renaming export_test.go to export.go so I could
test the MOTD outside of lib/client/export.go
2022-03-15 12:18:39 +00:00