Closed fooman closed 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.
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework
@jilu1 the pull request successfully imported.
https://jira.corp.magento.com/browse/MQE-2683 is created to for this issue and we will update with progress
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)
Contribution checklist