pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: RLS: Keep deny policy when only restrictive exist
2+ messages / 1 participants
[nested] [flat]

* pgsql: RLS: Keep deny policy when only restrictive exist
@ 2015-08-03 19:33 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-08-03 19:33 UTC (permalink / raw)
  To: pgsql-committers

RLS: Keep deny policy when only restrictive exist

Only remove the default deny policy when a permissive policy exists
(either from the hook or defined by the user).  If only restrictive
policies exist then no rows will be visible, as restrictive policies
shouldn't make rows visible.  To address this requirement, a single
"USING (true)" permissive policy can be created.

Update the test_rls_hooks regression tests to create the necessary
"USING (true)" permissive policy.

Back-patch to 9.5 where RLS was added.

Per discussion with Dean.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dee0200f0276c0f9da930a2c926f90f5615f2d64

Modified Files
--------------
src/backend/rewrite/rowsecurity.c                        |   14 ++++++++++----
.../modules/test_rls_hooks/expected/test_rls_hooks.out   |    7 +++++++
src/test/modules/test_rls_hooks/sql/test_rls_hooks.sql   |    8 ++++++++
src/test/modules/test_rls_hooks/test_rls_hooks.c         |    5 +++++
4 files changed, 30 insertions(+), 4 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: RLS: Keep deny policy when only restrictive exist
@ 2015-08-03 19:33 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-08-03 19:33 UTC (permalink / raw)
  To: pgsql-committers

RLS: Keep deny policy when only restrictive exist

Only remove the default deny policy when a permissive policy exists
(either from the hook or defined by the user).  If only restrictive
policies exist then no rows will be visible, as restrictive policies
shouldn't make rows visible.  To address this requirement, a single
"USING (true)" permissive policy can be created.

Update the test_rls_hooks regression tests to create the necessary
"USING (true)" permissive policy.

Back-patch to 9.5 where RLS was added.

Per discussion with Dean.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8f439658524d4a3566682ff9e25d4791c5498e53

Modified Files
--------------
src/backend/rewrite/rowsecurity.c                        |   14 ++++++++++----
.../modules/test_rls_hooks/expected/test_rls_hooks.out   |    7 +++++++
src/test/modules/test_rls_hooks/sql/test_rls_hooks.sql   |    8 ++++++++
src/test/modules/test_rls_hooks/test_rls_hooks.c         |    5 +++++
4 files changed, 30 insertions(+), 4 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-08-03 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 19:33 pgsql: RLS: Keep deny policy when only restrictive exist Stephen Frost <sfrost@snowman.net>
2015-08-03 19:33 pgsql: RLS: Keep deny policy when only restrictive exist 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