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

IP wildcard values are not permitted in host values while using data masking

    XMLWordPrintable

Details

    Description

      While dealing with Data masking using Maxscale https://mariadb.com/kb/en/mariadb-maxscale-6-masking/ its not working as expected with wildcard used for host value in applies_to or exempted section
      https://kb-prod.mariadb.com/kb/en/mariadb-maxscale-6-masking/#applies_to

      Here is the test case [Not working] :-

      Filename :- filter02.json

      {
              "rules": [
              {
                      "replace": {
                      "database": "sbtest",
                      "table": "sbtest1",
                      "column": "pad"},
                      "with": {"fill": "X"},
      "applies_to": [ "'app_user'@'192.168.47.%'", "'uat_user'@'192.168.47.%'" ],
      "exempted": ["'mgr_user'@'192.168.47.%'"]
              }
          ]
      }
      

      Output from backend MariaDB server :-

       
      MariaDB [sbtest]> select current_user();
      +-----------------------+
      | current_user()        |
      +-----------------------+
      | app_user@192.168.47.% |
      +-----------------------+
      1 row in set (0.002 sec)
       
       
      MariaDB [sbtest]> select pad from sbtest1 limit 10;
      +-------------------------------------------------------------+
      | pad                                                         |
      +-------------------------------------------------------------+
      | 67847967377-48000963322-62604785301-91415491898-96926520291 |
      | 23183251411-36241541236-31706421314-92007079971-60663066966 |
      | 38615512647-91458489257-90681424432-95014675832-60408598704 |
      | 63947013338-98809887124-59806726763-79831528812-45582457048 |
      | 34551750492-67990399350-81179284955-79299808058-21257255869 |
      | 05161542529-00085727016-35134775864-52531204064-98744439797 |
      | 91798303270-64988107984-08161247972-12116454627-22996445111 |
      | 76460662325-41613089656-42706083314-81833284991-17063140920 |
      | 30508501104-50823269125-88107014550-70202920684-95842308929 |
      | 29489382504-13697582598-09964978366-26554639515-36136545002 |
      +-------------------------------------------------------------+
      10 rows in set (0.003 sec)
      

      While its working fine with :-

      filter03.json

      {
              "rules": [
              {
                      "replace": {
                      "database": "sbtest",
                      "table": "sbtest1",
                      "column": "pad"},
                      "with": {"fill": "X"},
      "applies_to": [ "'app_user'@'%'", "'uat_user'@'%'" ],
      "exempted": ["'mgr_user'@'%'"]
              }
          ]
      }
      
      

      Output from backend MariaDB server :-

       
      MariaDB [sbtest]> select current_user();
      +-----------------------+
      | current_user()        |
      +-----------------------+
      | app_user@192.168.47.% |
      +-----------------------+
      1 row in set (0.002 sec)
       
      MariaDB [sbtest]> select pad from sbtest1 limit 10;
      +-------------------------------------------------------------+
      | pad                                                         |
      +-------------------------------------------------------------+
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
      +-------------------------------------------------------------+
      10 rows in set (0.003 sec)
      
      

      Attachments

        Activity

          People

            johan.wikman Johan Wikman
            pramod.mahto@mariadb.com Pramod Mahto
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.