Commit Graph
11 Commits
Author SHA1 Message Date
Zac Bergquist 8cd1c429f5 Fix up some poor wording (#40832)
Closes #40294
Closes #39172
2024-04-23 22:01:41 +00:00
Brian Joerger 6a5a151809 Refactor admin MFA ceremony - don't create an MFA challenge the client can't solve (#37367)
* Refactor MFA ceremony logic to avoid creating challenges when the client has no way to solve it.

* Add client-side ErrMFANotSupported for better MFA ceremony error handling.
2024-01-29 18:38:25 +00:00
Brian Joerger 89858233c1 Restore WebUI UpdateUser; add TODO. (#37375) 2024-01-27 00:12:59 +00:00
Brian Joerger 9b733e8b8e Make tctl bots add prompt for MFA just once (#37121)
* Reuse MFA for tctl bots add.

* Fix MFA required check for admin role.

* Remove broken auth preference check; Fix IsMFARequiredCheck for built in Admin role.

* Check for nil MFA response in MFA retry logic.

* Refactor MFA ceremony to return a custom error when MFA is not required.

* Fix TestAdminActionMFA unit tests.

* Fix unit test.
2024-01-24 21:28:52 +00:00
357b2c8207 Refactor Admin Action MFA prompt (#37127)
* Move Admin Action RPC name to debug; rephrase client-visible prompt.

* Update api/mfa/prompt.go

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

* Update api/mfa/prompt.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-01-24 19:36:03 +00:00
Brian Joerger 1db61a6a81 Client MFA Ceremony refactor (#36996)
* Refactor MFA prompt logic for the API client to enable various MFA
ceremony use cases.

* Address comments.
2024-01-23 01:16:18 +00:00
Brian Joerger e8339ae856 MFA for Admin Actions: users (#35386)
* Make user endpoints admin actions.

* Fix user tests.

* Fix update user in the webui.

* Add tctl admin action test suite.

* Minor test suite refactors.

* Resolve comments.

* Use localhost as RPID in test.
2023-12-14 21:39:32 +00:00
Brian Joerger f3feb7fa12 Add WebAuthn support for admin actions in the WebUI (#34814)
* Add WebAuthn support for admin actions in the WebUI.

* Resolve comments; Use async/await.

* Resolve comments.

* Re-add universal mfa parsing logic to the web server.

* Fix lint.

* Address comments.

* Incorporate suggested changes.

* Fix lint.
2023-11-28 19:14:03 +00:00
Brian Joerger 48dc80cf15 MFA for admin actions: Add server side check (#33676)
* Add method to check MFA challenge response for admin actions.

* Add tests.

* Move AuthorizeAdminAction to authz package.

Add ValidateMFAAuthResponse as a dependency for the authorizer.

Update tests to include a mock ValidateMFAAuthResponse method.

* Resolve comments.
2023-11-16 21:30:24 +00:00
Brian Joerger 621c7b3a5b Make MFA prompt client agnostic (#34087)
* Make MFA prompt client agnostic for universal use, e.g. in Teleport Connect.

* Refactor to address CR.

* Resolve comments.

* Add tc.PromptMFA.

* Fix lint.

* Extract common high level interfaces and structs into api/mfa for better flexibility in API MFA prompts.

* Resolve comments.

* Remove unused field.

* Fix miss-set quiet field.
2023-11-09 18:14:12 +00:00
Brian Joerger 9b29150ca0 Add MFA prompt to Clients for Admin Actions. (#30203)
* Add MFA PerRPCredentials.

* Add RetryWithMFA unary interceptor.

* Add MFA prompt retry mechanism for Admin API requests.
2023-08-25 19:14:13 +00:00