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/04/28 06:28:45 UTC

[GitHub] [shardingsphere] yang771036958 opened a new issue, #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

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

   spring:
     application:
       name: lite-sys-uaa
     messages:
       basename: com/hollysmart/sys/messages
     main:
       allow-bean-definition-overriding: true
     cloud:
       nacos:
         discovery:
           server-addr: ${spring.cloud.nacos.server-addr}
         config:
           file-extension: yml
           server-addr: ${spring.cloud.nacos.server-addr}
   
     shardingsphere:
       datasource:
         names: ds-0,ds-1,ds-2
         ds-0:
           type: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: jdbc:mysql://${hollysmart.datasource-common.ip}/lite_admin_service?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&autoReconnect=true
           username: ${hollysmart.datasource-common.username}
           password: ${hollysmart.datasource-common.password}
         ds-1:
           type: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: jdbc:mysql://${hollysmart.datasource-common.ip}/lite_admin_service?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&autoReconnect=true
           username: ${hollysmart.datasource-common.username}
           password: ${hollysmart.datasource-common.password}
         ds-2:
           type: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: jdbc:mysql://${hollysmart.datasource-common.ip}/lite_admin_service?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&autoReconnect=true
           username: ${hollysmart.datasource-common.username}
           password: ${hollysmart.datasource-common.password}
       rules:
         dataSources:
           ds:
             writeDataSourceName: ds-0
             readDataSourceNames:
               - ds-1
               - ds-2
             loadBalancerName: roundRobin
         loadBalancers:
           roundRobin:
             type: ROUND_ROBIN
         sharding:
           tables:
             sys_user:
               actual-data-nodes: ds-0.sys_user_$->{0..2}
               databaseStrategy:
                 standard:
                   shardingColumn: USER_ID
                   shardingAlgorithmName: sys-user-database-alg
               tableStrategy:
                 standard:
                   shardingColumn: USER_ID
                   shardingAlgorithmName: sys-user-table-alg
             sys_user_mobile:
               actual-data-nodes: ds-0.sys_user_mobile_$->{0..2}
               databaseStrategy:
                 standard:
                   shardingColumn: MOBILE
                   shardingAlgorithmName: sys-user-database-alg
               tableStrategy:
                 standard:
                   shardingColumn: MOBILE
                   shardingAlgorithmName: sys-user-mobile-table-alg
             sys_user_username:
               actual-data-nodes: ds-0.sys_user_username_$->{0..2}
               databaseStrategy:
                 standard:
                   shardingColumn: USERNAME
                   shardingAlgorithmName: sys-user-database-alg
               tableStrategy:
                 standard:
                   shardingColumn: USERNAME
                   shardingAlgorithmName: sys-user-username-table-alg
             sys_user_oauth:
               actual-data-nodes: ds-0.sys_user_oauth_$->{0..2}
               databaseStrategy:
                 standard:
                   shardingColumn: OPEN_ID
                   shardingAlgorithmName: sys-user-database-alg
               tableStrategy:
                 standard:
                   shardingColumn: OPEN_ID
                   shardingAlgorithmName: sys-user-oauth-table-alg
           shardingAlgorithms:
             sys-user-database-alg:
               type: INLINE
               props:
                 algorithm-expression: ds-0
             sys-user-table-alg:
               type: INLINE
               props:
                 algorithm-expression: sys_user_$->{USER_ID % 3}
             sys-user-mobile-table-alg:
               type: INLINE
               props:
                 algorithm-expression: sys_user_mobile_$->{Math.abs(MOBILE.hashCode())  % 3}
             sys-user-username-table-alg:
               type: INLINE
               props:
                 algorithm-expression: sys_user_username_$->{Math.abs(USERNAME.hashCode())  % 3}
             sys-user-oauth-table-alg:
               type: INLINE
               props:
                 algorithm-expression: sys_user_oauth_$->{Math.abs(OPEN_ID.hashCode())  % 3}
         encrypt:
           encryptors:
             aes_encryptor:
               type: AES
               props:
                 aes-key-value: 123456abc
           tables:
             sys_user:
               columns:
                 MOBILE:
                   cipherColumn: MOBILE
                   encryptorName: aes_encryptor
   
   
   
   ==>  Preparing: INSERT INTO SYS_USER (USER_ID, USERNAME, PASSWORD, FIRST_NAME, MOBILE, CREATED_BY, DATE_CREATED, DATE_UPDATED, UPDATED_BY, TENANT_SITE_ID, TENANT_STORE_ID, ACCOUNT_NON_LOCKED, CREDENTIALS_NON_EXPIRED, ACCOUNT_NON_EXPIRED, ENABLED) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
   
   ==> Parameters: 191003(Long), ywy913(String), $2a$10$R/Snj4NU7JgRo4ijeGTCvejD2IJt2Nb1NaIxHmzchGKyfoMePUsVK(String), 杨(String), 13146541464(String), 0(Long), 2022-04-28 14:11:37.42(Timestamp), 2022-04-28 14:11:37.42(Timestamp), 0(Long), 846e0800-3ff9-48db-9d60-d13a37c95f1e(String), 999999(Long), true(Boolean), true(Boolean), true(Boolean), true(Boolean)
   <==    Updates: 1
   
   Why is the MOBILE not encrypted?
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] cheese8 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
cheese8 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1113924364

   Assign me, I'm following it.


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111827504

   sys_user -> SYS_USER


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111798562

   ![image](https://user-images.githubusercontent.com/34882711/165691105-1cb465c3-7218-4cdb-8e84-60ed4c658745.png)
   


-- 
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] strongduanmu commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111850469

   Hi @yang771036958, thank you for your feedback. It seems to be a capitalization issue, are you interested in submitting a PR to optimize it?


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111800068

   [lite-sys-uaa-sharding-dev.txt](https://github.com/apache/shardingsphere/files/8580116/lite-sys-uaa-sharding-dev.txt)
   


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111826609

   
   ![image](https://user-images.githubusercontent.com/34882711/165696233-14d0dc66-98d6-42f5-b607-d11691962774.png)
   ![image](https://user-images.githubusercontent.com/34882711/165696275-d8e413ae-36a1-49ab-b855-5a53f04024a3.png)
   
   He's working 。。。。。。。。
   


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111805145

   help me @rfscholte @WillemJiang @ke4qqq 


-- 
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] yang771036958 commented on issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
yang771036958 commented on issue #17171:
URL: https://github.com/apache/shardingsphere/issues/17171#issuecomment-1111797593

   ![image](https://user-images.githubusercontent.com/34882711/165690866-e89333eb-cb5d-4b66-a0e5-cbcce5066bab.png)
   


-- 
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] strongduanmu closed issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #17171: Encryption does not work ,shardingsphere-jdbc 5.1.1
URL: https://github.com/apache/shardingsphere/issues/17171


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