Skip to content

Commit e27f142

Browse files
Ke-Wngyinbo3
andauthored
docs: role and privilege (#215)
* docs: role and privilege Co-authored-by: YinBo <[email protected]>
1 parent f46024e commit e27f142

File tree

96 files changed

+1181
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1181
-467
lines changed

dir.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
collapsed: true
105105
children:
106106
- title_en: Index Cache
107-
title_cn: 索引缓存
107+
title_cn: 索引缓存调优
108108
path: development-guide/query-optimization/index-cache-optimization
109109
- title_en: Data Cache
110110
title_cn: 热点数据缓存
@@ -274,8 +274,8 @@
274274
- title_en: Gap Fill
275275
title_cn: 插值函数
276276
path: sql-reference/gap_fill
277-
- title_en: Json
278-
title_cn: Json 函数
277+
- title_en: JSON
278+
title_cn: JSON 函数
279279
path: sql-reference/json
280280
- title_en: Cast
281281
title_cn: 类型转换函数
@@ -446,6 +446,37 @@
446446
- title_en: TLS
447447
title_cn: 连接加密(TLS)
448448
path: user-security/tls
449+
- title_en: Authentication and Authorization
450+
title_cn: 认证与权限
451+
collapsed: true
452+
children:
453+
- title_en: Authentication
454+
title_cn: 连接认证
455+
path: user-security/authentication/overview
456+
collapsed: true
457+
children:
458+
- title_en: Overview
459+
title_cn: 静态认证
460+
path: user-security/authentication/static
461+
- title_en: RBAC
462+
title_cn: 基于角色的访问控制
463+
path: user-security/authentication/rbac
464+
- title_en: Authorization
465+
title_cn: 访问控制
466+
collapsed: true
467+
children:
468+
- title_en: Overview
469+
title_cn: 概述
470+
path: user-security/rbac/overview
471+
- title_en: User Management
472+
title_cn: 用户管理
473+
path: user-security/rbac/user
474+
- title_en: Role Management
475+
title_cn: 角色管理
476+
path: user-security/rbac/role
477+
- title_en: Privileges
478+
title_cn: 权限管理
479+
path: user-security/rbac/privilege
449480
- title_en: Release Notes
450481
title_cn: 版本发布说明
451482
collapsed: true

en_US/user-security/authentication/overview.md

Whitespace-only changes.

en_US/user-security/authentication/rbac.md

Whitespace-only changes.

en_US/user-security/authentication/static.md

Whitespace-only changes.

en_US/user-security/rbac/overview.md

Whitespace-only changes.

en_US/user-security/rbac/privilege.md

Whitespace-only changes.

en_US/user-security/rbac/role.md

Whitespace-only changes.

en_US/user-security/rbac/user.md

Whitespace-only changes.

zh_CN/admin/backup-restore.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
# 数据备份与恢复
2+
3+
## 概述
24
数据库备份和恢复的目的是为了保护数据安全,防止数据丢失或损坏。通过定期备份,能够在系统故障、硬件损坏或人为错误时,将数据库恢复到最近的可用状态,确保业务连续性和数据完整性。本章节主要介绍数据备份与恢复功能。
35

46
## 工具使用说明
57
`dldump` 工具提供了丰富的选项以供配置,您可以通过执行 `dldump --help` 以查看 `dldump` 的所有子命令和选项。此处对一些重要的选项进行说明:
68

7-
| 参数 | 简写 | 描述 |
8-
| ---------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
9-
| --host | -h | 指定 Datalayers 实例的地址,默认为:127.0.0.1 |
10-
| --port | -P | 指定 Datalayers 实例的 SQL 服务端口,默认为:8360 |
11-
| --username | -u | 指定用于鉴权的用户名,默认为:admin |
12-
| --password | -p | 指定用于鉴权的密码,默认为:public |
13-
| --output | -o | 指定备份时数据的存储路径。为了避免用户无意间覆盖之前的备份,要求导出时指定的目录为空 |
14-
| --input | -i | 指定恢复时数据的加载路径。如果指定的目录为空,则会中止恢复操作 |
15-
| --meta | | 指定备份时是否要包含元信息(如:建库和建表语句),默认包含元信息。如果不备份元信息,您可以传入 --meta false |
16-
| --data | | 指定备份时是否要包含表数据,默认包含表数据。如果要求不备份表数据,您可以传入 --data false |
17-
| --database | -d | 指定备份或恢复的数据库。如果不显式设定该选项,则默认转储所有数据库 |
18-
| --table | -t | 指定备份或恢复的表。如果指定了 table,则必须指定 database。如果不显式设定该选项,则默认备份 database 下所有表 |
19-
| --max-file-size | -s | 指定一个数据文件大小的最大值,默认为 8GiB。只支持整型作为合法的输入。单位为:GiB |
20-
| --start | | 指定一个时间戳,时间戳大于或等于 start 的表数据才会被备份。合法的日期格式和整型均认为是合法的时间戳 |
21-
| --end | | 指定一个时间戳,时间戳小于或等于 end 的表数据才会被备份。合法的日期格式和整型均认为是合法的时间戳 |
22-
| --tls | | 通过 TLS 加密方式与数据库进行交互。自签证书则需指定 root ca,如:--tls /etc/datalayers/datalayers.crt |
23-
| --help | | show this help, then exit |
9+
| 参数 | <div style="width:40px">简写</div> | 描述 |
10+
| ---------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
11+
| --host | -h | 指定 Datalayers 实例的地址,默认为:127.0.0.1 |
12+
| --port | -P | 指定 Datalayers 实例的 SQL 服务端口,默认为:8360 |
13+
| --username | -u | 指定用于鉴权的用户名,默认为:admin |
14+
| --password | -p | 指定用于鉴权的密码,默认为:public |
15+
| --output | -o | 指定备份时数据的存储路径。为了避免用户无意间覆盖之前的备份,要求导出时指定的目录为空 |
16+
| --input | -i | 指定恢复时数据的加载路径。如果指定的目录为空,则会中止恢复操作 |
17+
| --meta | | 指定备份时是否要包含元信息(如:建库和建表语句),默认包含元信息。如果不备份元信息,您可以传入 --meta false |
18+
| --data | | 指定备份时是否要包含表数据,默认包含表数据。如果要求不备份表数据,您可以传入 --data false |
19+
| --database | -d | 指定备份或恢复的数据库。如果不显式设定该选项,则默认转储所有数据库 |
20+
| --table | -t | 指定备份或恢复的表。如果指定了 table,则必须指定 database。如果不显式设定该选项,则默认备份 database 下所有表 |
21+
| --max-file-size | -s | 指定一个数据文件大小的最大值,默认为 8GiB。只支持整型作为合法的输入。单位为:GiB |
22+
| --start | | 指定一个时间戳,时间戳大于或等于 start 的表数据才会被备份。合法的日期格式和整型均认为是合法的时间戳 |
23+
| --end | | 指定一个时间戳,时间戳小于或等于 end 的表数据才会被备份。合法的日期格式和整型均认为是合法的时间戳 |
24+
| --tls | | 通过 TLS 加密方式与数据库进行交互。自签证书则需指定 root ca,如:--tls /etc/datalayers/datalayers.crt |
25+
| --help | | show this help, then exit |
2426

2527
## 备份与恢复
2628
以下通过一个示例来介绍 **dldump** 工具的使用。这个示例首先为单机版 Datalayers 写入一些数据,然后使用 **dldump** 将数据导出到备份目录;再创建一个新的 Datalayers 实例,从备份目录加载数据并写入到新的 Datalayers 实例;最后使用 **dlsql** 工具查询新的 Datalayers 实例,以验证成功执行了备份与恢复。

zh_CN/admin/configuration-fields/server.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ addr = "0.0.0.0:8360"
2525
# Default: "0.0.0.0:8361".
2626
http = "0.0.0.0:8361"
2727

28-
# 配置 Key-Value 服务的监听地址.
29-
# Key-Value 服务仅在集群模式下才能工作.
30-
# 默认情况下不启动 Key-Value 服务.
31-
# redis = "0.0.0.0:8362"
28+
# The unix socket file of peer server.
29+
# Don't support peer server by default.
30+
# Default: ""
31+
# peer_addr = "run/datalayers.sock"
3232

3333
# 配置 session 超时时间.
3434
# Default: "10s".
@@ -47,6 +47,11 @@ timezone = "Asia/Shanghai"
4747

4848
# The configurations of authorization.
4949
[server.auth]
50+
# The type of the authorization.
51+
# type = "static" or "rbac"
52+
# Default: "static"
53+
type = "static"
54+
5055
# The username.
5156
# Default: "admin".
5257
username = "admin"
@@ -58,4 +63,38 @@ password = "public"
5863
# The provided JSON Web Token.
5964
# Default: "87113c3d906df75e9c6389fbd457d957".
6065
jwt_secret = "87212c3d906df71e9c6289fbd456d917"
66+
67+
# Password strength requirements.
68+
# weak: no requirements, simple password.
69+
# moderate: at least 8 characters, including at least three types of the following:
70+
# uppercase letters, lowercase letters, digits, and special characters.
71+
# strong: at least 14 characters, including all types of the following:
72+
# uppercase letters, lowercase letters, digits, and special characters.
73+
# Default: "weak"
74+
#password_strength = "weak"
75+
76+
# Password protection against brute-force attacks.
77+
# Form as "a/b/c", means:
78+
# Account locked for "b" minutes after "a" failed password attempts,
79+
# and locked for another "c" miniutes after the each failed attempt.
80+
# The maximum of a/b/c is 10/120/120 respectively, and will be set to 3/5/5 if too big.
81+
# 0/-/- means no lockout.
82+
# Default: "0/0/0"
83+
#password_lockout = "3/5/5"
84+
85+
# The configurations of the Redis service.
86+
[server.redis]
87+
# 配置 Key-Value 服务的监听地址.
88+
# Key-Value 服务仅在集群模式下才能工作.
89+
# 默认情况下不启动 Key-Value 服务.
90+
# Default: "".
91+
# addr = "0.0.0.0:8362"
92+
93+
# The username.
94+
# Default: "admin".
95+
#username = "admin"
96+
97+
# The password.
98+
# Default: "public".
99+
#password = "public"
61100
```

0 commit comments

Comments
 (0)