RaigorJiang commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229497459
Hi @justbk2015 @TeslaCN
We have reserved a new YAML configuration format to support enabling
different authentication methods for different users.
In addition, the new API is placed outside the rule in server.yaml.
The reference configuration format is:
````yaml
mode:
type: Cluster
repository:
type: ZooKeeper
props:
...
overwrite: true
authority:
users:
- user: root@%
password: root
- user: sharding@%
password: sharding
auth: # MD5, TEXT, SHA256 ...
privilege:
type: ALL_PRIVILEGES_PERMITTED
rules:
- !TRANSACTION
...
- !SQL_PARSER
...
props:
````
The configuration class is
[YamlAuthorityUserConfiguration](https://github.com/apache/shardingsphere/blob/master/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/yaml/config/YamlAuthorityUserConfiguration.java)
Original PR was #16923 (converted to current format for compatibility)
I'm also planning to completely convert the old configuration to the new way
in the near future, maybe some discussion is needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]