Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SSO MFA - WebUI backend implementation #47832

Merged
merged 11 commits into from
Nov 6, 2024
Merged

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Oct 22, 2024

Part of the implementation of #44699

Add SSO MFA challenges and response to the web http api and websocket messages.

Depends on #46982

frontend implementation (per-session mfa only): #47876

@Joerger Joerger marked this pull request as draft October 22, 2024 21:09
@Joerger Joerger force-pushed the joerger/sso-mfa-ceremony branch from ada7cd8 to c594570 Compare October 22, 2024 21:27
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch 3 times, most recently from 7fe308a to b122f9e Compare October 22, 2024 21:41
@Joerger Joerger force-pushed the joerger/sso-mfa-ceremony branch 2 times, most recently from 74c3706 to e784fb8 Compare October 23, 2024 03:18
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch from b122f9e to d5f2687 Compare October 23, 2024 03:47
@Joerger Joerger mentioned this pull request Oct 23, 2024
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch from 027a025 to 9eb8e61 Compare October 23, 2024 21:09
@Joerger Joerger force-pushed the joerger/sso-mfa-ceremony branch 7 times, most recently from 6fb82a4 to 12c1da6 Compare October 25, 2024 00:03
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch from 00c431b to a45a867 Compare October 25, 2024 00:27
@Joerger Joerger marked this pull request as ready for review October 25, 2024 00:27
@Joerger Joerger added the no-changelog Indicates that a PR does not require a changelog entry label Oct 25, 2024
@Joerger Joerger force-pushed the joerger/sso-mfa-ceremony branch from 6cc7449 to fb1c62e Compare October 25, 2024 18:51
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch from a45a867 to 7947990 Compare October 25, 2024 18:51
@Joerger Joerger force-pushed the joerger/sso-mfa-ceremony branch from fb1c62e to 78d7977 Compare October 25, 2024 19:04
@Joerger
Copy link
Contributor Author

Joerger commented Nov 4, 2024

@EdwardDowling @probakowski @rosstimothy Friendly ping to review


// SSOResponse is a json compatible [proto.SSOResponse].
type SSOResponse struct {
RequestID string `json:"requestId,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the surrounding existing structs are using snake case

Suggested change
RequestID string `json:"requestId,omitempty"`
RequestID string `json:"request_id,omitempty"`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentional, the frontend uses camel case, but we've been inconsistent with it on the backend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See a bit lower:

type AuthenticateWebUserRequest struct {
	// User is a teleport username.
	User string `json:"user"`
	// WebauthnAssertionResponse is a signed WebAuthn credential assertion.
	WebauthnAssertionResponse *wantypes.CredentialAssertionResponse `json:"webauthnAssertionResponse,omitempty"`
}

lib/client/weblogin.go Show resolved Hide resolved
lib/web/terminal.go Outdated Show resolved Hide resolved
@Joerger Joerger force-pushed the joerger/sso-mfa-web branch from 5fe895b to 66bfc8e Compare November 5, 2024 19:11
@Joerger Joerger enabled auto-merge November 5, 2024 21:09
@Joerger Joerger added this pull request to the merge queue Nov 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2024
@Joerger Joerger added this pull request to the merge queue Nov 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2024
@Joerger Joerger added this pull request to the merge queue Nov 6, 2024
Merged via the queue into master with commit 313acfa Nov 6, 2024
44 checks passed
@Joerger Joerger deleted the joerger/sso-mfa-web branch November 6, 2024 02:02
@public-teleport-github-review-bot

@Joerger See the table below for backport results.

Branch Result
branch/v17 Failed

Joerger added a commit that referenced this pull request Nov 6, 2024
* Add SSO MFA ceremony support to WebUI per-session MFA.

* Add display name to SSO MFA device; Add SSO MFA device to SSO challenge.

* Camel case json tags for front end.

* Add sso channel ID for front end broadcast channel logic.

* Fix backwards compatiblity issue; fix error message.

* Fix test.

* Fallback to connector id if display name isn't set.

* Fix test.

* Resolve comment.

* Use uuid.NewRandom.

* go mod tidy
github-merge-queue bot pushed a commit that referenced this pull request Nov 7, 2024
* Add SSO MFA ceremony support to WebUI per-session MFA.

* Add display name to SSO MFA device; Add SSO MFA device to SSO challenge.

* Camel case json tags for front end.

* Add sso channel ID for front end broadcast channel logic.

* Fix backwards compatiblity issue; fix error message.

* Fix test.

* Fallback to connector id if display name isn't set.

* Fix test.

* Resolve comment.

* Use uuid.NewRandom.

* go mod tidy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/md size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants