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 2019/09/19 14:49:18 UTC

[GitHub] [incubator-shardingsphere] yanyzy opened a new issue #3068: Sharding-Proxy: Configuring user access to the database is invalid

yanyzy opened a new issue #3068: Sharding-Proxy: Configuring user access to the database is invalid
URL: https://github.com/apache/incubator-shardingsphere/issues/3068
 
 
   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   dev
   
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-Proxy
   
   ### Expected behavior
   According to the configuration file, users are prohibited from accessing databases that are not authorized for them.
   
   ### Actual behavior
   User does not have access to a database,but this user can access it.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   I have two config yaml to configure two logic datasource, user access is configured in the sever.yaml, this user has only one of the database permissions, but he can access both database.
   
   config-sharding.yaml:
   ```yaml
   schemaName: sharding_db
   
   dataSources:
     ds0:
      ···
     ds1:
      ···
   ```
   
   config-sharding-remote.yaml:
   ```yaml
   schemaName: sharding_db_remote
   
   dataSources:
     ds0:
       ···
     ds1:
       ···
   ```
   
   server.yaml:
   ```yaml
   authentication:
     users:
       root:
         password: root
       sharding:
         password: sharding
         authorizedSchemas: sharding_db
       zhyee:
         password: zhyee
         authorizedSchemas: sharding_db_remote
   ```
   
   my Springboot demo configuration is:
   ```yaml
   spring:
     datasource:
       url: jdbc:mysql://localhost:3307/sharding_db
       driver-class-name: com.mysql.jdbc.Driver
       username: zhyee
       password: zhyee
   ```
   and it works.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services