Commit Graph
12 Commits
Author SHA1 Message Date
Lisa Kim 98230bb2b3 Add per-session mfa support to connection testers (#22528)
* Add MFAAuthenticateResponse field to GenerateUserCerts

* Pass MFA response for connection testers

* Add checking MFA web endpoint

* Address CRs
2023-03-09 20:27:30 +00:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Lisa Kim 833848594f Add passwordless option with user reset/invite (#11748)
* Allow register passwordless on invite/reset
* Specify the type of device usage when registering new device
* Minor refactoring to reduce number of parameters to funcs
* Check if device register requested pwdless, response is pwdless capable
2022-05-12 17:31:10 +00:00
Alan Parra 5023235909 Add passwordless login/registration to auth and web (#10632)
Wire passwordless registration and authorization into Auth and Proxy APIs, thus
making passwordless logins possible.

API changes are described by RFD 52: Passwordless [1].

#9160

[1] https://github.com/gravitational/teleport/blob/master/rfd/0052-passwordless.md#authentication-api-changes

* Add passwordless settings to Auth protos
* Update generated protos
* Register: Apply DeviceUsage in lib/auth
* Register: Apply DeviceUsage in lib/web
* Login: Generate passwordless challenge
* Login: Allow passwordless authentication
* Wire passwordless in lib/web endpoints
* Make mocku2f passwordless setup a bit nicer
2022-03-04 18:41:35 +00:00
Alan Parra bac0ccdc99 Remove U2F support (#10476)
Follows up on #10466 by removing remaining U2F references, including proto/gRPC
surface and the lib/auth/u2f package itself.

#10375

* Remove U2F from lib/auth/ (1)
* Remove U2F from lib/auth/ (2)
* Remove U2F from lib/auth/ (3)
* Remove U2F from lib/services/
* Remove U2F from tsh mfa add suggestions
* Remove U2F protos
* Update generated protos
* Cleanup a few stragglers
* Remove lib/auth/u2f package
* Fix references to auth.MFAAuthenticateChallenge
* Revert needless lib/auth/password.go change
* Update e/ to ad8fd4a (U2F cleanup)
* Fix stragglers from latest master rebase
* Fix lint and compile failures
2022-02-24 19:54:28 +00:00
Alan Parra f8b7b330ad Alias "u2f" to "webauthn" and partially cleanup (#10466)
Alias the "u2f" second factor mode to "webauthn", effectively sunsetting U2F in
favor of WebAuthn.

The change effectively disables "U2F mode" server-side, making Teleport use
WebAuthn instead. This is in line with our compatibility promise, as Teleport
8.x clients are already WebAuthn-capable (and thus have no problems talking to
the cluster).

I have cleaned up a good chunk of U2F references in lib/web and lib/client, plus
a few other places. Changes on lib/auth are just the necessary to get the tests
back to good standing. There is more work to be done, but this seems enough for
a single PR.

#10375

* Remove "Disabled" field from types.Webauthn
* Update generated protos
* Treat second_factor "u2f" as "webauthn"
* Remove references to Webauthn.Disabled
* Remove U2F from lib/web/
* Remove U2F from lib/client/
* Remove U2F from lib/auth/ (partially)
* Fix issues after rebase on master
* Fix typo
2022-02-23 14:10:13 +00:00
Lisa Kim d0c09338ac Rename VerifyAccountRecovery and token ID proto fields (#8395)
- Rename ApproveAccountRecovery to VerifyAccountRecovery 
   to match the language we use for the UI
- Use generic TokenID field naming for requests where more 
   than one type of token is accepted or a single token use 
   may be unlikely (MFA related rpcs)
2021-09-28 10:29:11 -07:00
Lisa Kim 8c4bf751b2 Implement AddMFADeviceSync and GetAccountRecoveryCodes (#8287)
Following allows for UI dashboard mfa and recovery code management:

- Adds new rpc AddMFADeviceSync (nonstream) so users can add device
- Adds new rpc GetAccountRecoveryCodes to retrieve nonsensitive data 
  about a users recovery codes e.g. created date to display in the users 
  dashboard
- Added privilege access to DeleteMFADeviceSync and 
  CreateAccountRecoveryCodes
2021-09-24 12:26:45 -07:00
Lisa Kim c2016bbae7 Unify creating u2f, totp, and webauthn MFA register challenges (#8342)
One endpoint is now responsible for creating/returning 
MFA register challenges:
- Deprecates RotateUserTokenSecrets 
- Deprecates GetSignupU2FRegisterRequest
2021-09-24 08:59:48 -07:00
Lisa Kim e624dd1730 Allow getting MFA authenticate challenge with recovery token (#8231)
Created a new rpc `CreateAuthenticateChallenge` that 
replaces/deprecates `GetMFAAuthenticateChallenge`

Allows 3 ways to invoke this request:
1. with username + password 
2. with token ID (username retrieved from token)
3. with empty request (username retrieved from context)
2021-09-14 14:48:41 -07:00
Lisa Kim 7a7502bd2f Allow deleting/listing MFA devices with recovery tokens (#8197)
- Implemented `DeleteMFADeviceSynce`, which takes in a token 
  that allows users to delete devices during the recovery process
- Refactored `GetMFADevices` to take in recovery token
- Pulled out deleting MFA device (from stream version) into helper func to be re-used
- Added delete MFA web handler
2021-09-14 13:28:22 -07:00
Lisa Kim ab57eab5c0 [RC 2] Extend GetMFADevices to accept tokenID (#8036)
* Add withSecrets bool parameter to identity service GetMFADevices 
  that removes secret (totp key) if true
* Add web handlers for getting devices for authenticated users
* Fix data race with RecoveryAttemptsCRUD test
2021-08-26 19:19:35 -07:00