Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

2FA Updates #7389

Closed
wants to merge 7 commits into from
Closed

2FA Updates #7389

wants to merge 7 commits into from

Conversation

ccondra
Copy link
Contributor

@ccondra ccondra commented Jun 10, 2020

Applied corrections from review; made misc edits for consistency.

Purpose of this pull request

This pull request (PR) updates the existing topic with the following changes in the 2.4 release: including:

2FA is always enabled
"Trust this device" removed
Web API support
MFTF configuration for testing with 2FA

Added a Web API diagram, and made misc. updates for consistency.

Affected DevDocs pages

Two-Factor Authentication

Staging: #1922

ccondra added 3 commits June 10, 2020 09:45
Applied corrections from review; made misc edits for consistency.
fixed trailing space
@ccondra ccondra added the 2.3.4 Magento 2.3.4 changes label Jun 10, 2020
@ccondra
Copy link
Contributor Author

ccondra commented Jun 10, 2020

running tests

@ccondra ccondra requested review from dobooth and jeff-matthews June 10, 2020 20:15
Copy link
Contributor

@jeff-matthews jeff-matthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccondra, are these changes applicable to 2.3.x or 2.4.0 only? If 2.4.0 only, you need to break the symlink, copy the 2.3 file to 2.4, and then make these updates. There's a handy rake command that will remove the symlink and create a copy of the 2.3 file in 2.4 for you:

rake symlink:replace_at path=src/guides/v2.3/security/two-factor-authentication.md

[9]: https://docs.magento.com/m2/ee/user_guide/stores/security-two-factor-authentication-use.html#u2f-key
[10]: https://www.yubico.com/
[11]: https://duo.com/
[12]: https://github.com/magento/magento2-functional-testing-framework/blob/develop/docs/configure-2fa.md
Copy link
Contributor

@jeff-matthews jeff-matthews Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if the MFTF team merged this with master so that we could link to it on the devdocs site. We currently publish docs from that repo under: https://devdocs.magento.com/mftf/docs/introduction.html. I guess this will do for beta.


1. Select Google Authenticator as the 2FA provider:

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block needs to be indented (3 spaces I think) under the preceding list.


1. Increase the lifetime of the window to 60 seconds to prevent tokens from expiring.

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block needs to be indented (3 spaces I think) under the preceding list.

bin/magento config:set twofactorauth/google/otp_window 60
```

1. Generate a Base32-encoded string for the shared secret value. For example, encoding the string `abcd` with the online [Base32 Encode][13] tool returns the value `MFRGGZDF`. Use the following key to add the encoded value to the MFTF `.credentials` file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Generate a Base32-encoded string for the shared secret value. For example, encoding the string `abcd` with the online [Base32 Encode][13] tool returns the value `MFRGGZDF`. Use the following key to add the encoded value to the MFTF `.credentials` file:
1. Generate a Base32-encoded string for the shared secret value. For example, encoding the string `abcd` with the online [Base32 Encode][13] tool returns the value `MFRGGZDF`. Use the following key to add the encoded value to the MFTF `.credentials` file:


1. Generate a Base32-encoded string for the shared secret value. For example, encoding the string `abcd` with the online [Base32 Encode][13] tool returns the value `MFRGGZDF`. Use the following key to add the encoded value to the MFTF `.credentials` file:

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block needs to be indented (3 spaces I think) under the preceding list.

magento/tfa/OTP_SHARED_SECRET=MFRGGZDF
```

1. Use CLI to add the encoded shared secret to Google Authenticator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Use CLI to add the encoded shared secret to Google Authenticator.
1. Add the encoded shared secret to Google Authenticator.


1. Use CLI to add the encoded shared secret to Google Authenticator.

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block needs to be indented (3 spaces I think) under the preceding list.

@jeff-matthews
Copy link
Contributor

Closing this because we need to revert changes to the 2.3 file, break the symlink, and apply changes to the 2.4 file (#7392).

@ghost
Copy link

ghost commented Jun 11, 2020

Hi @ccondra, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@dobooth dobooth deleted the 2FA-Review-Updates branch October 22, 2020 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants