Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Change] Move the user configuration to authority rule #10251

Closed
tristaZero opened this issue May 3, 2021 · 6 comments 路 Fixed by #10287 or #10310
Closed

[API Change] Move the user configuration to authority rule #10251

tristaZero opened this issue May 3, 2021 · 6 comments 路 Fixed by #10287 or #10310

Comments

@tristaZero
Copy link
Contributor

tristaZero commented May 3, 2021

Hi, community,

This issue is to do API change of server.yaml of ShardingProxy. More precisely to say, we plan to move the user configuration to the authority rule module. Hope you can have a try and get 馃憤 .

Target

Please change the configuration of server.yaml from

users:
  - root@%:root
  - sharding@:sharding
rules:
  - !AUTHORITY
    provider:
      type: NATIVE

TO

rules:
  - !AUTHORITY
    users:
      - root@%:root
      - sharding@:sharding
    provider:
      type: NATIVE

How?

There are two necessary sections to achieve it.

The refactoring of Yaml configuration

1 Move users from YamlProxyServerConfiguration to YamlAuthorityRuleConfiguration
2 Move YamlUsersConfigurationConverter handling from YamlProxyConfigurationSwapper to AuthorityRuleConfigurationYamlSwapper
3 Move users from ProxyConfiguration to AuthorityRuleConfiguration
4 Remove persistUsers(users, isOverwrite); of RegistryCenter
5 Move the relevant Unit test classes to corresponding packages.

The change of User and authority initialization

1 Remove users, which has been stored in AuthorityRuleConfiguration from MetaDataContextsBuilder
2 Remove users from the signature of ShardingSphereRulesBuilder.buildGlobalRules()
3 Put users into AuthorityRule from AuthorityRuleConfiguration
4 Fix the Unit tests

@tristaZero
Copy link
Contributor Author

Hi guys, @huanghao495430759 @zhujunxxxxx

Hope you have an enjoyable holiday!

I have to say there are two important and challenging issues to seek excellent contributors from the community.
Based on two of you's great previous contribution and experience, I assume you are eligible to deal with these difficult issues. So please excuse me for occupying you here. :)

I just wonder whether you are interested in this issue and #10252 and willing to take charge?

Here are some pointers FYI,

If you are not available, please still tell me so that I can assign these issues to others. Thanks.

@gloriawish
Copy link
Collaborator

OK锛孡et me try.

@tristaZero
Copy link
Contributor Author

Hi @zhujunxxxxx ,
Glad to see you stepping forward. Which one do you want to try? Or both?

@huanghao495430759
Copy link
Contributor

OK, Can I try it too ?

@gloriawish
Copy link
Collaborator

I want to try #10251.

@tristaZero
Copy link
Contributor Author

@zhujunxxxxx Hey, welcome.
@huanghao495430759 I will assign #10252 to you. Since you have done something to do with that, I suppose that issue will become simpler for you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment