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

Fix WebUI Admin Action infinite retry with no MFA devices #51134

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Jan 16, 2025

#49679 and subsequently #50570 introduced a change where getMfaChallengeResponse could return null | undefined when the user had no MFA challenges (no devices or not required). fetchJsonWithMfaAuthnRetry expects getMfaChallengeResponse to return {} in these cases, and will retry with MFA until it gets either an empty or non-empty object.

This PR fixes the issue by:

  1. addressing the recursive fetchJsonWithMfaAuthnRetry which could result in an infinite loop. It's no longer recursive so it will only retry once even if null or undefined is received.
  2. Reverting part of https://github.com/gravitational/teleport/pull/50570/files and instead making getMfaChallengeResponse return {} so we can properly determine at any point whether an mfa response is undefined or an empty response resulting from a no-op challenge attempt (no devices or not required).

Closes #51105

image

@Joerger Joerger force-pushed the joerger/fix-webui-admin-action-retry branch from 21430bc to 61b4600 Compare January 16, 2025 19:36
@Joerger Joerger added backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry labels Jan 16, 2025
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/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User creation hangs in the web UI with no error message if no MFA method is added
1 participant