-
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
*: add privilege check for slow_query and cluster memory table #14451
Conversation
CI failed in |
@tiancaiamao PTAL |
LGTM |
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.
Rest LGTM.
Co-Authored-By: reafans <30926443+reafans@users.noreply.github.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
Rest LGTM. Wait for the CI fixed. |
Signed-off-by: crazycs <crazycs520@gmail.com>
/run-all-tests |
/rebuild |
3 similar comments
/rebuild |
/rebuild |
/rebuild |
/rebuild |
2 similar comments
/rebuild |
/rebuild |
/rebuild |
1 similar comment
/rebuild |
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.
lgtm
What problem does this PR solve?
Before this PR, TiDB doesn't have a privilege check on below tables:
SLOW_QUERY
CLUSTER_SLOW_QUERY
CLUSTER_PROCESSLIST
Mainly, there is 2 points need to do:
First
For doing privilege checks in the cluster table, we need to add
user
andhost
info to RPC request. It needs to change thetipb
protobuf, see PR: pingcap/tipb#169Second
What kind of privilege is needed for query
SLOW_QUERY
? I think the information inSLOW_QUERY
andPROCESSLIST
is the same, So I use the samePROCESS
privilege for checkingSLOW_QUERY
andCLUSTER_SLOW_QUERY
privilege.eg:
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note