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

Not able to insert data on Masking enabled table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.15, 6.1.1
    • Fix Version/s: 2.5.16, 6.1.2
    • Component/s: masking
    • Labels:
      None
    • Environment:
      CentOS Linux release 7.9.2009 (Core)

      Description

      it is no problem with the masking process for the select clause,
      When the insert command is executed on the table, the following error occurs.

      error message : The function = is used in conjunction with a field that should be masked for 'testuser1'@'127.0.0.1', access is denied.

      masking test case!!
      -------------------------------------------------------------------

      CREATE TABLE t_masking (
        id varchar(20) NOT NULL,
        name varchar(10) NOT NULL,
        ssn char(13) NOT NULL,
        address varchar(50) DEFAULT NULL,
        PRIMARY KEY (`id`)
      );
       
      #cat /etc/maxscale.filter.masking.json 
      {
          "rules": [
              {
                  "replace": {
                       "database": "test"
                      ,"table": "t_masking"
                      ,"column": "ssn"
      		,"match": "[1234]\\d{6}$"		
                  },
                  "with": {
      		"fill":"*"
                  }
              }
          ]
      }
      

      There seems to be an account problem when filtering the masking column.

      When connecting through maxscale.....

      MariaDB [(none)]> system maxctrl --version
      6.1.1
      

      MariaDB [(none)]>
      MariaDB [(none)]> select current_user();
      +----------------+
      | current_user() |
      +----------------+
      | testuser1@%    |   
      +----------------+
      1 row in set (0.001 sec)
      

      MariaDB [test]> insert into t_masking(id, name, ssn, address) values('max','MR.X','0109073234567','America');
      ERROR 1141 (HY000): The function = is used in conjunction with a field that should be masked for 'testuser1'@'127.0.0.1', access is denied.
      

        Attachments

          Activity

            People

            Assignee:
            johan.wikman Johan Wikman
            Reporter:
            ponsuresh.pandians Pon Suresh Pandian
            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.