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

sql: check privileges in CONFIGURE ZONE commands #40879

Merged
merged 1 commit into from
Sep 23, 2019

Commits on Sep 18, 2019

  1. sql: check privileges in CONFIGURE ZONE commands

    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 cockroachdb#40693
    solongordon committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    9e04472 View commit details
    Browse the repository at this point in the history