[MXS-1928] Having problem to apply data masking with MaxScale Created: 2018-06-16  Updated: 2018-06-28  Resolved: 2018-06-28

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: 2.2.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Milad Elhaei Sahar Assignee: Johan Wikman
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

OS: Kali Ubuntu-VM
MariaDB-10.1.29
maxscale-2.2.9-1


Sprint: MXS-SPRINT-61

 Description   

Hi,

I am trying to us MaxScale to apply data masking to sensitive in MariaDB database. I installed the MaxScale on my kali virtual machine to test the data masking feature.

I created rules json file / masking_rules.json as follwoing:

{
    "rules": [
        {
            "replace": {
                "database": "testdb",
                "table": "users",
                "column": "social_id"
            },
            "with": {
                "fill": "X"
                        }
        }
    ]
}

and config file / maxscale.cnf

 [maxscale]
threads=1
#enable_root_user=true
 
[server1]
type=server
address=127.0.0.1
#address=localhost
port=3306
protocol=MariaDBBackend
 
[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1
user=myuser
passwd=mypwd
monitor_interval=2000
 
[Read-Only-Service]
type=service
router=readconnroute
servers=server1
user=myuser
passwd=mypwd
router_options=slave
 
[Read-Write-Service]
type=service
router=readwritesplit
servers=server1
user=myuser
passwd=mypwd
 
[MaxAdmin-Service]
type=service
router=cli
 
[Read-Only-Listener]
type=listener
service=Read-Only-Service
protocol=MariaDBClient
port=4008
 
[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
 
[MaxAdmin-Listener]
type=listener
service=MaxAdmin-Service
protocol=maxscaled
socket=default
 
[MyMasking]
[DatabaseFirewall]
type=filter
module=masking
warn_type_mismatch=always
large_payload=abort
rules=/etc/maxscale.modules.d/masking_rules.json
 
[MyService]
type=service
router=readconnroute
filters=MyMasking
user=myuser
passwd=mypwd

Then when i access my testdb with myuser user and run select name, social_id from users;
see all social ids without masking!

Please help with configuring it.



 Comments   
Comment by Johan Wikman [ 2018-06-27 ]

mldhamid
Does it really say

[MyMasking]
[DatabaseFirewall]
type=filter
module=masking

in your configuration file?

If so, remove the [DatabaseFirewall] line and try again.

Comment by Johan Wikman [ 2018-06-28 ]

mldhamid I'm closing this as Not a Bug. If the reason for the problem was not the presence of the extra section name ([DatabaseFirewall]) then please re-open this or create a new one.

Generated at Thu Feb 08 04:10:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.