-
-
Notifications
You must be signed in to change notification settings - Fork 2k
MDEV-38601 require FEDERATED ADMIN for SHOW CREATE SERVER #4743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 11.8
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5174,6 +5174,8 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) | |
| res= show_create_db(thd, lex); | ||
| break; | ||
| case SQLCOM_SHOW_CREATE_SERVER: | ||
| if (check_global_access(thd, PRIV_STMT_CREATE_SERVER)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not the final reviewer, but here's my two cents (feel free to ignore completely): It usually is not a good idea to reuse privileges. This turns them into roles (guarding access to multiple operations vs guarding a single operation). I'd advocate to adding a different privilege, to go inline with the already very atomic privileges for CREATE, ALTER and DROP SERVER. Ideally servers would be like any other SQL object and the privileges to them would not be global. But it's what it is: they are global. If you absolutely must reuse any of the privileges, I'd suggest reusing ALTER or (DROP + CREATE). As this would be how you can reroute already existing code to new servers. But I'd definitely advise against this. |
||
| break; | ||
| WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); | ||
| res= mysql_show_create_server(thd, &lex->name); | ||
| break; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you revoking SUPER as well? Would SUPER allow SHOW CREATE SERVER? If it would, please document that into the Jira and the commit message.
And also add tests please.