Commit Graph
20 Commits
Author SHA1 Message Date
Edoardo Spadolini ccffd6b5be Allow unknown fields when unmarshaling protojson resources (#53469)
* Prohibit implicitly strict protojson unmarshaling

* Avoid jsonpb.Unmarshal

* Define marshal option to disallow unknown fields

* Avoid protojson.Unmarshal

* Disallow unknown fields in tctl create

* Disallow unknown fields in the web UI
2025-03-27 14:35:37 +00:00
Brian Joerger e37d699745 Fix Admin MFA required check (#51618)
* Fix admin mfa required check.

* Fix test.

* Add client fallback mechanism by removing pre-existing mfa context from admin action mfa ceremony.
2025-02-04 17:15:11 +00:00
Brian Joerger 169128dc17 feat: SSO MFA - Moderated Sessions (#48646)
* Add sso client redirect url to maintain session rpc.

* Handle sso client redirect URL in maintain session presence RPC.

* Add client implementation of SSO MFA for moderated sessions.

* Cleanup.
2024-11-12 20:08:50 +00:00
Brian JoergerandMarco Dinis 2d77d1cfd9 SSO MFA - fail gracefully when the Proxy is down (#48641)
* Allow SSO MFA to fail gracefully on the client when the Proxy is down.

* Update api/mfa/ceremony.go

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

---------

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2024-11-09 02:09:55 +00:00
Brian JoergerandAlan Parra 5e7bdb2a15 feat: SSO MFA - Add SSO MFA ceremony (#46982)
* Add SSOMFACeremony to MFA prompt; Add SSOMFACeremonyConstructor to MFA ceremony.

* Set SSO MFA ceremony from client configuration.

* Close sso mfa redirector once mfa ceremony is complete.

* Refactor sso mfa ceremony.

* Add SSOMFACeremonyConstructor.

* Add tests.

* Add --mfa-mode=sso support; Add cli prompt UX changes.

* Remove unused field, fix test.

* Resolve comments.

* Remove convoluted context closing logic for sso redirector.

* Fix test.

* Update lib/client/sso/ceremony.go

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-10-29 21:23:46 +00:00
Alan Parra e22aad362e Warn users about upcoming OTP for session MFA deprecation (#48096) 2024-10-29 20:02:27 +00:00
Brian Joerger db8cadfc44 Refactor CLI prompt and config logic (#47874)
* Refactor CLI prompt and config logic.

* Move CLI prompt configuration to CLIPrompt

* Factor out dual prompt in CLI prompt logic.

* Make cli config a field rather than embedded; Add NewCLIPromptV2.
2024-10-24 21:50:27 +00:00
Brian JoergerandMarco Dinis 6bf20b5518 Remove SolveAuthenticateChallenge from MFA Ceremony in favor of PromptConstructor (#47650)
* Remove mfa.Ceremony.SolveChallenge in favor of PromptFunc.

* Update api/mfa/ceremony.go

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

---------

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2024-10-21 18:38:50 +00:00
Brian Joerger 6a1d6662dd Unify and simplify MFA Ceremony helpers (#46986)
* Refactor MFA ceremony helpers.

* Refactor session MFA ceremony to use new MFA ceremony helpers.

* Simplify calls to NewMFACeremony.

* Remove remaining usage of tc.PromptMFA in favor of Ceremony.

* Rename prompt constructor.

* Add godoc to ceremony; update tests.

* Cleanup.

* Resolve comments; fix tests.

* Update comments.

* Fix test.

* Fix lint.
2024-10-02 19:09:45 +00:00
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