Skip to content
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

Log down the checked privileges to the system.query_log #63998

Open
nikitamikhaylov opened this issue May 16, 2024 · 1 comment · May be fixed by #64597
Open

Log down the checked privileges to the system.query_log #63998

nikitamikhaylov opened this issue May 16, 2024 · 1 comment · May be fixed by #64597
Assignees
Labels

Comments

@nikitamikhaylov
Copy link
Member

nikitamikhaylov commented May 16, 2024

Use case

For testing purposes we would love to know the set of GRANTs required for the query to be finished successfully (successfully == not receiving ACCESS_DENIED error).

Describe the solution you'd like

Add an additional field named checked_privileges of type Array(String) to the system.query_log. It will contain information like ['SELECT ON database.table', 'demangle ON *.*', ...].

P.S. Maybe it is worth to add a field required_privilege which will be non-empty in case when the query finished with an error ACCESS_DENIED. This is needed mostly not to parse the exception message rather than just executing a simple query.

@alexey-milovidov
Copy link
Member

Keep in mind that the list of columns can be very long, so the data amount for queries over wide tables will increase significantly.

@alexkats alexkats self-assigned this May 25, 2024
@alexkats alexkats linked a pull request May 29, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants