Skip to content

Add capability of adding MFA to the new auth device wizard#38260

Merged
bl-nero merged 5 commits intomasterfrom
bl-nero/new-auth-device-dialog-3
Feb 19, 2024
Merged

Add capability of adding MFA to the new auth device wizard#38260
bl-nero merged 5 commits intomasterfrom
bl-nero/new-auth-device-dialog-3

Conversation

@bl-nero
Copy link
Copy Markdown
Contributor

@bl-nero bl-nero commented Feb 15, 2024

Contributes to #36232
Contributes to #37616

This PR doesn't include proper styling; a follow-up PR will make it pretty.

This UI is hidden until ready; to view it, set grv_new_add_auth_device_dialog to true in the app's local storage.

Figma designs

Demo

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

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

Approved with a few small comments.

<ButtonPrimary type="submit">
{usage === 'passwordless'
? 'Save the Passkey'
: 'Save the MFA method'}
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 Feb 15, 2024

Choose a reason for hiding this comment

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

Can the button just say "Save" ??

The title of the dialog box already says "Save the MFA method" so I don't see why we need to repeat that much text twice.

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.

@zmb3 That was what we settled down on with the UX team. @rishibarbhaya-design, could you confirm?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For what it's worth, when you edit an auth connector or a role, the save button says "SAVE CHANGES" - it does not say "Save the role" or "Save the auth connector"

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.

I'm okay with "Save".

}

function SavePasskeyStep({
export function SaveDeviceStep({
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export function SaveDeviceStep({
export function SaveMfaStep({

Perhaps a more generic name? (Since some would argue that TOTP is not a "device")

Copy link
Copy Markdown
Contributor Author

@bl-nero bl-nero Feb 16, 2024

Choose a reason for hiding this comment

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

I'm using an "auth device" as an abstract term for all of these, the entire wizard is called AddAuthDeviceWizard, and MFA is actually a less generic name (since it explicitly excludes passkeys). Note that I inherited the "device" terminology from existing code (AddDevice.tsx, useAddDevice, etc.). If we want to rename the concept of "device" to something else, perhaps we could consider "auth method", and rename the appropriate elements to AddAuthMethodWizard, SaveMethodStep, etc. However, as the "device" terminology is also used across our backend codebase, I'd say this would end up being more confusing than useful.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I still think SaveMfaStep is best.

"Devices" is an overloaded term in Teleport, because we also have Device Trust which keeps an inventory of trusted devices in the backend.

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.

OK, I can rename it, but I'd like to know your ideas about renaming CreateMfaBox, then. SInce with SaveMfaStep, MFA will actually "MFA or a passkey", while in case of CreateMfaBox, MFA will mean exactly MFA. Is there any specific name I could then put on "MFA, but really MFA"?

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.

(This, plus a bunch of other variables with mfa in name and whose names will then be confusing.)

<br />
We recommend{' '}
<Link href="https://authy.com/download/" target="_blank">
Authy
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know this has always been here, but I wonder if it should stay.

Do we actually recommend authy? If so, why? I don't know that anyone can answer these questions.

cc @xinding33 @roraback what do you guys think about this?

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for leaving JSDocs on the new props that you added.

@bl-nero bl-nero added the no-changelog Indicates that a PR does not require a changelog entry label Feb 16, 2024
@bl-nero bl-nero added this pull request to the merge queue Feb 19, 2024
Merged via the queue into master with commit 04b5a8e Feb 19, 2024
@bl-nero bl-nero deleted the bl-nero/new-auth-device-dialog-3 branch February 19, 2024 09:56
bl-nero added a commit that referenced this pull request Feb 22, 2024
* Add capability of adding MFA to the new auth device wizard

* Review

* Review

* License
github-merge-queue Bot pushed a commit that referenced this pull request Feb 23, 2024
)

* Add an option to enable a new Add Device dialog design (#37747)

* Add an option to enable a new Add Device dialog design

Also deduplicate code from storageService functions that parse JSON.

* lint

* A wizard for adding authentication devices (#38100)

* A wizard for adding authentication devices

* Hide changes between localStorage flag

* Review

* Add capability of adding MFA to the new auth device wizard (#38260)

* Add capability of adding MFA to the new auth device wizard

* Review

* Review

* License

* Make the auth device wizard look pretty (#38353)

* Add capability of adding MFA to the new auth device wizard

* Review

* Review

* Make the auth device wizard look pretty

* License

* Review

* Fix lint

* Remove the old AddDevice dialog and substitute it with the new wizard (#38393)

* Remove the old AddDevice dialog

Also cleans up the accompanying local storage flag.

* Rename `canAddMFA`

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

* Update a success message

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

* review

* Review

---------

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

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/md ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants