Skip to content

Commit

Permalink
align the Chinese expression of sign-in (pingcap#6586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liuxiaozhen12 authored Jul 5, 2021
1 parent d2bd613 commit f87ef16
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions certificate-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TiDB 支持基于证书鉴权的登录方式。采用这种方式,TiDB 对不

+ 创建安全密钥和证书
+ 配置 TiDB 和客户端使用的证书
+ 配置登陆时需要校验的用户证书信息
+ 配置登录时需要校验的用户证书信息
+ 更新和替换证书

本文介绍了如何进行证书鉴权的上述几个操作。
Expand Down Expand Up @@ -129,7 +129,7 @@ TiDB 支持基于证书鉴权的登录方式。采用这种方式,TiDB 对不

> **注意:**
>
> 以上结果中,用户登陆时 TiDB 将强制检查 `subject` 部分的信息是否一致。
> 以上结果中,用户登录时 TiDB 将强制检查 `subject` 部分的信息是否一致。

### 生成客户端密钥和证书

Expand Down Expand Up @@ -252,7 +252,7 @@ mysql -utest -h0.0.0.0 -P4000 --ssl-cert /path/to/client-cert.new.pem --ssl-key
>
> `/path/to/client-cert.new.pem``/path/to/client-key.new.pem``/path/to/ca-cert.pem` 是 CA 证书、客户端密钥和客户端存放的路径。可将以上命令中的这些部分替换为实际的路径。
## 配置登陆时需要校验的用户证书信息
## 配置登录时需要校验的用户证书信息

使用客户端连接 TiDB 进行授权配置。先获取需要验证的用户证书信息,再对这些信息进行配置。

Expand Down Expand Up @@ -318,23 +318,23 @@ mysql -utest -h0.0.0.0 -P4000 --ssl-cert /path/to/client-cert.new.pem --ssl-key
获取用户证书信息(`require subject`, `require issuer`、`require san` 和 `require cipher`)后,可在创建用户、赋予权限或更改用户时配置用户证书信息。将以下命令中的 `<replaceable>` 替换为对应的信息。可以选择配置其中一项或多项,使用空格或 `and` 分隔。
+ 可以在创建用户 (`create user`) 时配置登陆时需要校验的证书信息
+ 可以在创建用户 (`create user`) 时配置登录时需要校验的证书信息
{{< copyable "sql" >}}
```sql
create user 'u1'@'%' require issuer '<replaceable>' subject '<replaceable>' san '<replaceable>' cipher '<replaceable>';
```
+ 可以在赋予权限 (`grant`) 时配置登陆时需要校验的证书信息
+ 可以在赋予权限 (`grant`) 时配置登录时需要校验的证书信息
{{< copyable "sql" >}}
```sql
grant all on *.* to 'u1'@'%' require issuer '<replaceable>' subject '<replaceable>' san '<replaceable>' cipher '<replaceable>';
```
+ 还可以在修改已有用户 (alter user) 时配置登陆时需要校验的证书信息
+ 还可以在修改已有用户 (alter user) 时配置登录时需要校验的证书信息
{{< copyable "sql" >}}
Expand Down
2 changes: 1 addition & 1 deletion check-before-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ sudo systemctl enable ntpd.service
## 手动配置 SSH 互信及 sudo 免密码
对于有需求,通过手动配置中控机至目标节点互信的场景,可参考本段。通常推荐使用 TiUP 部署工具会自动配置 SSH 互信及免密登陆,可忽略本段内容。
对于有需求,通过手动配置中控机至目标节点互信的场景,可参考本段。通常推荐使用 TiUP 部署工具会自动配置 SSH 互信及免密登录,可忽略本段内容。
1. 以 `root` 用户依次登录到部署目标机器创建 `tidb` 用户并设置登录密码。
Expand Down
4 changes: 2 additions & 2 deletions enable-tls-between-clients-and-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TiDB 的加密连接支持默认是关闭的,必须在 TiDB 服务端通过配

> **注意:**
>
> 如果登录用户已配置使用 [TiDB 证书鉴权功能](/certificate-authentication.md#配置登陆时需要校验的用户证书信息)校验用户证书,也会隐式要求对应用户必须使用加密连接连接 TiDB。
> 如果登录用户已配置使用 [TiDB 证书鉴权功能](/certificate-authentication.md#配置登录时需要校验的用户证书信息)校验用户证书,也会隐式要求对应用户必须使用加密连接连接 TiDB。

## 配置 TiDB 启用加密连接支持

Expand Down Expand Up @@ -103,7 +103,7 @@ create user 'u1'@'%' require x509;

> **注意:**
>
> 如果登录用户已配置使用 [TiDB 证书鉴权功能](/certificate-authentication.md#配置登陆时需要校验的用户证书信息)校验用户证书,也会隐式要求对应用户需进行身份验证。
> 如果登录用户已配置使用 [TiDB 证书鉴权功能](/certificate-authentication.md#配置登录时需要校验的用户证书信息)校验用户证书,也会隐式要求对应用户需进行身份验证。
## 检查当前连接是否是加密连接

Expand Down
2 changes: 1 addition & 1 deletion maintain-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tiup cluster start ${cluster-name} -N 1.2.3.4:2379,1.2.3.5:2379
## 查看集群状态

集群启动之后需要检查每个组件的运行状态,以确保每个组件工作正常。TiUP 提供了 display 命令,节省了登陆到每台机器上去查看进程的时间
集群启动之后需要检查每个组件的运行状态,以确保每个组件工作正常。TiUP 提供了 display 命令,节省了登录到每台机器上去查看进程的时间

{{< copyable "shell-regular" >}}

Expand Down
4 changes: 2 additions & 2 deletions production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ alertmanager_servers:
>
> - 如果是密钥方式,可以通过 `-i` 或者 `--identity_file` 来指定密钥的路径;
> - 如果是密码方式,可以通过 `-p` 进入密码交互窗口;
> - 如果已经配置免密登陆目标机,则不需填写认证。
> - 如果已经配置免密登录目标机,则不需填写认证。
>
> 一般情况下 TiUP 会在目标机器上创建 `topology.yaml` 中约定的用户和组,以下情况例外:
>
Expand Down Expand Up @@ -272,7 +272,7 @@ tiup cluster deploy tidb-test v5.1.0 ./topology.yaml --user root [-p] [-i /home/
- 可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本,后续内容以版本 `v5.1.0` 为例
- 初始化配置文件为 `topology.yaml`
- --user root:通过 root 用户登录到目标主机完成集群部署,该用户需要有 ssh 到目标机器的权限,并且在目标机器有 sudo 权限。也可以用其他有 ssh 和 sudo 权限的用户完成部署。
- [-i] 及 [-p]:非必选项,如果已经配置免密登陆目标机,则不需填写。否则选择其一即可,[-i] 为可登录到目标机的 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码
- [-i] 及 [-p]:非必选项,如果已经配置免密登录目标机,则不需填写。否则选择其一即可,[-i] 为可登录到目标机的 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码
- 如果需要指定在目标机创建的用户组名,可以参考[这个例子](https://github.com/pingcap/tiup/blob/master/embed/templates/examples/topology.example.yaml#L7)。

预期日志结尾输出会有 ```Deployed cluster `tidb-test` successfully``` 关键词,表示部署成功。
Expand Down
6 changes: 3 additions & 3 deletions role-based-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SHOW GRANTS FOR 'read_user1'@'localhost' USING 'app_read';

角色在授予给用户之后,并不会生效;只有在用户启用了某些角色之后,才可以使用角色拥有的权限。

可以对用户设置默认启用的角色;用户在登陆时,默认启用的角色会被自动启用。
可以对用户设置默认启用的角色;用户在登录时,默认启用的角色会被自动启用。

{{< copyable "sql" >}}

Expand Down Expand Up @@ -222,7 +222,7 @@ SET ROLE {
}
```

例如,登陆 `rw_user1` 后,为当前用户启用角色 `app_read``app_write` ,仅在当前 session 有效:
例如,登录 `rw_user1` 后,为当前用户启用角色 `app_read``app_write` ,仅在当前 session 有效:

{{< copyable "sql" >}}

Expand Down Expand Up @@ -278,7 +278,7 @@ SET ROLE ALL EXCEPT 'app_read'
SET DEFAULT ROLE ALL TO 'rw_user1'@'localhost';
```

`rw_user1@localhost` 登陆后
`rw_user1@localhost` 登录后

{{< copyable "sql" >}}

Expand Down
2 changes: 1 addition & 1 deletion security-compatibility-with-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ aliases: ['/docs-cn/dev/security-compatibility-with-mysql/','/docs-cn/dev/refere

除以下功能外,TiDB 支持与 MySQL 5.7 类似的安全特性。

- 仅支持 `mysql_native_password` 密码验证或证书验证登陆方案
- 仅支持 `mysql_native_password` 密码验证或证书验证登录方案
- 不支持外部身份验证方式(如 LDAP)。
- 不支持列级别权限设置。
- 不支持密码过期,最后一次密码变更记录以及密码生存期。[#9709](https://github.com/pingcap/tidb/issues/9709)
Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-create-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CREATE USER 'newuser' IDENTIFIED BY 'newuserpassword';
Query OK, 1 row affected (0.04 sec)
```

创建一个只能在 `192.168.1.1` 登陆的用户,密码为 `newuserpassword`
创建一个只能在 `192.168.1.1` 登录的用户,密码为 `newuserpassword`

{{< copyable "sql" >}}

Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-cluster-topology-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ monitoring_servers:
- `deploy_dir`:指定部署目录,若不指定,或指定为相对目录,则按照 `global` 中配置的 `deploy_dir` 生成
- `os`:`host` 字段所指定的机器的操作系统,若不指定该字段,则默认为 `global` 中的 `os`
- `arch`:`host` 字段所指定的机器的架构,若不指定该字段,则默认为 `global` 中的 `arch`
- `username`:Grafana 登陆界面的用户名
- `username`:Grafana 登录界面的用户名
- `password`:Grafana 对应的密码
- `dashboard_dir`:该字段指定一个本地目录,该目录中应当含有完整的 `dashboard(*.json)` 文件,这些文件会在集群配置初始化阶段被传输到目标机器上,作为 Grafana 的 dashboards
- `resource_control`:针对该服务的资源控制,如果配置了该字段,会将该字段和 `global` 中的 `resource_control` 内容合并(若字段重叠,以本字段内容为准),然后生成 systemd 配置文件并下发到 `host` 指定机器。`resource_control` 的配置规则同 `global` 中的 `resource_control`
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ tiup cluster check <topology.yml | cluster-name> [flags]
### -p, --password

- 在连接目标机器时使用密码登陆
- 在连接目标机器时使用密码登录

- 对于指定了 `--cluster` 的集群,密码为部署集群时拓扑文件中指定的用户的密码
- 对于未指定 `--cluster` 的集群,密码为 `-u/--user` 参数指定的用户的密码
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tiup cluster deploy <cluster-name> <version> <topology.yaml> [flags]

### -p, --password

- 在连接目标机器时使用密码登陆,不可和 `-i/--identity_file` 同时使用。
- 在连接目标机器时使用密码登录,不可和 `-i/--identity_file` 同时使用。
- 数据类型:`BOOLEAN`
- 该选项默认关闭,默认值为 `false`。在命令中添加该选项,并传入 `true` 值或不传值,均可开启此功能。

Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: tiup cluster list

# tiup cluster list

tiup-cluster 支持使用同一个中控机部署多套集群,而命令 `tiup cluster list` 可以查看当前登陆的用户使用该中控机部署了哪些集群
tiup-cluster 支持使用同一个中控机部署多套集群,而命令 `tiup cluster list` 可以查看当前登录的用户使用该中控机部署了哪些集群

> **注意:**
>
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-scale-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tiup cluster scale-out <cluster-name> <topology.yaml> [flags]

### -p, --password

- 在连接目标机器时使用密码登陆,不可和 `-i/--identity_file` 同时使用。
- 在连接目标机器时使用密码登录,不可和 `-i/--identity_file` 同时使用。
- 数据类型:`BOOLEAN`
- 该选项默认关闭,默认值为 `false`。在命令中添加该选项,并传入 `true` 值或不传值,均可开启此功能。

Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-dm-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tiup dm deploy <cluster-name> <version> <topology.yaml> [flags]

### -p, --password

- 在连接目标机器时使用密码登陆,不可和 `-i/--identity_file` 同时使用。
- 在连接目标机器时使用密码登录,不可和 `-i/--identity_file` 同时使用。
- 数据类型:`BOOLEAN`
- 该选项默认关闭,默认值为 `false`。在命令中添加该选项,并传入 `true` 值或不传值,均可开启此功能。

Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-dm-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: tiup dm list

# tiup dm list

tiup-dm 支持使用同一个中控机部署多套集群,而命令 `tiup dm list` 可以查看当前登陆的用户使用该中控机部署了哪些集群
tiup-dm 支持使用同一个中控机部署多套集群,而命令 `tiup dm list` 可以查看当前登录的用户使用该中控机部署了哪些集群

> **注意:**
>
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-dm-scale-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tiup dm scale-out <cluster-name> <topology.yaml> [flags]

### -p, --password

- 在连接目标机器时使用密码登陆,不可和 `-i/--identity_file` 同时使用。
- 在连接目标机器时使用密码登录,不可和 `-i/--identity_file` 同时使用。
- 数据类型:`BOOLEAN`
- 该选项默认关闭,默认值为 `false`。在命令中添加该选项,并传入 `true` 值或不传值,均可开启此功能。

Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-dm-topology-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ monitoring_servers:
- `deploy_dir`:指定部署目录,若不指定,或指定为相对目录,则按照 `global` 中配置的 `deploy_dir` 生成
- `os`:`host` 字段所指定的机器的操作系统,若不指定该字段,则默认为 `global` 中的 `os`
- `arch`:`host` 字段所指定的机器的架构,若不指定该字段,则默认为 `global` 中的 `arch`
- `username`:Grafana 登陆界面的用户名
- `username`:Grafana 登录界面的用户名
- `password`:Grafana 对应的密码
- `dashboard_dir`:该字段指定一个本地目录,该目录中应当含有完整的 `dashboard(*.json)` 文件,这些文件会在集群配置初始化阶段被传输到目标机器上,作为 Grafana 的 dashboards
- `resource_control`:针对该服务的资源控制,如果配置了该字段,会将该字段和 `global` 中的 `resource_control` 内容合并(若字段重叠,以本字段内容为准),然后生成 systemd 配置文件并下发到 `host` 指定机器。`resource_control` 的配置规则同 `global`中的 `resource_control`
Expand Down

0 comments on commit f87ef16

Please sign in to comment.