Make Web Add User prompt for MFA just once#37067
Merged
Conversation
a6ed028 to
9a057f0
Compare
… before creating a user in the WebUI.
9a057f0 to
9055d54
Compare
ryanclark
reviewed
Jan 23, 2024
Contributor
Author
|
@rudream @ryanclark Sorry for the short timeline but could you please review today or tomorrow? I have multiple fixes depending on this change that ought to get into v15. |
zmb3
approved these changes
Jan 24, 2024
| } catch (err) { | ||
| if ( | ||
| err?.response?.status === 400 && | ||
| err?.message.includes('missing target for MFA check') |
Collaborator
There was a problem hiding this comment.
I would put a comment on the Go side where this error is defined that says that the UI depends on this not changing.
Contributor
Author
There was a problem hiding this comment.
The UI only depends on this for old versions, new versions will know how to handle the IsMfaRequiredAdminAction request.
cdd6f40 to
808e339
Compare
r0mant
approved these changes
Jan 24, 2024
Joerger
added a commit
that referenced
this pull request
Jan 24, 2024
* Allow webauthnResponse to be passed into API requests; Prompt for MFA before creating a user in the WebUI. * Skip MFA check if webauthn is not configured. * Add getWebauthnResponseForAdminAction helper function. * Remove unused admin action name. * Fix lint. * Check for specific error. * Address comments. * Relax admin action mfa enforcement expectation, in line with #37136.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 24, 2024
* Allow webauthnResponse to be passed into API requests; Prompt for MFA before creating a user in the WebUI. * Skip MFA check if webauthn is not configured. * Add getWebauthnResponseForAdminAction helper function. * Remove unused admin action name. * Fix lint. * Check for specific error. * Address comments. * Relax admin action mfa enforcement expectation, in line with #37136.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to #36997, this PR updates adding a user from the WebUI to perform the admin action MFA ceremony upfront, allowing reuse so
CreateUserandCreateResetPasswordTokenonly require one prompt.This PR is also a pre-req for other similar PRs since it adds the
webauthnResponseargument topost/put/deleterequests.