You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/07/05 03:20:27 UTC
[shardingsphere] branch master updated: add doc for sharding audit (#18848)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 21428eb8fd7 add doc for sharding audit (#18848)
21428eb8fd7 is described below
commit 21428eb8fd76315ef3d1e845cad528891967ed59
Author: natehuang <na...@tencent.com>
AuthorDate: Tue Jul 5 11:20:21 2022 +0800
add doc for sharding audit (#18848)
---
docs/document/content/dev-manual/sharding.cn.md | 10 ++++++++++
docs/document/content/dev-manual/sharding.en.md | 10 ++++++++++
docs/document/content/dev-manual/sql-check.cn.md | 7 ++++---
docs/document/content/dev-manual/sql-check.en.md | 7 ++++---
.../src/main/resources/conf/config-sharding.yaml | 9 +++++++++
5 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/docs/document/content/dev-manual/sharding.cn.md b/docs/document/content/dev-manual/sharding.cn.md
index 465e9f46850..9787d07594f 100644
--- a/docs/document/content/dev-manual/sharding.cn.md
+++ b/docs/document/content/dev-manual/sharding.cn.md
@@ -41,6 +41,16 @@ chapter = true
| CosIdSnowflakeKeyGenerateAlgorithm | 基于 CosId 的雪花算法分布式主键生成算法 |
| NanoIdKeyGenerateAlgorithm | 基于 NanoId 的分布式主键生成算法 |
+## ShardingAuditAlgorithm
+
+| *SPI 名称* | *详细说明* |
+| ----------------------------- | ------------------------- |
+| ShardingAuditAlgorithm | 分片审计算法 |
+
+| *已知实现类* | *详细说明* |
+|-------------------------------------------- |---------------------------------- |
+| DMLShardingConditionsShardingAuditAlgorithm | 禁止不带分片键的DML审计算法 |
+
## DatetimeService
| *SPI 名称* | *详细说明* |
diff --git a/docs/document/content/dev-manual/sharding.en.md b/docs/document/content/dev-manual/sharding.en.md
index 5815af196d4..d7b25deaa86 100644
--- a/docs/document/content/dev-manual/sharding.en.md
+++ b/docs/document/content/dev-manual/sharding.en.md
@@ -41,6 +41,16 @@ chapter = true
| CosIdSnowflakeKeyGenerateAlgorithm | Snowflake key generate algorithm provided by CosId |
| NanoIdKeyGenerateAlgorithm | NanoId key generate algorithm |
+## ShardingAuditAlgorithm
+
+| *SPI Name* | *Description* |
+| ----------------------------- | -------------------------------- |
+| ShardingAuditAlgorithm | Sharding audit algorithm |
+
+| *Implementation Class* | *Description* |
+|------------------------------------------------- |-------------------------------------------------------------- |
+| DMLShardingConditionsShardingAuditAlgorithm | Prohibit DML auditing algorithm without sharding conditions |
+
## DatetimeService
| *SPI Name* | *Description* |
diff --git a/docs/document/content/dev-manual/sql-check.cn.md b/docs/document/content/dev-manual/sql-check.cn.md
index 2896f680616..21e5b5b67f7 100644
--- a/docs/document/content/dev-manual/sql-check.cn.md
+++ b/docs/document/content/dev-manual/sql-check.cn.md
@@ -11,6 +11,7 @@ chapter = true
| ---------------- | --------- |
| SQLChecker | SQL 检查器 |
-| *已知实现类* | *详细说明* |
-| ---------------- | --------- |
-| AuthorityChecker | 权限检查器 |
+| *已知实现类* | *详细说明* |
+| -------------------- | ----------- |
+| AuthorityChecker | 权限检查器 |
+| ShardingAuditChecker | 分片审计检查器 |
diff --git a/docs/document/content/dev-manual/sql-check.en.md b/docs/document/content/dev-manual/sql-check.en.md
index 64cb99f83f0..52a32313c04 100644
--- a/docs/document/content/dev-manual/sql-check.en.md
+++ b/docs/document/content/dev-manual/sql-check.en.md
@@ -11,6 +11,7 @@ chapter = true
| ---------------------- | ----------------- |
| SQLChecker | SQL checker |
-| *Implementation Class* | *Description* |
-| ---------------------- | ----------------- |
-| AuthorityChecker | Authority checker |
+| *Implementation Class* | *Description* |
+| ---------------------- | ---------------------- |
+| AuthorityChecker | Authority checker |
+| ShardingAuditChecker | Sharding audit checker |
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-sharding.yaml b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-sharding.yaml
index 29612d1b95e..ff3d43a141f 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-sharding.yaml
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/config-sharding.yaml
@@ -211,3 +211,12 @@
# type: DATA_MATCH
# props:
# chunk-size: 1000
+
+# When shard auditing is required, the following properties can be configured
+# auditAlgorithms:
+# audit_algorithm1:
+# type: DML_SHARDING_CONDITIONS
+# auditStrategy:
+# auditAlgorithmNames:
+# - audit_algorithm1
+# allowHintDisable: true
\ No newline at end of file