magento / security-package

Magento Security Extensions
Open Software License 3.0
73 stars 69 forks source link

Admin user 2FA provider preference not saving #295

Closed hunterallen closed 3 years ago

hunterallen commented 3 years ago

Preconditions (*)

  1. Magento 2.4.2
  2. Authy and U2F 2FA providers enabled

Steps to reproduce (*)

  1. Enable Authy and U2F in Stores > Configuration > Security > 2FA
  2. Login to admin without U2F key

Expected result (*)

  1. Expected to be prompted with users default 2FA option.

Actual result (*)

  1. Users without U2F key prompted to re-configure Two-Factor Authorization. 2fa

After re-configuring Two-Factor Authorization, users are redirected to the admin dashboard as expected. Once the user logs out and attempts to log in again, the cycle repeats.

Additional Information

Database table "tfa_user_config" is saving the users "default_provider" correctly (either Authy or u2fkey).


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @hunterallen. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

hunterallen commented 3 years ago

@magento give me 2.4-develop instance with extensions magento/security-package:1.0-develop

magento-deployment-service[bot] commented 3 years ago

Hi @hunterallen. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 3 years ago

Hi @hunterallen, here is your Magento Instance: https://ab1981d9be8deb05026753f571ec44e9-2-4-develop.instances.magento-community.engineering Admin access: https://ab1981d9be8deb05026753f571ec44e9-2-4-develop.instances.magento-community.engineering/admin_a97c Login: f7f4db74 Password: daa6d62b3470

hunterallen commented 3 years ago

@magento give me 2.4-develop instance with extensions magento/security-package:1.0-develop

magento-deployment-service[bot] commented 3 years ago

Hi @hunterallen. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 3 years ago

Hi @hunterallen, here is your Magento Instance: https://ab1981d9be8deb05026753f571ec44e9-2-4-develop.instances.magento-community.engineering Admin access: https://ab1981d9be8deb05026753f571ec44e9-2-4-develop.instances.magento-community.engineering/admin_5079 Login: b19c6103 Password: bb8323ca8c87

m2-assistant[bot] commented 3 years ago

Hi @shikhamis11. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

magento-engcom-team commented 3 years ago

:white_check_mark: Confirmed by @engcom-Oscar Thank you for verifying the issue. Based on the provided information internal tickets MC-42069 were created

Issue Available: @engcom-Oscar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] commented 3 years ago

Hi @hunterallen. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


nathanjosiah commented 3 years ago

Hello @hunterallen! This is something that our team has been discussing just recently in various forms. The summary of the conversations is this is currently correct behavior although it isn't ideal and we would like to address it at some point.

You are only required to enable one of the supported providers and once they are configured only one is required to sign in. However, you will continue to be prompted to configure each of them until all required providers are configured. We had a very tight schedule and limited resources to completely rebuild and redocument all of 2FA so not everything all the features that we wanted were able to be implemented.

Having said that, I am not opposed to adding the ability to support more flexible options for 2FA providers so long as one is always required and configured. But this would require some planning and new designs since the current design would prevent you from configuring more than one provider if we made some optional. The biggest factor here is we don't have the bandwidth to support any feature development for 2FA right now.

If you would like to make a proposal for us to consider we could review that along with an associate PR if you would like.

amansilla commented 2 years ago

I have the same issue, after inserting the yubikey you get access to the backend but the connection is not persisted so it can be reused in further connections. Every time you login into the backend you've to get the Magento email and reconfigure it every time.