Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16712

Allow multiple roles at once

    XMLWordPrintable

Details

    Description

      And for roles to take on roles.

      Currently a user can only "wear one hat at a time"

      GRANT USAGE ON *.* TO ‘myuser’@‘%’ IDENTIFIED BY PASSWORD ‘*abcdefxxxxxxxxx’;
      GRANT mysqlread TO ‘myuser'@‘%’ ;                                                                      
      GRANT mysqldml TO ‘myuser’@‘%’ ;                                                     
      GRANT mysqlddl TO ‘myuser’@‘%’;                             
       
      GRANT SELECT, SHOW DATABASES, SHOW VIEW ON *.* TO ‘mysqlread’;
       
      GRANT INSERT, UPDATE, DELETE, EXECUTE ON `mydb`.* TO ‘mysqldml’;
                                                                                                      
      GRANT CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `mydb`.* TO ‘mysqlddl’;
      
      

      Currently, SET ROLE mysqlread; SET ROLE mysqldml; means I can no longer issue SHOW DATABASES;

      Ideally, both sets should apply. This would also mean we need UNSET ROLE mysqldml; available to remove current roles.

      Additionally, roles should be able to stack:

      GRANT mysqlread to mysqldml;
      

      now SET ROLE mysqldml; should have the additional grants of SELECT, SHOW DATABASES, SHOW VIEW

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              manjot Manjot Singh (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.