postgresql/src/backend/commands
Jeff Davis a2ab9c06ea Respect permissions within logical replication.
Prevent logical replication workers from performing insert, update,
delete, truncate, or copy commands on tables unless the subscription
owner has permission to do so.

Prevent subscription owners from circumventing row-level security by
forbidding replication into tables with row-level security policies
which the subscription owner is subject to, without regard to whether
the policy would ordinarily allow the INSERT, UPDATE, DELETE or
TRUNCATE which is being replicated.  This seems sufficient for now, as
superusers, roles with bypassrls, and target table owners should still
be able to replicate despite RLS policies.  We can revisit the
question of applying row-level security policies on a per-row basis if
this restriction proves too severe in practice.

Author: Mark Dilger
Reviewed-by: Jeff Davis, Andrew Dunstan, Ronan Dunklau
Discussion: https://postgr.es/m/9DFC88D3-1300-4DE8-ACBC-4CEF84399A53%40enterprisedb.com
2022-01-07 17:40:56 -08:00
..
Makefile Move parallel vacuum code to vacuumparallel.c. 2021-12-23 11:42:52 +05:30
aggregatecmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
alter.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
amcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
analyze.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
async.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
cluster.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
collationcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
comment.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
constraint.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
conversioncmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copy.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copyfrom.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copyfromparse.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copyto.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
createas.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dbcommands.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
define.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
discard.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dropcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
event_trigger.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
explain.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
extension.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
foreigncmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
functioncmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
indexcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
lockcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
matview.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
opclasscmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
operatorcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
policy.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
portalcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
prepare.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
proclang.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
publicationcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
schemacmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
seclabel.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
sequence.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
statscmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
subscriptioncmds.c Respect permissions within logical replication. 2022-01-07 17:40:56 -08:00
tablecmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tablespace.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
trigger.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsearchcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
typecmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
user.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
vacuum.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
vacuumparallel.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
variable.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
view.c Update copyright for 2022 2022-01-07 19:04:57 -05:00