-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: default privileges, granting excess privileges when creating an object #72322
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
create user foo with password 'roach';
# login as foo
alter default privileges grant select on tables to foo
# login as root
create table t1();
show grants on table t1;
root@localhost:26257/defaultdb> show grants on table t1;
database_name | schema_name | table_name | grantee | privilege_type
----------------+-------------+------------+---------+-----------------
defaultdb | public | t1 | admin | ALL
defaultdb | public | t1 | foo | SELECT
defaultdb | public | t1 | root | ALL
We're granting too many privileges when creating an object due to default privileges - in this case, foo should not be getting select on this table
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)