First of all I want to say thanks to Thomas that sent me feedback
on part1 (see his comment). And indeed all three
cases were able to defeat the datamasking.
I rewrote then the rules to also take those cases in
consideration:
ProxySQL> DELETE FROM mysql_query_rules where rule_id INSERT INTO mysql_query_rules
(rule_id,active,username,match_pattern,replace_pattern,apply)
VALUES (1,1,'devel','`cc_num`',"cc_num",0);
ProxySQL> INSERT INTO mysql_query_rules
(rule_id,active,username,match_pattern,replace_pattern,apply)
VALUES (2,1,'devel','^[sS][eE][lL][eE][cC][tT] (.*)cc_num([ ,\n])(.*)',
"SELECT \1CONCAT(LEFT(cc_num,2),REPEAT('X',10)) cc_num\2\3",1);
However the current recursive implementation of ProxySQL (using
flagIN & flagOUT) is not an option to face the case where a …
[Read more]