You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/08/28 12:22:26 UTC
[GitHub] [shardingsphere] justbk2015 opened a new pull request, #20620: add md5 support for openGauss
justbk2015 opened a new pull request, #20620:
URL: https://github.com/apache/shardingsphere/pull/20620
Fixes #20619.
Changes proposed in this pull request:
- This PR is support both MD5 and SHA256 authentication in ss-proxy.
- In default configure, it is same as before use SHA256 in default.
- To suport MD5 authentication method, you just config server.yaml to add ":md5" in Authrity Rule.
example:
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding
- sharding1@%:sharding1:sha256 # use sha256 in default
- sharding2@%:sharding2:md5 # use md5 in default
- sharding2@%:sharding2:aaa # use sha256 in default
notice:
1. this feature effective only in opengauss database on backend.
2. only support ":md5" for md5 method(ignore case), other use default SHA256.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1287822923
@justbk2015
Sorry, I will close this PR because the authority configuration has been modified.
The new configuration reserves the option of auth, which will be beneficial to achieve the desired functionality of this PR.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] justbk2015 commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
justbk2015 commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1235304105
> > Hi @RaigorJiang Could you provide some suggestion about this PR?
>
> @TeslaCN Authority is a kernel configuration, and I do agree with what @justbk2015 said, when changing API, should consider compatibility with older version. But there are several factors that drive us to consider new APIs:
>
> 1. Specify different authentication methods for users
> 2. Users can have no password
> When the second scenario occurs, the configuration of this PR will not support it.
>
> So I propose that the PMCs discuss this and give advice?
is there some PMCs involves? any suggestion?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1230101600
> Hi @RaigorJiang Could you provide some suggestion about this PR?
@TeslaCN
Authority is a kernel configuration, and I do agree with what @justbk2015 said, when changing API, should consider compatibility with older version.
But there are several factors that drive us to consider new APIs:
1. Specify different authentication methods for users
2. Users can have no password
When the second scenario occurs, the configuration of this PR will not support it.
So I propose that the PMCs discuss this and give advice?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229451580
Hi @justbk2015 Thanks for your contribution.
This PR made a little change to configuration format. Please @terrymanu help check this.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229676645
> you PR seem not compatibility in old version,I don't quite agree with this; in additidion, more complex configuration in you PR, it's hard for users.
@justbk2015 In fact, `auth` is an optional configuration, for ordinary users, just split username and password.
Another reason for split is that in some cases `password` is not necessary, such as accessing a third-party authentication system.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229621740
@RaigorJiang
Thanks for your reply. Actually I searched issues about authority API yesterday but found no issue or discussion about the changes in #16932. It's better to file an issue or discussion about any API changes next time.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229652589
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/20620?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#20620](https://codecov.io/gh/apache/shardingsphere/pull/20620?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0e99257) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c63bb19288d5b8417665d9f36a3ca07d5e4a2805?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c63bb19) will **increase** coverage by `0.00%`.
> The diff coverage is `56.71%`.
```diff
@@ Coverage Diff @@
## master #20620 +/- ##
=========================================
Coverage 61.06% 61.06%
Complexity 2414 2414
=========================================
Files 3951 3954 +3
Lines 54881 54932 +51
Branches 9318 9326 +8
=========================================
+ Hits 33512 33546 +34
- Misses 18522 18535 +13
- Partials 2847 2851 +4
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/20620?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...tadata/user/yaml/config/YamlUserConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS91c2VyL3lhbWwvY29uZmlnL1lhbWxVc2VyQ29uZmlndXJhdGlvbi5qYXZh) | `20.00% <0.00%> (-30.00%)` | :arrow_down: |
| [...r/yaml/config/YamlUsersConfigurationConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS91c2VyL3lhbWwvY29uZmlnL1lhbWxVc2Vyc0NvbmZpZ3VyYXRpb25Db252ZXJ0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ra/metadata/user/yaml/swapper/YamlUserSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS91c2VyL3lhbWwvc3dhcHBlci9ZYW1sVXNlclN3YXBwZXIuamF2YQ==) | `80.00% <40.00%> (-10.91%)` | :arrow_down: |
| [.../authentication/OpenGaussAuthenticationHelper.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9mcm9udGVuZC9vcGVuZ2F1c3MvYXV0aGVudGljYXRpb24vT3BlbkdhdXNzQXV0aGVudGljYXRpb25IZWxwZXIuamF2YQ==) | `87.87% <87.87%> (ø)` | |
| [...sphere/infra/metadata/user/ShardingSphereUser.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS91c2VyL1NoYXJkaW5nU3BoZXJlVXNlci5qYXZh) | `100.00% <100.00%> (ø)` | |
| [.../authentication/OpenGaussAuthenticationEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9mcm9udGVuZC9vcGVuZ2F1c3MvYXV0aGVudGljYXRpb24vT3BlbkdhdXNzQXV0aGVudGljYXRpb25FbmdpbmUuamF2YQ==) | `93.75% <100.00%> (-1.25%)` | :arrow_down: |
| [...vice/config/database/DataSourcePersistService.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvcGVyc2lzdC9zZXJ2aWNlL2NvbmZpZy9kYXRhYmFzZS9EYXRhU291cmNlUGVyc2lzdFNlcnZpY2UuamF2YQ==) | `56.66% <0.00%> (-7.23%)` | :arrow_down: |
| [...stsql/rdl/resource/DropResourceBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2Rpc3RzcWwvcmRsL3Jlc291cmNlL0Ryb3BSZXNvdXJjZUJhY2tlbmRIYW5kbGVyLmphdmE=) | `94.44% <0.00%> (-5.56%)` | :arrow_down: |
| [...lect/mysql/mapper/MySQLDialectExceptionMapper.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGlhbGVjdC1leGNlcHRpb24vc2hhcmRpbmdzcGhlcmUtbXlzcWwtZGlhbGVjdC1leGNlcHRpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RpYWxlY3QvbXlzcWwvbWFwcGVyL015U1FMRGlhbGVjdEV4Y2VwdGlvbk1hcHBlci5qYXZh) | `80.00% <0.00%> (-3.34%)` | :arrow_down: |
| [.../admin/mysql/executor/MySQLSetCharsetExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2FkbWluL215c3FsL2V4ZWN1dG9yL015U1FMU2V0Q2hhcnNldEV4ZWN1dG9yLmphdmE=) | `25.00% <0.00%> (-1.32%)` | :arrow_down: |
| ... and [19 more](https://codecov.io/gh/apache/shardingsphere/pull/20620/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229673722
> It's better to file an issue or discussion about any API changes next time.
@TeslaCN Yes, you are right, there should be a description of the API.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229451690
Hi @justbk2015
The CI failed. Please take a look.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229947613
Hi @RaigorJiang
Could you provide some suggestion about this PR?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang closed pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
RaigorJiang closed pull request #20620: add md5 support for openGauss
URL: https://github.com/apache/shardingsphere/pull/20620
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] justbk2015 commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
justbk2015 commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1229622742
> 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.
you PR seem not compatibility in old version,I don't quite agree with this; in additidion, more complex configuration in you PR, it's hard for users.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on pull request #20620: add md5 support for openGauss
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on PR #20620:
URL: https://github.com/apache/shardingsphere/pull/20620#issuecomment-1236478266
> > Hi @RaigorJiang Could you provide some suggestion about this PR?
>
> @TeslaCN Authority is a kernel configuration, and I do agree with what @justbk2015 said, when changing API, should consider compatibility with older version. But there are several factors that drive us to consider new APIs:
>
> 1. Specify different authentication methods for users
> 2. Users can have no password
> When the second scenario occurs, the configuration of this PR will not support it.
>
> So I propose that the PMCs discuss this and give advice?
Technical proposal could be discuss in dev mailing list. Every one could start or participant in discussion.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org