RaigorJiang opened a new issue, #20457:
URL: https://github.com/apache/shardingsphere/issues/20457

   Hi community,
   
   Since we have DistSQL, users can use Proxy without configuring any database.
   
   However, when a user wants to experience Proxy, he must configure 
`AUTHORITY` rule in server.yaml, so that it can start successfully.
   In fact, ShardingSphere provides `DefaultAuthorityRuleConfigurationBuilder` 
and `DefaultUser`, which can build a `root` user in the absence of `Authority 
Rule Configuration`. If we enable this feature, the user's first experience can 
be simplified to the greatest extent, because he can start it directly after 
decompression.
   
   Currently, the reason why this feature cannot be enabled is that the 
`authorityRuleConfig` is checked in the `ProxyConfigurationLoader` and an 
exception will be thrown if it is empty.
   ```java
   YamlRuleConfiguration authorityRuleConfig = 
result.getRules().stream().filter(each -> each instanceof 
YamlAuthorityRuleConfiguration).findAny().orElse(null);
   Preconditions.checkState(containsGovernance || null != authorityRuleConfig, 
"Authority configuration is invalid.");
   ```
   
   I recommend removing this restriction and building a default `root` user for 
users when there is no `Authority Rule Configuration`.


-- 
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]

Reply via email to