-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40879: sql: check privileges in CONFIGURE ZONE commands r=solongordon a=solongordon Previously, any user could apply zone configurations to any object. This commit enforces that users must have appropriate privileges to run a CONFIGURE ZONE command. For system ranges, the system database, and tables in that database, the user must be an admin. For other databases and tables, the user must have CREATE privileges on the object. Release note (backward-incompatible change): CONFIGURE ZONE commands now fail if the user does not have sufficient privileges. If the target is a system range, the "system" database, or a table in that database, the user must be an admin. For all other databases and tables, the user must have the CREATE privilege on the target database or table. Note that this change may be backward-incompatible for users who run scripted CONFIGURE ZONE commands via a user with restricted permissions. To add the necessary permissions, use the GRANT command via an admin user. To grant the admin role to a user, run `GRANT admin TO <user>`. To grant the CREATE privilege on a database or table, run `GRANT CREATE ON [DATABASE | TABLE] <name> TO <user>`. Release justification: Fix for high-priority bug in existing functionality. Fixes #40693 Co-authored-by: Solon Gordon <solon@cockroachlabs.com>
- Loading branch information
Showing
2 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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