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

preventing replay attack on MFA passcodes #14056

Merged
merged 3 commits into from
Feb 16, 2022

Conversation

hghaf099
Copy link
Contributor

@hghaf099 hghaf099 commented Feb 14, 2022

Rejecting already used passcodes.
Fixing tests and a couple of bugs.
Adding response warning for the first phase of login. This is to make sure users note they would need to validate the first phase.

Copy link
Contributor

@raskchanky raskchanky 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, one tiny nit on error formatting.

vault/login_mfa.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 16, 2022 19:24 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 16, 2022 19:24 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 16, 2022 19:26 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 16, 2022 19:26 Inactive
@hghaf099 hghaf099 requested a review from raskchanky February 16, 2022 19:26
@raskchanky raskchanky merged commit 02c8b5d into vault-4554-oss Feb 16, 2022
@raskchanky raskchanky deleted the prevent-passcode-reuse branch February 16, 2022 19:28
raskchanky added a commit that referenced this pull request Feb 17, 2022
* Login MFA

* ENT OSS segragation (#14088)

* Delete method id if not used in an MFA enforcement config (#14063)

* Delete an MFA methodID only if it is not used by an MFA enforcement config

* Fixing a bug: mfa/validate is an unauthenticated path, and goes through the handleLoginRequest path

* adding use_passcode field to DUO config (#14059)

* add changelog

* preventing replay attack on MFA passcodes (#14056)

* preventing replay attack on MFA passcodes

* using %w instead of %s for error

* Improve CLI command for login mfa (#14106)

CLI prints a warning message indicating the login request needs to get validated

* adding the validity period of a passcode to error messages (#14115)

* PR feedback

* duo to handle preventing passcode reuse

Co-authored-by: hghaf099 <[email protected]>
Co-authored-by: hamid ghaf <[email protected]>
hghaf099 added a commit that referenced this pull request Feb 24, 2022
* Login MFA

* ENT OSS segragation (#14088)

* Delete method id if not used in an MFA enforcement config (#14063)

* Delete an MFA methodID only if it is not used by an MFA enforcement config

* Fixing a bug: mfa/validate is an unauthenticated path, and goes through the handleLoginRequest path

* adding use_passcode field to DUO config (#14059)

* add changelog

* preventing replay attack on MFA passcodes (#14056)

* preventing replay attack on MFA passcodes

* using %w instead of %s for error

* Improve CLI command for login mfa (#14106)

CLI prints a warning message indicating the login request needs to get validated

* adding the validity period of a passcode to error messages (#14115)

* interactive CLI for mfa login

* minor fixes

* bail if no input was inserted

* change label name

* interactive CLI when single methodID is returned from login request

* minor fix

* adding changelog

* addressing feedback

* a user with a terminal should be able to choose between interactive and non-interactive.  A user without a terminal should not be able to use the interactive mode.

Co-authored-by: Josh Black <[email protected]>
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