Repository navigation
Backport #59775 to 23.8: rabbitmq: fix having neither acked nor nacked messages - #60304
Merged
Merged
Conversation
robot-clickhouse
force-pushed
the
backport/23.8/59775
branch
from
February 22, 2024 14:08
8a662b2 to
c2112cf
Compare
Contributor
|
This is an automated comment for commit c2112cf 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
|
Algunenano
pushed a commit
to Algunenano/ClickHouse
that referenced
this pull request
Nov 18, 2026
…mode Under readonly = 1 or 2 (every HTTP GET runs with readonly = 2), a session of a user holding a privilege WITH GRANT OPTION could still revoke it from another user with a local REVOKE, or propagate its grants with GRANT CURRENT GRANTS, and the change persisted. A plain GRANT is refused there, and so is the same REVOKE ON CLUSTER. readonly refuses a change of grants only in the grant-option branch of ContextAccess::checkAccessImplHelper. A privilege REVOKE fails that check under readonly and then falls back to the "special case for REVOKE" in checkGrantOption, which narrows the revoke to what the grantees hold and authorizes it with a raw AccessRights::containsWithGrantOption, so the readonly branch is never reached. GRANT CURRENT GRANTS clamps the granted rights to getGrantableRights() instead of checking the grant option (ClickHouse#60304), so ContextAccess is not consulted at all. Add ContextAccess::checkCanChangeGrants() (READONLY, the same message as the grant-option branch, skipped for full_access; next to the existing session-level guard checkCanAdministerDefaultRoles) and call it once in InterpreterGrantQuery::execute after the grant-option checks whenever there is a privilege to grant or, after narrowing, to revoke. A REVOKE of a privilege no grantee holds stays a no-op and is accepted, as for roles in ClickHouse#132330. readonly = 0 is unchanged; the containment and clamp semantics are unchanged. An element-wise checkGrantOption under readonly was rejected: with partial revokes it reports a false ACCESS_DENIED for a revoke the user is entitled to (rows 1-2 of the new test turn ACCESS_DENIED), and it still lets through the elements that return before the readonly branch (CLUSTER when on_cluster_queries_require_cluster_grant = false, the temporary database). Under readonly, GRANT CURRENT GRANTS to a grantee outside the GRANTEES list now reports READONLY instead of ACCESS_DENIED, the order a plain GRANT has. The "Permissions for queries" docs listed both statements as exceptions; they now say GRANT, GRANT CURRENT GRANTS and REVOKE of a privilege are refused. Related: ClickHouse#132330 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Original pull-request #59775
Cherry-pick pull-request #60294
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.