Commit Graph
13 Commits
Author SHA1 Message Date
Noah StrideandZac Bergquist 11010018db Migrate ChangePassword RPC from HTTP to gRPC (#18682)
* Migrate ChangePassword RPC from HTTP to gRPC

* Fix incorrect jsontag on webauthn field of ChangePasswordRequest

* Fix broken tests

* reorder imports :D

* Fix REMOVE IN -> DELETE IN comment

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2022-11-26 12:47:43 +00:00
rosstimothy adc37b4ba3 Add context.Context to AuthenticateWebUser and AuthenticateSSHUser (#14754)
Updates auth.ClientI to require that both methods take a
context.Context as the first argument. Context propogation required
some additional call sites to ensure the proper context is plumbed
down to the auth.ClientI calls.
2022-07-25 16:05:40 +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 4ce2771a4c Consistent webauthn JSON field naming for web (#8559)
* removes underscores
* created a new handler to replace a deprecated handler:
   webapi/u2f/password/changerequest
2021-10-13 11:11:39 -07:00
Lisa Kim 659516a5f1 Bug fix: Get user from logged in context (#8460)
When getting a u2f challenge when changing password,
user should be retrieved from logged in context
2021-10-04 09:24:15 -07:00
Alan Parra 6187d00c74 Add Webauthn support to ChangePassword and Ping (#8337)
Add Webauthn support to a few outstanding endpoints and RPCs.

* Refactor and add Webauthn support to ChangePassword
* Add explicit JSON tag to AuthenticateUserRequest.Webauthn
* Add Webauthn support to /webapi/users/password/token
* Add Webauthn to /webapi/ping
* Add default Webauthn device name to ChangeUserAuthentication
* Tidy Ping tests
2021-09-23 13:34:30 -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 2669e7aef2 Open source UI users, roles, github cn, trusted cluster (#5540)
* Transferred user endpoints/handlers from e
* Transferred and refactored endpoints/handlers for roles, trusted clusters, and github cn from e
* Export ok() func so e can use
* Silence rbac auth connector access denials on first check failure
* Update e-ref
2021-02-22 08:54:36 -08:00
5739b63e51 mfa: add new second_factor options "on" and "optional" (#5508)
* mfa: add new second_factor options "on" and "optional"

"on" means that 2FA is required for all users, either TOTP or U2F.

"optional" means that 2FA is supported for all users, but not required.
Only users with MFA devices registered will be prompted for 2FA on
login.

The login with both supported methods is using the same API as the U2F
login. It just now supports TOTP in addition. The API endpoints are
still named after "u2f", I'll rename those in a future PR (in a
backwards-compatible way).

* Apply suggestions from code review

Co-authored-by: Gus Luxton <gus@gravitational.com>
Co-authored-by: a-palchikov <deemok@gmail.com>

* Address reivew feedback

Co-authored-by: Gus Luxton <gus@gravitational.com>
Co-authored-by: a-palchikov <deemok@gmail.com>
2021-02-16 16:24:23 -08:00
Andrew Lytvynov 79b0d54ee8 u2f: extract registration/authentication logic into lib/auth/u2f (#5387)
This is just a refactoring without functional changes. Pull all the u2f
handling spread across multiple client and server packages into one
place.

Also clean up an obsolete vendored dependency, unrelated to this PR.
2021-01-29 11:30:15 -08:00
Lisa Kim dc774ad2e5 Emit Password Change event upon user changing password on UI (#3714) 2020-05-14 11:42:43 -07:00
Alexey Kontsevoy a74a855410 improve error messages and error types for OTP checks 2018-02-22 18:28:06 -05:00
Alexey Kontsevoy c6f42c49d9 adding password change API endpoint 2017-10-13 17:02:40 -04:00