Skip to content

✨ Adds HOTP MFA code support#1

Closed
nefrob wants to merge 10 commits intodevelopfrom
nefrob/hotp-2fa-code-support
Closed

✨ Adds HOTP MFA code support#1
nefrob wants to merge 10 commits intodevelopfrom
nefrob/hotp-2fa-code-support

Conversation

@nefrob
Copy link
Copy Markdown

@nefrob nefrob commented Jun 30, 2023

Adds support for counter based 2fa codes for all 2fa methods except app/yubi key

Ref merixstudio#206. It's been 5+ months since this was written so I'm pulling it into our fork.

Please note this repo is currently public so keep your comments non-Tilt specific. Alternatively @roycehaynes transition the repo to being private.

Description

  • HOTP codes are guaranteed to be unique by incrementing a counter each time a code is generated
  • Consequently generating a new code invalidates the previously generated code
  • Storing a timestamp on code generation allows us to use validity windows
  • Clearing the timestamp on successful verify invalidates the current code so it can't be used again
  • To switch to HOTP based codes simply override the default message dispatcher used in the trench settings

Motivation

  • Have SMS MFA codes cycle every generation
  • Keep the security benefits of TOTP

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.

3 participants