Skip to content

[Browser MFA] Add BrowserMFARequestID to CreateAuthenticateChallenge#63945

Merged
danielashare merged 1 commit into
masterfrom
danielashare/browser-mfa-auth-chal-with-req-id
Mar 26, 2026
Merged

[Browser MFA] Add BrowserMFARequestID to CreateAuthenticateChallenge#63945
danielashare merged 1 commit into
masterfrom
danielashare/browser-mfa-auth-chal-with-req-id

Conversation

@danielashare
Copy link
Copy Markdown
Contributor

This PR adds the BrowserMFARequestID field to the POST /webapi/mfa/authenticatechallenge call so that the correct challenge extensions can be set when requesting an MFA challenge through the browser. The RFD for this addition can be found here. Needs to be merged after #63831.

These changes address this part of the flow from the above RFD:

sequenceDiagram
    participant browser as Browser
    participant proxy as Proxy
    participant auth as Auth

    browser->>proxy: POST /webapi/mfa/authenticatechallenge<br/>w/ browser_mfa_request_id
    proxy->>auth: rpc CreateAuthenticateChallenge<br/>w/ browser_mfa_request_id
    auth->>auth: Lookup SSOMFASession<br/>Get challenge extensions
    auth->>proxy: MFA Challenge
    proxy->>browser: MFA Challenge
Loading

Manual tests:

  • MFA prompt for per-session still works
  • MFA prompt for creating Passkeys and MFA devices still works
  • MFA prompt for admin actions still works (creating new auth connector)

@danielashare danielashare self-assigned this Feb 18, 2026
@danielashare danielashare added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v18 labels Feb 18, 2026
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
@kimlisa kimlisa removed their request for review February 19, 2026 16:56
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go
Comment thread lib/auth/browser_mfa_test.go
@danielashare danielashare force-pushed the danielashare/browser-mfa-proto branch 4 times, most recently from 0cb377a to 8a5561b Compare March 2, 2026 07:40
Base automatically changed from danielashare/browser-mfa-proto to master March 2, 2026 09:08
@danielashare danielashare force-pushed the danielashare/browser-mfa-auth-chal-with-req-id branch from 3d30faf to e9e925e Compare March 3, 2026 12:51
Copy link
Copy Markdown
Contributor

@nicholasmarais1158 nicholasmarais1158 left a comment

Choose a reason for hiding this comment

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

I didn't manual test, but code looks good.

Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/mfatypes/proto.go
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/browser_mfa_test.go Outdated
Comment thread lib/auth/auth.go
Comment thread lib/auth/auth.go
Comment thread lib/auth/auth.go Outdated
@codingllama
Copy link
Copy Markdown
Contributor

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3dd7938fa2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread lib/web/mfa.go
Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

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

Please resolve merge conflicts and address the codex review.

Comment thread lib/auth/auth.go

// Replace the challenge extensions with the ones found in the SSO MFA object.
// These are the ones from the original tsh request.
challengeExtensions = mfatypes.ChallengeExtensionsToProto(chalExts)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we make sure that SSO MFA sessions record all ChallengeExtensions fields as well? It appears we do not record UserVerificationRequirement:

ChallengeExtensions: &mfatypes.ChallengeExtensions{
Scope: ext.Scope,
AllowReuse: ext.AllowReuse,
},

OK if you want to follow up separately.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll include this in an upstream PR, thanks

@danielashare danielashare force-pushed the danielashare/browser-mfa-auth-chal-with-req-id branch from 3dd7938 to d0542e9 Compare March 26, 2026 08:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0542e9d88

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread lib/auth/auth.go
Comment thread lib/auth/auth.go
@danielashare danielashare added this pull request to the merge queue Mar 26, 2026
Merged via the queue into master with commit c289ef5 Mar 26, 2026
42 checks passed
@danielashare danielashare deleted the danielashare/browser-mfa-auth-chal-with-req-id branch March 26, 2026 11:03
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@danielashare See the table below for backport results.

Branch Result
branch/v18 Failed

danielashare added a commit that referenced this pull request May 6, 2026
[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
ivan-bax pushed a commit to ivan-bax/teleport that referenced this pull request May 22, 2026
[Browser MFA] Add protobuf and config (gravitational#63831)

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

[Browser MFA] Add CompleteBrowserMFAChallenge gRPC (gravitational#63873)

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

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

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

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

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

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

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

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

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

[Browser MFA] Fix formatting in moderated sessions (gravitational#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/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants