Repository navigation
Cherry pick #129033 to 26.10: Move the handler privileges out of CREATE, ALTER and DROP into a new HANDLER ADMIN group - #132626
Conversation
CREATE_HANDLER, ALTER_HANDLER and DROP_HANDLER were children of the CREATE, ALTER and DROP groups, so GRANT CREATE ON *.* (or GRANT ALTER) was enough to define or rewrite a SQL-defined HTTP handler. The handler query runs with the privileges of whoever calls the URL, so a user with only CREATE could plant e.g. `AS GRANT SELECT ON secret.* TO me` behind METHODS (POST) and gain it the next time a privileged user posts there. Add a HANDLER_ADMIN group under ALL and re-parent all four handler privileges (including SHOW_HANDLERS) to it, the same layout as NAMED_COLLECTION_ADMIN. ALL holders and explicit grants of the individual privileges are unaffected; the readonly and allow_ddl checks are keyed on the individual privileges and do not change. A GROUP takes no flag bit, so AccessFlags::SIZE stays 256; AccessType now has 256 values, the full range of uint8_t. Update 01271_show_privileges, add 05493_handler_admin_privilege, and document the group in the CREATE HANDLER and GRANT documentation sources. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lege-group # Conflicts: # src/Parsers/Access/ParserGrantQuery.cpp
Move the handler privileges out of `CREATE`, `ALTER` and `DROP` into a new `HANDLER ADMIN` group
|
The conflicts are context only. In On a 26.10 debug build of the resolved tree, I cannot push to |
# Conflicts: # src/Access/Common/AccessType.h # src/Parsers/Access/ParserGrantQuery.cpp # tests/queries/0_stateless/01271_show_privileges.reference
Original pull-request #129033
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job