magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

Add ability to configure multiple OTPs #830

Closed fooman closed 3 years ago

fooman commented 3 years ago

Description

Improve Extendability of OTP implementation.

The current implementation of the OTP works well for use with Magento's admin. It can even be used for other use cases. What is not possible in its current form is accessing multiple OTPs within the same test run. This is for example needed when trying to configure a Magento admin setting based on a value provided by a 3rd party also behind a 2FA.

Even changing the shared secret on the fly with something like <magentoCLI command="security:tfa:google:set-secret admin {{_CREDS.fooman/other/OTP_SHARED_SECRET}}" stepKey="setSecret"/>
does not work as the OTP is only initialised once.

This PR allows providing a separate secret <getOTP stepKey="getOtherOtp" userInput="fooman/other/OTP_SHARED_SECRET"/>
with
<getOTP stepKey="getOtp" />
retaining the default implementation for Magento's Admin 2FA.

Fixed Issues (if relevant)

  1. N/A

Contribution checklist

jilu1 commented 3 years ago

@fooman Thank you for your pull request! And i see the value/use case to extend this feature.

I will import this PR and we will review and process it according to standard priority. Let us know if this is a blocker or you need it urgently.

jilu1 commented 3 years ago

@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework

magento-engcom-team commented 3 years ago

@jilu1 the pull request successfully imported.

jilu1 commented 3 years ago

https://jira.corp.magento.com/browse/MQE-2683 is created to for this issue and we will update with progress