Skip to content

Commit f018d78

Browse files
committed
docs: Move enable-by-default config step up
1 parent 30fca4c commit f018d78

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

en_US/multi-factor-authn/multi-factor-authentication.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ The goal of MFA is to ensure that even if someone obtains your password, they ca
2525

2626
MFA is disabled by default. To enable MFA for users, the administrator must configure the system to support MFA and set it up for individual users. Only users with [administrator privileges](../dashboard/system.md#users) can enable or disable MFA for other users.
2727

28+
### Enable MFA by Default for the Dashboard
29+
30+
To enable MFA for all Dashboard users by default, the administrator needs to configure the `dashboard.default_mfa` setting in the configuration file. This can be set to either `none` (to disable MFA) or `{mechanism: totp}` (to enable TOTP-based MFA).
31+
32+
Example configuration:
33+
34+
```bash
35+
dashboard.default_mfa = {mechanism: totp}
36+
```
37+
2838
### Enable MFA for Users via EMQX Dashboard
2939

3040
Administrators can enable MFA directly from the Dashboard by following these steps:
@@ -59,16 +69,6 @@ For more information on the role-based access control implementation of the REST
5969

6070
:::
6171

62-
#### Enable MFA for the Dashboard
63-
64-
To enable MFA for the entire Dashboard, the administrator needs to configure the `dashboard.default_mfa` setting in the configuration file. This can be set to either `none` (to disable MFA) or `{mechanism: totp}` (to enable TOTP-based MFA).
65-
66-
Example configuration:
67-
68-
```bash
69-
dashboard.default_mfa = {mechanism: totp}
70-
```
71-
7272
#### Enable MFA for a Specific User
7373

7474
To enable MFA for a specific user, the administrator can send a `POST` request to the `/users/{username}/mfa` API endpoint with the following request body:
@@ -115,4 +115,4 @@ After you've completed the initial setup, you can use the authenticator app to l
115115
3. **Successful Login**:
116116
If the code is valid, you will be logged into the Dashboard.
117117
4. **Invalid Code**:
118-
If the code is incorrect or expired, you will see an error message. In this case, you can try entering the current code from your authenticator app.
118+
If the code is incorrect or expired, you will see an error message. In this case, you can try entering the current code from your authenticator app.

zh_CN/multi-factor-authn/multi-factor-authentication.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ MFA 的目标是确保即使有人获得了您的密码,也无法登录您的
2525

2626
MFA 默认为禁用状态。要为用户启用 MFA,管理员必须配置系统以支持 MFA,并为各个用户设置它。只有具有[管理员权限](../dashboard/system.md#用户)的用户才能为其他用户启用或禁用 MFA。
2727

28+
### 默认启用 MFA
29+
30+
要为 Dashboard 所有的用户默认开启 MFA,管理员需要在配置文件中配置 `dashboard.default_mfa` 设置。该设置可以设置为 `none`(禁用 MFA)或 `{mechanism: totp}`(启用基于 TOTP 的 MFA)。
31+
32+
示例配置:
33+
34+
```bash
35+
dashboard.default_mfa = {mechanism: totp}
36+
```
37+
2838
### 通过 EMQX Dashboard 启用 MFA
2939

3040
管理员可以直接通过 Dashboard 启用 MFA,步骤如下:
@@ -59,16 +69,6 @@ MFA 默认为禁用状态。要为用户启用 MFA,管理员必须配置系统
5969

6070
:::
6171

62-
#### 启用整个 Dashboard 的 MFA
63-
64-
要为整个 Dashboard 启用 MFA,管理员需要在配置文件中配置 `dashboard.default_mfa` 设置。该设置可以设置为 `none`(禁用 MFA)或 `{mechanism: totp}`(启用基于 TOTP 的 MFA)。
65-
66-
示例配置:
67-
68-
```bash
69-
dashboard.default_mfa = {mechanism: totp}
70-
```
71-
7272
#### 启用特定用户的 MFA
7373

7474
要为特定用户启用 MFA,管理员可以向 `/users/{username}/mfa` API 端点发送 POST 请求,请求体如下:
@@ -108,4 +108,4 @@ dashboard.default_mfa = {mechanism: totp}
108108
1. **输入您的用户名和密码**: 在后续的登录尝试中,输入您的用户名和密码。
109109
2. **输入 TOTP 代码**: 验证密码后,系统会提示您输入由身份验证应用程序生成的 TOTP 代码。
110110
3. **成功登录**: 如果验证码有效,您将成功登录 Dashboard。
111-
4. **验证码无效**: 如果验证码错误或过期,您将看到一条错误消息。在这种情况下,您可以尝试重新输入当前身份验证应用程序中的验证码。
111+
4. **验证码无效**: 如果验证码错误或过期,您将看到一条错误消息。在这种情况下,您可以尝试重新输入当前身份验证应用程序中的验证码。

0 commit comments

Comments
 (0)