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

LG-14261 Add attempt count to mfa setup auth events #11293

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kevinsmaster5
Copy link
Contributor

🎫 Ticket

Link to the relevant ticket:
LG-14261

🛠 Summary of changes

Adds a session token to track number of attempts when setting up an mfa type.
Total sum of attempts gets passed to analytics_events.
Backup codes are excluded since during setup they're added instantly.

📜 Testing Plan

Checklist of steps to confirm the changes.

  • In a separate console run make watch_events
  • http://localhost:3000 with existing or new account add MFA.
  • Observe in the watch_events feed 'Multi-Factor Authentication Setup' that a predictable value for
    properties > event_properties > mfa_attempts is registered

Attempt count will increment by failing and retrying to add mfa for example:

  • Webauthn (Face|Touch or security key) clicking cancel at the browser dialog before completing setup
  • PIV test screen select a failing condition
  • SMS/Voice enter (change) supplied auth code
  • Auth App enter wrong auth code

👀 Screenshots

Screenshot 2024-09-26 at 11 39 10 AM (2)

Screenshot 2024-09-26 at 11 36 53 AM (2)

@kevinsmaster5
Copy link
Contributor Author

Taking a look at second_factor_attempts_count to see if that might take the place of creating a session token.

@kevinsmaster5
Copy link
Contributor Author

Taking a look at second_factor_attempts_count to see if that might take the place of creating a session token.

seems to only work for OTP.

@kevinsmaster5 kevinsmaster5 marked this pull request as ready for review September 30, 2024 13:31
@kevinsmaster5 kevinsmaster5 requested a review from a team September 30, 2024 14:53
Copy link
Member

@mdiarra3 mdiarra3 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 and seems to work locally, but wondering if theres a way for us to push this out to a helper or concern for the verification controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants