Add TOTP/2FA support for SSH keyboard-interactive auth
Automatically generate and submit TOTP codes during SSH keyboard-interactive authentication when a secret is configured for the profile. Backend: - Add TOTPSecret field to SSHConfig model - Detect TOTP/2FA prompts in keyboard-interactive handler using keyword matching (verification code, otp, authenticator, 2fa, etc.) - Generate 6-digit TOTP codes using pquerna/otp library - Retrieve TOTP secret from vault during connection (keychain or file vault) - API: SetTOTPSecret, GetTOTPCode, HasTOTPSecret, DeleteTOTPSecret Frontend: - Add TOTP/2FA section to SSH profile editor (collapsed by default) - Password-masked secret input with show/hide toggle - Save button: encrypts and stores in vault - Test button: generates a live 6-digit code (shown for 5 seconds) - Delete button: removes stored secret - Auto-detect whether secret is already saved (placeholder indicator) - CSS for TOTP input row, danger button style
This commit is contained in:
@@ -16,6 +16,7 @@ require (
|
||||
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect
|
||||
github.com/alessio/shellescape v1.4.1 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
|
||||
github.com/danieljoos/wincred v1.2.0 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
@@ -32,6 +33,7 @@ require (
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pquerna/otp v1.5.0 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/samber/lo v1.49.1 // indirect
|
||||
github.com/tkrajina/go-reflector v0.5.8 // indirect
|
||||
|
||||
Reference in New Issue
Block a user