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

Database grants with wildcards should be matched using LIKE operator (access denied with default schema)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.5
    • Fix Version/s: 2.5.7
    • Component/s: Authenticator
    • Labels:
      None
    • Sprint:
      MXS-SPRINT-121

      Description

      As per subject, on MaxScale 2.5.5 (not on 2.4.11) see example.

      Worth noting the grants use a wildcard for the schema.

      A somewhat similar issue has been fixed in 2.5.7 (https://jira.mariadb.org/browse/MXS-3303)

      [root@centos71 ~]# mariadb -u myuser -p123 -h 127.0.0.1 -P 4006 sales-main
      ERROR 1044 (42000): Access denied for user 'myuser'@'127.0.0.1' to database 'sales-main'
       
      [root@centos71 ~]# mariadb -u myuser -p123 -h 127.0.0.1 -P 4006
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
       
      MariaDB [(none)]> use sales-main
      Database changed
       
      MariaDB [sales-main]> show tables;
      +-------------------+
      | Tables_in_sales-main |
      +-------------------+
      | t1                |
      +-------------------+
      1 row in set (0.003 sec)
       
      MariaDB [sales-main]> show grants;
      +---------------------------------------------------------------------------------------------------------+
      | Grants for myuser@%                                                                                   |
      +---------------------------------------------------------------------------------------------------------+
      | GRANT USAGE ON *.* TO `myuser`@`%` IDENTIFIED BY PASSWORD '*password' |
      | GRANT ALL PRIVILEGES ON `sales-%`.* TO `myuser`@`%`                                                      |
      +---------------------------------------------------------------------------------------------------------+
      2 rows in set (0.002 sec)
      

        Attachments

          Activity

            People

            Assignee:
            esa.korhonen Esa Korhonen
            Reporter:
            claudio.nanni Claudio Nanni (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration