Skip to content

[v18] Add Browser MFA#65239

Merged
danielashare merged 1 commit into
branch/v18from
danielashare/backport-browser-mfa-v/18
May 6, 2026
Merged

[v18] Add Browser MFA#65239
danielashare merged 1 commit into
branch/v18from
danielashare/backport-browser-mfa-v/18

Conversation

@danielashare
Copy link
Copy Markdown
Contributor

@danielashare danielashare commented Mar 31, 2026

This is a backport of the Browser MFA feature to v18. The RFD for this feature can be found here.

I've had to make some modifications to get this working with v18:

  1. Backport in-band MFA's MFAService because some Browser MFA RPCs/proto was added to that service, added files are:
    • challenge.proto
    • service.proto
    • buf.yaml
    • grpcserver.go
  2. In master message MFADevice has been moved out of types.proto in to mfa_device.proto, so I've moved message BrowserMFADevice back for the backport
  3. Switched the Route in Teleport.tsx to use element instead of component to work with v18's version of react-router, along with test router changes in BrowserMFA.test.tsx

changelog: Added browser-based MFA option to tsh, enabling passkey/biometric authentication via the browser

Manual Test Plan

Test Environment

Using a mix of v17/v18 clients and servers, testing with OSS and e Teleport (with SSO via Keycloak) locally against with these resources:

  • local ssh server
  • windows desktop
  • remote ssh server (for Vnet testing)

For Browser MFA to be offered to a client, a WebAuthn device must be registered for that user.

Test Cases

  • tsh login
    • specifying --mfa-mode=browser uses Browser MFA
    • without specifying --mfa-mode=browser falls back to Browser MFA when no keys present locally
    • Browser MFA isn't offered when it is disabled at a cluster level
  • tsh ssh
    • specifying --mfa-mode=browser uses Browser MFA
    • without specifying --mfa-mode=browser falls back to Browser MFA when no keys present locally
    • moderated sessions support Browser MFA
  • Teleport Connect
    • can use Browser MFA to login
    • can use Browser MFA to MFA for ssh
    • can use Browser MFA to MFA for Windows Desktop
  • tctl
    • edit cap specifying --mfa-mode=browser uses Browser MFA
    • edit cap without specifying --mfa-mode=browser falls back to Browser MFA when no keys present
  • SSO MFA unaffected by these changes
    • with Browser MFA enabled on the cluster
    • without Browser MFA enabled on the cluster
    • and can use Browser MFA if specified manually
  • Vnet SSH
    • works with no per-session MFA required
    • with per-session MFA required
      • works with a hardware key present
      • fails with no hardware key present
      • works with Browser MFA
      • doesn't request Browser MFA when disabled via config

@danielashare danielashare self-assigned this Mar 31, 2026
@danielashare danielashare marked this pull request as ready for review April 1, 2026 12:01
@github-actions github-actions Bot added backport desktop-access documentation size/xl tctl tctl - Teleport admin tool tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui labels Apr 1, 2026
@danielashare danielashare requested a review from cthach April 30, 2026 16:40
@danielashare danielashare force-pushed the danielashare/backport-browser-mfa-v/18 branch from 192b674 to d3fdd2c Compare April 30, 2026 16:55
@cthach
Copy link
Copy Markdown
Contributor

cthach commented May 4, 2026

@danielashare

I'm doing a full review right now.

Just curious, did you test with VNet? I learned last week that MFA implementation is a separate code path than tsh and Teleport Connect. Please add to the manual test cases just to ensure we exercised it.

Copy link
Copy Markdown
Contributor

@cthach cthach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to manual testing VNet, can we also add test cases for testing backwards compatibility if a newer client that tries browser MFA with an older cluster that doesn't support it if it makes sense? I'm expecting it should fail fast, but I think it is worth checking since we might have users running newer clients that may try to connect to older clusters.

Comment thread api/mfa/ceremony.go
Comment thread api/mfa/ceremony_test.go
Comment thread api/proto/teleport/legacy/types/events/events.proto
Comment thread lib/auth/mfa/mfav1/mocks_test.go
Comment thread lib/auth/mfa/mfav1/service.go
Comment thread lib/client/sso/ceremony.go
Comment thread tool/tctl/common/mfa/mfa_modes.go
Comment thread tool/tctl/common/tctl_test.go
Comment thread tool/tsh/common/tsh_test.go
Comment thread web/packages/teleport/src/BrowserMFA/BrowserMFA.tsx
@cthach cthach self-requested a review May 5, 2026 13:07
Copy link
Copy Markdown
Contributor

@cthach cthach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look OK overall and comments are mostly questions or nits. They are not blocking.

Please just perform the additional manual testing for VNet and older Teleport clusters before merging.

@danielashare
Copy link
Copy Markdown
Contributor Author

Changes look OK overall and comments are mostly questions or nits. They are not blocking.

Please just perform the additional manual testing for VNet and older Teleport clusters before merging.

Thanks for the thorough review, @cthach. I tested VNet, which worked as it uses similar code paths to the MFA prompts that are triggered and resolved inside of Connect. I had tested old/new client/servers, but had forgotten to mention that in my test plan, added now.

@danielashare danielashare force-pushed the danielashare/backport-browser-mfa-v/18 branch from d3fdd2c to 970ee0d Compare May 5, 2026 16:26
[Browser MFA] Add protobuf and config (#63831)

[Browser MFA] Add proto for Browser MFA feature (#64048)

[Browser MFA] Add CompleteBrowserMFAChallenge gRPC (#63873)

[Browser MFA] Rename browser mfa config name (#64980)

[Browser MFA] Add BrowserMFARequestID to CreateAuthenticateChallenge (#63945)

[Browser MFA] Add Browser MFA to challenge request flow (#63936)

[Browser MFA] Add initial requests for browser MFA process to client tools (#64301)

[Browser MFA] Add tsh callback handling for webauthn response (#64461)

[Browser MFA] Add Browser MFA to presence checks (#65052)

[Browser MFA] Add browser MFA path to MFA finish flow (#64523)

[Browser MFA] Add Browser MFA to Connect (#64887)

[Browser MFA] Add Browser MFA UI (#64692)

[Browser MFA] Fix formatting in moderated sessions (#65236)

[Browser MFA] Add Browser MFA ceremony tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport desktop-access documentation hold-for-18.8 size/xl tctl tctl - Teleport admin tool tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants