Afsalmc opened a new issue, #30367:
URL: https://github.com/apache/shardingsphere/issues/30367
## Bug Report
### Which version of ShardingSphere did you use?
5.4.1
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
The column should be masked irrespective of function transformation.
### Actual behavior
The column is masked when queried normally. Unmasked when used inside a
function such as lower(column_name).
```
dataSources:
mydatasource:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc
jdbcUrl: jdbc:mysql://localhost;databaseName=mydb;
rules:
- !SHARDING
tables:
portalusers:
actualDataNodes: mydatasource.userdetails
- !MASK
tables:
portalusers:
columns:
Name:
maskAlgorithm: mask_from_x_to_y_mask
maskAlgorithms:
mask_from_x_to_y_mask:
type: MASK_FROM_X_TO_Y
props:
from-x: 1
to-y: 1
replace-char: '*'
```
`select Name from table1 ` -> masked data.
`select lower(Name) from table1` -> unmasked data.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
`select column1 from table1 ` -> masked data.
`select lower(column1) from table1` -> unmasked data.
--
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]