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

Masking with functions uses wrong rule settings

    XMLWordPrintable

Details

    • MXS-SPRINT-230

    Description

      In an scenario where I have 2 tables: table1 and table2, both containing a column named field, and a rule:

      {
         "replace": {
             "table": "table1",
             "column": "field"
         },
         "with": {
            "fill": "X"
         }
      }
      

      for a query like

      select * from table2 where field = 1;
      

      I get the error:

      The function = is used in conjunction with a field that should be masked for 'user'@'xxxxx', access is denied.

      So, even when there is no rule for field over table2, I still get the validation error.

      The issue can be circumvented by adding the table name or an alias to that table in the query, like in:

      select * from table2 where table2.field = 1;
      

      Shouldn't the proxy use table and column to search for rules instead of only the column?

      Attachments

        Activity

          People

            johan.wikman Johan Wikman
            pbarsotti Pablo Barsotti
            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.