Skip to content

Commit 1ddc783

Browse files
authored
Grammar and formatting
1 parent 557b154 commit 1ddc783

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

docs/configure-2fa.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
1-
# MFTF Configuration for Magento with Two-Factor Authentication (2FA)
1+
# Configuring MFTF for Two-Factor Authentication (2FA)
2+
3+
Using two-factor authentication (2FA) with MFTF is possible with some configurations settings in Magento.
4+
In this document, we will use Google as the authentication provider.
25

36
## Configure Magento {#config-magento-2fa}
47

5-
To prepare Magento for MFTF testing when 2FA is enabled, set the following configurations through Magento CLI
8+
To prepare Magento for MFTF testing when 2FA is enabled, set the following configurations through the Magento CLI.
69

7-
### Select `Google Authenticator` as Magento 2FA provider
10+
First, select `Google Authenticator` as Magento's 2FA provider:
811

912
```bash
1013
bin/magento config:set twofactorauth/general/force_providers google
1114
```
1215

13-
### Set OTP window to `60` seconds
16+
Now set the OTP window to `60` seconds:
1417

1518
```bash
1619
bin/magento config:set twofactorauth/google/otp_window 60
1720
```
1821

19-
### Set a base32 encoded `secret` for `Google Authenticator` to generate OTP for the default admin user that you set for `MAGENTO_ADMIN_USERNAME` in .env.
22+
Set a base32-encoded `secret` for `Google Authenticator` to generate a OTP for the default admin user that you set for `MAGENTO_ADMIN_USERNAME` in `.env`:
2023

2124
```bash
2225
bin/magento security:tfa:google:set-secret <MAGENTO_ADMIN_USERNAME> <OTP_SHARED_SECRET>
2326
```
2427

25-
## Configure MFTF {#config-mftf-2fa}
28+
## Configure the MFTF {#config-mftf-2fa}
2629

27-
Save the same base32 encoded `secret` in MFTF Credential Storages, e.g. `.credentials` file, `HashiCorp Vault` or `AWS Secrets Manager`.
28-
More details [here](../credentials.md).
30+
Save the same base32-encoded `secret` in a MFTF credential storage, e.g. `.credentials` file, `HashiCorp Vault` or `AWS Secrets Manager`.
31+
More details are [here](../credentials.md).
2932

3033
The path of the `secret` should be:
3134

@@ -35,11 +38,11 @@ magento/tfa/OTP_SHARED_SECRET
3538

3639
## GetOTP {#getOTP}
3740

38-
One-time password (OTP) is required when an admin user logs in to Magento Admin page.
39-
Use action `getOTP` [Reference](../test/actions.md#getotp) to generate the code and use it for the `Authenticator code` text field in 2FA - Google Auth page.
41+
A one-time password (OTP) is required when an admin user logs into the Magento admin.
42+
Use the action `getOTP` [Reference](../test/actions.md#getotp) to generate the code and use it for the `Authenticator code` text field in 2FA - Google Auth page.
4043

4144
Note:
42-
You will need to set the `secret` for any non default admin users first before using `getOTP`. For example
45+
You will need to set the `secret` for any non-default admin users first, before using `getOTP`. For example:
4346

4447
```xml
4548
<magentoCLI command="security:tfa:google:set-secret admin2 {{_CREDS.magento/tfa/OTP_SHARED_SECRET}}" stepKey="setSecret"/>

0 commit comments

Comments
 (0)