Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1928

Having problem to apply data masking with MaxScale

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.2.9
    • N/A
    • N/A
    • None
    • OS: Kali Ubuntu-VM
      MariaDB-10.1.29
      maxscale-2.2.9-1
    • 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.

      Attachments

        Activity

          People

            johan.wikman Johan Wikman
            mldhamid Milad Elhaei Sahar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.