Bug #82987 | SHOW CREATE USER doesn't show default role | ||
---|---|---|---|
Submitted: | 14 Sep 2016 12:00 | Modified: | 2 Oct 2017 17:08 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Roles | Severity: | S3 (Non-critical) |
Version: | 8.0.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[14 Sep 2016 12:00]
Daniël van Eeden
[15 Sep 2016 5:53]
MySQL Verification Team
Hi Daniël, Thank you for the report. I agree, default role for a user is not in the output of SHOW CREATE USER or at least shown(in SHOW GRANTS..) without expanding it to the privileges the role represents and thus copying user to another server might not work as "expected" with output of SHOW CREATE USER../SHOW GRANTS FOR... Per manual with "USING" clause naming the granted roles for which to display privileges i.e mysql> SHOW GRANTS FOR 'dev1'@'localhost'; +-------------------------------------------------+ | Grants for dev1@localhost | +-------------------------------------------------+ | GRANT USAGE ON *.* TO `dev1`@`localhost` | | GRANT `app_developer`@`%` TO `dev1`@`localhost` | +-------------------------------------------------+ with "USING" clause to expand the privileges the role represents: mysql> SHOW GRANTS FOR 'dev1'@'localhost' USING 'app_developer'; +----------------------------------------------------------+ | Grants for dev1@localhost | +----------------------------------------------------------+ | GRANT USAGE ON *.* TO `dev1`@`localhost` | | GRANT ALL PRIVILEGES ON `app_db`.* TO `dev1`@`localhost` | | GRANT `app_developer`@`%` TO `dev1`@`localhost` | +----------------------------------------------------------+ Noted from https://dev.mysql.com/doc/refman/8.0/en/roles.html Thanks, Umesh
[2 Oct 2017 17:08]
Paul DuBois
Posted by developer: Fixed in 8.0.3. CREATE USER now permits a DEFAULT ROLE clause enabling the account default roles to be specified. SHOW CREATE USER now displays the account default roles if the default is not NONE.