-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)target-release-26.1.0
Description
There is a client connection parameter called row_security
. When set to 'off', any query will fail if at least one row-level security (RLS) policy applies. When set to 'on', which is the default, RLS policies will apply as usual.
This issue is opened to implement this behavior in CRDB, ensuring consistency with postgres.
Note, the connection parameter already exists, but is currently not implemented:
Lines 1646 to 1654 in 6f67524
// See https://www.postgresql.org/docs/10/static/runtime-config-client.html#GUC-ROW-SECURITY | |
// The default in pg is "on" but row security is not supported in CockroachDB. | |
// We blindly accept both values because as long as there are now row security policies defined, | |
// either value produces the same query results in PostgreSQL. That is, as long as CockroachDB | |
// does not support row security, accepting either "on" and "off" but ignoring the result | |
// is postgres-compatible. | |
// If/when CockroachDB is extended to support row security, the default and allowed values | |
// should be modified accordingly. | |
`row_security`: makeCompatBoolVar(`row_security`, false, true /* anyAllowed */), |
Jira issue: CRDB-46421
Epic CRDB-52152
Metadata
Metadata
Assignees
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)target-release-26.1.0