-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Do not require super
privilege for all admin
statements
#14621
Comments
We should carefully consider what privileges are needed. Requiring super privilege when it is unnecessary reduces security. In MySQL, the checksum command requires just SELECT privilege: https://dev.mysql.com/doc/refman/5.7/en/checksum-table.html @DanielZhangQD lets review more statements that require super privilege. |
the keyword IMHO:
|
Yes, a good solution. |
Yes, we can check what users cannot do with existing |
At a minimum, we should model behavior of SUPER on the range of things it is used for in MySQL: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_super. Only things that affect the entire server instance, or items outside the scope of individual privileges granted to a user (for a specific database, table, column, etc.) should ever have any relationship with the SUPER privilege. I can't imagine why CHECKSUM TABLE would require SUPER, maybe just because it was easiest to add the CHECKSUM command as an "ADMIN" command, and it's been easiest to make all ADMIN commands require SUPER? Note that MySQL is already moving to a system of "dynamic privileges" and is planning on removing SUPER in a future release: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#dynamic-privileges-migration-from-super. We should follow suit. |
For the ADMIN statements documented at https://pingcap.com/docs/stable/reference/sql/statements/admin/, here's the privileges it seems like they ought to naturally require:
And these are not documented:
|
We do have RBAC now, so it seems we should be able to approach this in a MySQL compatible way now. |
|
We are in the process of adding Dynamic privileges in #22439 I am going to close this issue now as a duplicate of dynamic privileges. Please feel free to comment if you would like a specific There is also a proposal which also reduces the power of |
Feature Request
Is your feature request related to a problem? Please describe:
super
privilege is revoked for TiDB clusters created on DBaaS for security consideration, however, some tools, like lightning, will run someadmin
statements, e.g.admin checksum table
, in this case, DBaaS users cannot import data withroot
user.Describe the feature you'd like:
Maybe no need to require
super
privilege for someadmin
statements.cc @gregwebs
The text was updated successfully, but these errors were encountered: