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 15:07:49 UTC
[GitHub] [incubator-shardingsphere] ixiaomlt opened a new issue #3069:
Enrypt doesn't work in Oracle 11.0.2.4, but it works in MySQL.
ixiaomlt opened a new issue #3069: Enrypt doesn't work in Oracle 11.0.2.4, but it works in MySQL.
URL: https://github.com/apache/incubator-shardingsphere/issues/3069
#### version of sharesphere
4.0.0-RC2
#### version of database
Oracle 11.0.2.4.0
#### version of spring boot
2.0.4.RELEASE
#### config
~~~yml
spring:
shardingsphere:
datasource:
names: dg
# dg dataSource
dg:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@192.168.10.57:1521:orcl
username: dna_dg
password: dna_dg
encrypt:
encryptors:
encryptor_aes:
type: aes
props:
aes.key.value: aes-dg
encryptor_md5:
type: md5
tables:
sys_user:
columns:
certificate_no:
plainColumn: certificate_no
cipherColumn: certificate_no_cipher
encryptor: encryptor_aes
props:
query.with.cipher.column: false
sql.show: true
~~~
### start log
~~~log
2019-09-19 17:08:13.347 INFO 676 --- [ restartedMain] o.a.s.core.util.ConfigurationLogger : EncryptRuleConfiguration
encryptors:
encryptor_aes:
props:
aes.key.value: aes-dg
type: aes
encryptor_md5:
type: md5
tables:
sys_user:
columns:
certificate_no:
cipherColumn: certificate_no_cipher
encryptor: encryptor_aes
plainColumn: certificate_no
2019-09-19 17:08:13.347 INFO 676 --- [ restartedMain] o.a.s.core.util.ConfigurationLogger : Properties
sql.show: 'true'
query.with.cipher.column: 'false'
~~~
#### shardingsphere sql
~~~log
2019-09-19 17:08:31.666 INFO 676 --- [nio-8061-exec-1] ShardingSphere-SQL : Rule Type: encrypt
2019-09-19 17:08:31.666 INFO 676 --- [nio-8061-exec-1] ShardingSphere-SQL : SQL: insert into SYS_USER (ID, INIT_SERVER_NO, LAB_ID,
USER_TYPE, USER_NAME,
PASSWORD,
FULL_NAME, PHONE, CERTIFICATE_TYPE,
CERTIFICATE_NO, EMAIL,
ORGANIZATION_REGIONALISM,
ORGANIZATION_NAME, LOGIN_IP_RANGE,
ACTIVE_FLAG,
IS_LAB_EMPLOYEE, LAB_EMPLOYEE_ID, IS_TRANSFER_USER,
REMARK, CREATE_USER, CREATE_DATETIME,
UPDATE_USER, UPDATE_DATETIME, NATIONALITY, GENDER, BIRTH_DATE,
NATIVE_REGIONALISM, NATIVE_ADDR, PICTURE, INIT_SERVER_NO_NAME)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
~~~
The result is that cipherColumn: certificate_no_cipher is empty and data masking is ineffective, I want to know where my configuration file is incorrectly configured. Please help me find it out.
----------------------------------------------------------------
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