Repository navigation
Fix revoke of implicit grants - #72872
Merged
Merged
Conversation
Contributor
|
This is an automated comment for commit 79e165f with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
tuanpach
reviewed
Dec 6, 2024
| /// | ||
| /// the query `REVOKE SELECT ON *.* FROM user1` executed by user2 should succeed. | ||
| if (current_user_access.getAccessRights()->containsWithGrantOption(access_to_revoke)) | ||
| if (current_user_access.getAccessRightsWithImplicit()->containsWithGrantOption(access_to_revoke)) |
Member
There was a problem hiding this comment.
Could you kindly explain the difference between access and access_with_implicit?
Member
Author
There was a problem hiding this comment.
We have some implicit grants in our RBAC. For example, when a user has SELECT on a table, they should also be able to execute SHOW CREATE TABLE. Thus, we add a SHOW grant implicitly under the hood.
SHOW GRANTS FOR test
Query id: e8d80ef0-f85f-4e75-bd78-e9eeb44ae26c
┌─GRANTS FOR test───────────────────────────────┐
1. │ GRANT SELECT ON *.* TO test WITH GRANT OPTION │
└───────────────────────────────────────────────┘
1 row in set. Elapsed: 0.002 sec.
pufit-MBP.attlocal.net :) SHOW GRANTS FOR test WITH IMPLICIT
SHOW GRANTS FOR test WITH IMPLICIT
Query id: b1fb45ac-823e-467e-aea3-f64dc0c58060
┌─GRANTS FOR test WITH IMPLICIT────────────────────────────────────────────────────────────┐
1. │ GRANT SHOW DATABASES, SHOW TABLES, SHOW COLUMNS, SELECT ON *.* TO test WITH GRANT OPTION │
└──────────────────────────────────────────────────────────────────────────────────────────┘
1 row in set. Elapsed: 0.002 sec.
pufit-MBP.attlocal.net :)
tuanpach
approved these changes
Dec 6, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
This was referenced Dec 14, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
This was referenced Dec 14, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
This was referenced Dec 14, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
This was referenced Dec 14, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
This was referenced Dec 14, 2024
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
robot-ch-test-poll4
added a commit
that referenced
this pull request
Dec 14, 2024
Backport #72872 to 24.10: Fix revoke of implicit grants
robot-ch-test-poll
added a commit
that referenced
this pull request
Dec 14, 2024
Backport #72872 to 24.9: Fix revoke of implicit grants
robot-clickhouse
added a commit
that referenced
this pull request
Dec 14, 2024
Backport #72872 to 24.8: Fix revoke of implicit grants
pufit
pushed a commit
that referenced
this pull request
Dec 19, 2024
Co-authored-by: robot-clickhouse <[email protected]>
pufit
pushed a commit
that referenced
this pull request
Dec 19, 2024
Co-authored-by: robot-clickhouse <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix the situation when a user can't run
REVOKE ALL ON *.*because of implicit grants in the target access entity.CI Settings (Only check the boxes if you know what you are doing):