pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: justin.catterson@sofiebio.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13694: Row Level Security by-passed with CREATEUSER permission
Date: Wed, 21 Oct 2015 16:42:33 +0000
Message-ID: <20151021164233.3017.94954@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13694
Logged by:          Justin Catterson
Email address:      justin.catterson@sofiebio.com
PostgreSQL version: 9.5beta1
Operating system:   Ubuntu 14.10 x64
Description:        

Users with the CREATEUSER permission do not evaluate Row Level Security
functions.  pg_user usebypassrls is set to false.

To repeat:
  CREATE POLICY ... WITH CHECK ((Select myFunction())) 
  CREATE USER my_user;
  ALTER USER my_user WITH CREATEUSER;

Have myFunction() return a result of False;
   Update a record belonging to policy.

   Record will successfully update, when it should fail.
  
ALTER USER my_user WITH NOCREATEUSER;
   Update a record belonging to policy.
   Record will fail as expected.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (11+ messages)  latest in thread

Message-ID: <20151021164233.3017.94954@wrigleys.postgresql.org>
Permalink:  ../20151021164233.3017.94954@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20151021164233.3017.94954@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: justin.catterson@sofiebio.com
  Subject: Re: BUG #13694: Row Level Security by-passed with CREATEUSER permission
  In-Reply-To: <20151021164233.3017.94954@wrigleys.postgresql.org>
  References: <20151021164233.3017.94954@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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