pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Enforce ALL/SELECT policies in RETURNING for RLS 2+ messages / 1 participants [nested] [flat]
* pgsql: Enforce ALL/SELECT policies in RETURNING for RLS @ 2015-09-15 19:49 Stephen Frost <sfrost@snowman.net> 0 siblings, 0 replies; 2+ messages in thread From: Stephen Frost @ 2015-09-15 19:49 UTC (permalink / raw) To: pgsql-committers Enforce ALL/SELECT policies in RETURNING for RLS For the UPDATE/DELETE RETURNING case, filter the records which are not visible to the user through ALL or SELECT policies from those considered for the UPDATE or DELETE. This is similar to how the GRANT system works, which prevents RETURNING unless the caller has SELECT rights on the relation. Per discussion with Robert, Dean, Tom, and Kevin. Back-patch to 9.5 where RLS was introduced. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/4f3b2a8883c47b6710152a8e157f8a02656d0e68 Modified Files -------------- src/backend/rewrite/rowsecurity.c | 47 +++++++++++++++++++++++++++ src/test/regress/expected/rowsecurity.out | 50 ++++++++++++++++------------- 2 files changed, 74 insertions(+), 23 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Enforce ALL/SELECT policies in RETURNING for RLS @ 2015-09-15 19:49 Stephen Frost <sfrost@snowman.net> 0 siblings, 0 replies; 2+ messages in thread From: Stephen Frost @ 2015-09-15 19:49 UTC (permalink / raw) To: pgsql-committers Enforce ALL/SELECT policies in RETURNING for RLS For the UPDATE/DELETE RETURNING case, filter the records which are not visible to the user through ALL or SELECT policies from those considered for the UPDATE or DELETE. This is similar to how the GRANT system works, which prevents RETURNING unless the caller has SELECT rights on the relation. Per discussion with Robert, Dean, Tom, and Kevin. Back-patch to 9.5 where RLS was introduced. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/68b5201128c2d0c8a3a0051ff7c2534b037e1eab Modified Files -------------- src/backend/rewrite/rowsecurity.c | 47 +++++++++++++++++++++++++++ src/test/regress/expected/rowsecurity.out | 50 ++++++++++++++++------------- 2 files changed, 74 insertions(+), 23 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-09-15 19:49 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-15 19:49 pgsql: Enforce ALL/SELECT policies in RETURNING for RLS Stephen Frost <sfrost@snowman.net> 2015-09-15 19:49 pgsql: Enforce ALL/SELECT policies in RETURNING for RLS Stephen Frost <sfrost@snowman.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox