You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2022/10/18 08:50:37 UTC
[shardingsphere] branch master updated: For #21611, update how the authority is configured. (#21621)
This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 c72f63bd747 For #21611, update how the authority is configured. (#21621)
c72f63bd747 is described below
commit c72f63bd747132ad33982a8cb65f1b5390aefeba
Author: Raigor <ra...@gmail.com>
AuthorDate: Tue Oct 18 16:50:30 2022 +0800
For #21611, update how the authority is configured. (#21621)
---
.../content/reference/management/_index.cn.md | 13 +++--
.../content/reference/management/_index.en.md | 13 +++--
.../yaml-config/authentication.cn.md | 54 +++++++++----------
.../yaml-config/authentication.en.md | 60 +++++++++++-----------
.../shardingsphere-proxy/sharding/conf/server.yaml | 12 ++---
.../src/main/resources/template/proxy/server.ftl | 15 +++---
.../src/main/resources/conf/server.yaml | 17 +++---
.../src/main/resources/server/server.yaml | 15 +++---
.../src/main/resources/conf/server.yaml | 12 ++---
.../backend/config/ProxyConfigurationLoader.java | 6 +--
.../test/resources/conf/config_loader/server.yaml | 12 ++---
.../src/test/resources/conf/swap/server.yaml | 12 ++---
.../bootstrap/src/main/resources/conf/server.yaml | 15 +++---
.../src/test/resources/conf/local/server.yaml | 15 +++---
.../src/test/resources/conf/reg_center/server.yaml | 17 +++---
.../test/resources/docker/proxy/conf/server.yaml | 12 ++---
.../test/resources/docker/proxy/conf/server.yaml | 12 ++---
.../env/scenario/mysql_ha/proxy/server.yaml | 12 ++---
.../src/test/resources/env/mysql/server-5.yaml | 12 ++---
.../src/test/resources/env/mysql/server-8.yaml | 12 ++---
.../src/test/resources/env/opengauss/server.yaml | 12 ++---
.../src/test/resources/env/postgresql/server.yaml | 13 +++--
.../env/common/cluster/proxy/conf/server.yaml | 12 ++---
.../env/common/standalone/proxy/conf/server.yaml | 12 ++---
.../env/common/cluster/proxy/conf/server.yaml | 12 ++---
.../env/common/standalone/proxy/conf/server.yaml | 12 ++---
.../src/test/resources/env/mysql/server.yaml | 12 ++---
.../src/test/resources/env/opengauss/server.yaml | 13 +++--
.../src/test/resources/env/postgresql/server.yaml | 13 +++--
29 files changed, 234 insertions(+), 225 deletions(-)
diff --git a/docs/document/content/reference/management/_index.cn.md b/docs/document/content/reference/management/_index.cn.md
index c4ca3cddd4d..18c804071da 100644
--- a/docs/document/content/reference/management/_index.cn.md
+++ b/docs/document/content/reference/management/_index.cn.md
@@ -55,15 +55,14 @@ namespace
### /rules
-全局规则配置,可包括访问 ShardingSphere-Proxy 用户名和密码的权限配置。
+全局规则配置,可包含事务配置、SQL 解析配置等。
```yaml
-- !AUTHORITY
-users:
- - root@%:root
- - sharding@127.0.0.1:sharding
-provider:
- type: ALL_PERMITTED
+- !TRANSACTION
+ defaultType: XA
+ providerType: Atomikos
+- !SQL_PARSER
+ sqlCommentParseEnabled: true
```
### /props
diff --git a/docs/document/content/reference/management/_index.en.md b/docs/document/content/reference/management/_index.en.md
index a5f98d86fda..c9552219813 100644
--- a/docs/document/content/reference/management/_index.en.md
+++ b/docs/document/content/reference/management/_index.en.md
@@ -55,15 +55,14 @@ namespace
### /rules
-global rule configurations, including configure the username and password for ShardingSphere-Proxy.
+Global rule configuration, which can include transaction configuration, SQL parser configuration, etc.
```yaml
-- !AUTHORITY
-users:
- - root@%:root
- - sharding@127.0.0.1:sharding
-provider:
- type: ALL_PERMITTED
+- !TRANSACTION
+ defaultType: XA
+ providerType: Atomikos
+- !SQL_PARSER
+ sqlCommentParseEnabled: true
```
### /props
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.cn.md
index f2a0d84cd26..307f860729e 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.cn.md
@@ -7,24 +7,24 @@ weight = 1
## 背景信息
-在 ShardingSphere-Proxy 中,通过全局规则 Authority Rule (标识为 !AUTHORITY)来配置用户和授权信息。
+在 ShardingSphere-Proxy 中,通过 `authority` 来配置用户和授权信息。
得益于 ShardingSphere 的可插拔架构,Proxy 提供了两种级别的权限提供者,分别是:
- `ALL_PERMITTED`:授予所有权限,不鉴权;
- `DATABASE_PERMITTED`:为用户授予指定逻辑库的权限,通过 user-database-mappings 进行映射。
-在配置 Authority Rule 时,管理员可根据需要选择使用哪一种权限提供者。
+在配置 `authority` 时,管理员可根据需要选择使用哪一种权限提供者。
## 参数解释
```yaml
-rules:
- - !AUTHORITY
- users:
- - # 用于登录计算节点的用户名,授权主机和密码的组合。格式:<username>@<hostname>:<password>,hostname 为 % 或空字符串表示不限制授权主机
- provider:
- type: # 存储节点数据授权的权限提供者类型,缺省值为 ALL_PERMITTED
+authority:
+ users:
+ - user: # 用于登录计算节点的用户名和授权主机的组合,格式:<username>@<hostname>,hostname 为 % 或空字符串表示不限制授权主机
+ password: # 用户密码
+ privilege:
+ type: # 权限提供者类型,缺省值为 ALL_PERMITTED
```
## 配置示例
@@ -32,37 +32,39 @@ rules:
### ALL_PERMITTED
```yaml
-rules:
- - !AUTHORITY
- users:
- - root@localhost:root
- - my_user@:pwd
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root@localhost
+ password: root
+ - user: my_user
+ password: pwd
+ privilege:
+ type: ALL_PERMITTED
```
以上配置表示:
- 用户 `root`,仅可从 `localhost` 连接 Proxy,密码为 `root`;
- 用户 `my_user`,可以从任意主机连接 Proxy,密码为 `pwd`;
-- `provider` 类型为 `ALL_PERMITTED`,表示对用户授予所有权限,不鉴权。
+- `privilege` 类型为 `ALL_PERMITTED`,表示对用户授予所有权限,不鉴权。
### DATABASE_PERMITTED
```yaml
-rules:
- - !AUTHORITY
- users:
- - root@localhost:root
- - my_user@:pwd
- provider:
- type: DATABASE_PERMITTED
- props:
- user-database-mappings: root@localhost=sharding_db, root@localhost=test_db, my_user@=sharding_db
+authority:
+ users:
+ - user: root@localhost
+ password: root
+ - user: my_user
+ password: pwd
+ privilege:
+ type: DATABASE_PERMITTED
+ props:
+ user-database-mappings: root@localhost=sharding_db, root@localhost=test_db, my_user@=sharding_db
```
以上配置表示:
-- `provider` 类型为 `DATABASE_PERMITTED`,表示对用户授予库级别权限,需要配置;
+- `privilege` 类型为 `DATABASE_PERMITTED`,表示对用户授予库级别权限,需要配置;
- 用户 `root` 仅可从 `localhost` 主机连接,可访问 `sharding_db` 和 `test_db`;
- 用户 `my_user` 可从任意主机连接,可访问 `sharding_db`。
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.en.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.en.md
index 44b90e457d2..6c3947d0a88 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authentication.en.md
@@ -7,60 +7,62 @@ Authorization configuration provided for users who can connect to ShardingSphere
## Background
-ShardingSphere-Proxy uses the global rule, Authority Rule (identified as !AUTHORITY), to configure user and authorization information.
+ShardingSphere-Proxy uses `authority` to configure user and authorization information.
-Thanks to ShardingSphere's pluggable architecture, Proxy provides two levels of authority providers, namely:
+Thanks to ShardingSphere's pluggable architecture, Proxy provides two levels of privilege providers, namely:
- `ALL_PERMITTED`: grant all authorities by default without authentication.
- `DATABASE_PERMITTED`: grant users the authority to specify a logical database, mapped through `user-database-mappings`.
-The administrator can choose which authority provider to use as needed when configuring the Authority Rule.
+The administrator can choose which privilege provider to use as needed when configuring `authority`.
## Parameter
```yaml
-rules:
- - !AUTHORITY
- users:
- - # Specify the username, authorized host, and password for logging in to the compute node. Format: <username>@<hostname>:<password>. When the hostname is % or an empty string, it indicates that the authorized host is not limited.
- provider:
- type: # The authority provider type for storage node. The default value is ALL_PERMITTED.
+authority:
+ users:
+ - user: # Specify the username, and authorized host for logging in to the compute node. Format: <username>@<hostname>. When the hostname is % or an empty string, it indicates that the authorized host is not limited.
+ password: # Password
+ privilege:
+ type: # Privilege provider type. The default value is ALL_PERMITTED.
```
## Sample
### ALL_PERMITTED
```yaml
-rules:
- - !AUTHORITY
- users:
- - root@localhost:root
- - my_user@:pwd
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root@localhost
+ password: root
+ - user: my_user
+ password: pwd
+ privilege:
+ type: ALL_PERMITTED
```
The above configuration indicates:
-- The user `root` can connect to Proxy only through [localhost](http://localhost), and the password is `root`.
+- The user `root` can connect to Proxy only through `localhost`, and the password is `root`.
- The user `my_user` can connect to Proxy through any host, and the password is `pwd`.
-- The `provider` type is `ALL_PERMITTED`, which indicates that users are granted all authorities by default without authentication.
+- The `privilege` type is `ALL_PERMITTED`, which indicates that users are granted all authorities by default without authentication.
### DATABASE_PERMITTED
```yaml
-rules:
- - !AUTHORITY
- users:
- - root@localhost:root
- - my_user@:pwd
- provider:
- type: DATABASE_PERMITTED
- props:
- user-database-mappings: root@localhost=sharding_db, root@localhost=test_db, my_user@=sharding_db
+authority:
+ users:
+ - user: root@localhost
+ password: root
+ - user: my_user
+ password: pwd
+ privilege:
+ type: DATABASE_PERMITTED
+ props:
+ user-database-mappings: root@localhost=sharding_db, root@localhost=test_db, my_user@=sharding_db
```
The above configuration indicates:
-- The `provider` type is `DATABASE_PERMITTED`, which indicates that users are granted database-level authority and configuration is needed.
-- The user `root` can connect to Proxy only through [localhost](http://localhost) and can access `sharding_db` and `test_db`.
+- The `privilege` type is `DATABASE_PERMITTED`, which indicates that users are granted database-level authority and configuration is needed.
+- The user `root` can connect to Proxy only through `localhost` and can access `sharding_db` and `test_db`.
- The user `my_user` can connect to Proxy through any host and can access `sharding_db`.
## Related References
diff --git a/examples/docker/shardingsphere-proxy/sharding/conf/server.yaml b/examples/docker/shardingsphere-proxy/sharding/conf/server.yaml
index ea1673c69c7..ffd2f1e2c78 100644
--- a/examples/docker/shardingsphere-proxy/sharding/conf/server.yaml
+++ b/examples/docker/shardingsphere-proxy/sharding/conf/server.yaml
@@ -29,12 +29,12 @@
# namespace: governance_ds
# server-lists: localhost:2181
-rules:
- - !AUTHORITY
- users:
- - root@%:root
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/examples/shardingsphere-example-generator/src/main/resources/template/proxy/server.ftl b/examples/shardingsphere-example-generator/src/main/resources/template/proxy/server.ftl
index 4bdec60ce90..55879776db3 100644
--- a/examples/shardingsphere-example-generator/src/main/resources/template/proxy/server.ftl
+++ b/examples/shardingsphere-example-generator/src/main/resources/template/proxy/server.ftl
@@ -22,13 +22,14 @@
<#include "mode/${mode}.ftl" />
</#if>
-rules:
- - !AUTHORITY
- users:
- - root@:root
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ - user: sharding
+ password: sharding
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
index d12f8d2b358..6c58214380f 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
@@ -33,14 +33,15 @@
# timeToLiveSeconds: 60
# maxRetries: 3
# operationTimeoutMilliseconds: 500
-
-rules:
- - !AUTHORITY
- users:
- - root@:root
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+
+authority:
+ users:
+ - user: root
+ password: root
+ - user: sharding
+ password: sharding
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-distsql-example/src/main/resources/server/server.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-distsql-example/src/main/resources/server/server.yaml
index 47052b48a60..f216f9a729e 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-distsql-example/src/main/resources/server/server.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-distsql-example/src/main/resources/server/server.yaml
@@ -34,13 +34,16 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
+authority:
+ users:
+ - user: root
+ password: root
+ - user: sharding
+ password: sharding
+ privilege:
+ type: ALL_PERMITTED
+
rules:
- - !AUTHORITY
- users:
- - root@%:root
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
- !TRANSACTION
defaultType: XA
providerType: Atomikos
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
index 04240424995..c860a3e13bf 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
@@ -34,12 +34,12 @@
# maxRetries: 3
# operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - root@:root
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoader.java b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoader.java
index b89658c7d2f..579d912eb4e 100644
--- a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoader.java
+++ b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/config/ProxyConfigurationLoader.java
@@ -23,10 +23,10 @@ import lombok.NoArgsConstructor;
import lombok.SneakyThrows;
import org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
+import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapper;
import org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapperFactory;
-import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyDatabaseConfiguration;
import org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyServerConfiguration;
@@ -80,9 +80,9 @@ public final class ProxyConfigurationLoader {
if (null == result) {
return new YamlProxyServerConfiguration();
}
- // TODO make authority configuration more clear
+ // TODO authority will no longer be a global rule
+ result.getRules().removeIf(each -> each instanceof YamlAuthorityRuleConfiguration);
if (null != result.getAuthority()) {
- result.getRules().removeIf(each -> each instanceof YamlAuthorityRuleConfiguration);
result.getRules().add(result.getAuthority().convertToYamlAuthorityRuleConfiguration());
}
return result;
diff --git a/proxy/backend/src/test/resources/conf/config_loader/server.yaml b/proxy/backend/src/test/resources/conf/config_loader/server.yaml
index 4243e801ceb..ae951174358 100644
--- a/proxy/backend/src/test/resources/conf/config_loader/server.yaml
+++ b/proxy/backend/src/test/resources/conf/config_loader/server.yaml
@@ -23,12 +23,12 @@ mode:
namespace: governance_ds
server-lists: localhost:2181
-rules:
- - !AUTHORITY
- users:
- - root@:root
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/proxy/backend/src/test/resources/conf/swap/server.yaml b/proxy/backend/src/test/resources/conf/swap/server.yaml
index a9060642a8a..c80ed8c62fb 100644
--- a/proxy/backend/src/test/resources/conf/swap/server.yaml
+++ b/proxy/backend/src/test/resources/conf/swap/server.yaml
@@ -27,12 +27,12 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - root@:123
- provider:
- type: test
+authority:
+ users:
+ - user: root
+ password: 123
+ privilege:
+ type: test
props:
bar: bar_value
diff --git a/proxy/bootstrap/src/main/resources/conf/server.yaml b/proxy/bootstrap/src/main/resources/conf/server.yaml
index 7a01ffdf96f..771bf1b9518 100644
--- a/proxy/bootstrap/src/main/resources/conf/server.yaml
+++ b/proxy/bootstrap/src/main/resources/conf/server.yaml
@@ -33,13 +33,16 @@
# maxRetries: 3
# operationTimeoutMilliseconds: 500
#
+#authority:
+# users:
+# - user: root@%
+# password: root
+# - user: sharding
+# password: sharding
+# privilege:
+# type: ALL_PERMITTED
+#
#rules:
-# - !AUTHORITY
-# users:
-# - root@%:root
-# - sharding@:sharding
-# provider:
-# type: ALL_PERMITTED
# - !TRANSACTION
# defaultType: XA
# providerType: Atomikos
diff --git a/proxy/bootstrap/src/test/resources/conf/local/server.yaml b/proxy/bootstrap/src/test/resources/conf/local/server.yaml
index 2087cbf702e..2f0cac26447 100644
--- a/proxy/bootstrap/src/test/resources/conf/local/server.yaml
+++ b/proxy/bootstrap/src/test/resources/conf/local/server.yaml
@@ -27,13 +27,14 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - root@:root
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ - user: sharding
+ password: sharding
+ privilege:
+ type: ALL_PERMITTED
props:
alpha-1: alpha-A
diff --git a/proxy/bootstrap/src/test/resources/conf/reg_center/server.yaml b/proxy/bootstrap/src/test/resources/conf/reg_center/server.yaml
index a39a5975854..870ec967c62 100644
--- a/proxy/bootstrap/src/test/resources/conf/reg_center/server.yaml
+++ b/proxy/bootstrap/src/test/resources/conf/reg_center/server.yaml
@@ -26,11 +26,12 @@ mode:
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
-
-rules:
- - !AUTHORITY
- users:
- - root@:root
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+
+authority:
+ users:
+ - user: root
+ password: root
+ - user: sharding
+ password: sharding
+ privilege:
+ type: ALL_PERMITTED
diff --git a/test/integration-agent-test/plugins/metrics/src/test/resources/docker/proxy/conf/server.yaml b/test/integration-agent-test/plugins/metrics/src/test/resources/docker/proxy/conf/server.yaml
index 19c746de9c7..5108e6a4a05 100644
--- a/test/integration-agent-test/plugins/metrics/src/test/resources/docker/proxy/conf/server.yaml
+++ b/test/integration-agent-test/plugins/metrics/src/test/resources/docker/proxy/conf/server.yaml
@@ -15,12 +15,12 @@
# limitations under the License.
#
-rules:
- - !AUTHORITY
- users:
- - root@:root
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-agent-test/plugins/opentelemetry/src/test/resources/docker/proxy/conf/server.yaml b/test/integration-agent-test/plugins/opentelemetry/src/test/resources/docker/proxy/conf/server.yaml
index 19c746de9c7..5108e6a4a05 100644
--- a/test/integration-agent-test/plugins/opentelemetry/src/test/resources/docker/proxy/conf/server.yaml
+++ b/test/integration-agent-test/plugins/opentelemetry/src/test/resources/docker/proxy/conf/server.yaml
@@ -15,12 +15,12 @@
# limitations under the License.
#
-rules:
- - !AUTHORITY
- users:
- - root@:root
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: root
+ password: root
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/ha/src/test/resources/env/scenario/mysql_ha/proxy/server.yaml b/test/integration-test/ha/src/test/resources/env/scenario/mysql_ha/proxy/server.yaml
index e039c5f7639..3f6ca12fbe8 100644
--- a/test/integration-test/ha/src/test/resources/env/scenario/mysql_ha/proxy/server.yaml
+++ b/test/integration-test/ha/src/test/resources/env/scenario/mysql_ha/proxy/server.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/scaling/src/test/resources/env/mysql/server-5.yaml b/test/integration-test/scaling/src/test/resources/env/mysql/server-5.yaml
index cda2d5bde9e..8c861666301 100644
--- a/test/integration-test/scaling/src/test/resources/env/mysql/server-5.yaml
+++ b/test/integration-test/scaling/src/test/resources/env/mysql/server-5.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/scaling/src/test/resources/env/mysql/server-8.yaml b/test/integration-test/scaling/src/test/resources/env/mysql/server-8.yaml
index e856bd692b7..c58172fbe3b 100644
--- a/test/integration-test/scaling/src/test/resources/env/mysql/server-8.yaml
+++ b/test/integration-test/scaling/src/test/resources/env/mysql/server-8.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/scaling/src/test/resources/env/opengauss/server.yaml b/test/integration-test/scaling/src/test/resources/env/opengauss/server.yaml
index 0c3eb23b4b1..f4f585614ab 100644
--- a/test/integration-test/scaling/src/test/resources/env/opengauss/server.yaml
+++ b/test/integration-test/scaling/src/test/resources/env/opengauss/server.yaml
@@ -27,12 +27,12 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/scaling/src/test/resources/env/postgresql/server.yaml b/test/integration-test/scaling/src/test/resources/env/postgresql/server.yaml
index 4963f555bea..5349fa341a5 100644
--- a/test/integration-test/scaling/src/test/resources/env/postgresql/server.yaml
+++ b/test/integration-test/scaling/src/test/resources/env/postgresql/server.yaml
@@ -27,13 +27,12 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml b/test/integration-test/showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
index 428d9dd5c0d..2175a2242bb 100644
--- a/test/integration-test/showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
+++ b/test/integration-test/showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml b/test/integration-test/showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
index 4add9f7f351..145919e57f3 100644
--- a/test/integration-test/showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
+++ b/test/integration-test/showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
@@ -15,12 +15,12 @@
# limitations under the License.
#
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/test-suite/src/test/resources/env/common/cluster/proxy/conf/server.yaml b/test/integration-test/test-suite/src/test/resources/env/common/cluster/proxy/conf/server.yaml
index 428d9dd5c0d..2175a2242bb 100644
--- a/test/integration-test/test-suite/src/test/resources/env/common/cluster/proxy/conf/server.yaml
+++ b/test/integration-test/test-suite/src/test/resources/env/common/cluster/proxy/conf/server.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/test-suite/src/test/resources/env/common/standalone/proxy/conf/server.yaml b/test/integration-test/test-suite/src/test/resources/env/common/standalone/proxy/conf/server.yaml
index 8040acd9af3..42230dbac3d 100644
--- a/test/integration-test/test-suite/src/test/resources/env/common/standalone/proxy/conf/server.yaml
+++ b/test/integration-test/test-suite/src/test/resources/env/common/standalone/proxy/conf/server.yaml
@@ -27,12 +27,12 @@
# retryIntervalMilliseconds: 500
# maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/transaction/src/test/resources/env/mysql/server.yaml b/test/integration-test/transaction/src/test/resources/env/mysql/server.yaml
index e039c5f7639..3f6ca12fbe8 100644
--- a/test/integration-test/transaction/src/test/resources/env/mysql/server.yaml
+++ b/test/integration-test/transaction/src/test/resources/env/mysql/server.yaml
@@ -27,12 +27,12 @@ mode:
retryIntervalMilliseconds: 500
maxRetries: 3
-rules:
- - !AUTHORITY
- users:
- - proxy@:Proxy@123
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/transaction/src/test/resources/env/opengauss/server.yaml b/test/integration-test/transaction/src/test/resources/env/opengauss/server.yaml
index f13a6e8d53d..b819cf6113c 100644
--- a/test/integration-test/transaction/src/test/resources/env/opengauss/server.yaml
+++ b/test/integration-test/transaction/src/test/resources/env/opengauss/server.yaml
@@ -27,13 +27,12 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - proxy@%:Proxy@123
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1
diff --git a/test/integration-test/transaction/src/test/resources/env/postgresql/server.yaml b/test/integration-test/transaction/src/test/resources/env/postgresql/server.yaml
index 94e721de594..e4c575a75ca 100644
--- a/test/integration-test/transaction/src/test/resources/env/postgresql/server.yaml
+++ b/test/integration-test/transaction/src/test/resources/env/postgresql/server.yaml
@@ -27,13 +27,12 @@ mode:
maxRetries: 3
operationTimeoutMilliseconds: 500
-rules:
- - !AUTHORITY
- users:
- - proxy@%:Proxy@123
- - sharding@:sharding
- provider:
- type: ALL_PERMITTED
+authority:
+ users:
+ - user: proxy
+ password: Proxy@123
+ privilege:
+ type: ALL_PERMITTED
props:
max-connections-size-per-query: 1