Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zox98-0004nz-1n for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 17:25:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zox97-0000Jv-KZ for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 17:25:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZowTl-0003bD-Qa for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 16:43:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZowTe-0000S5-U6 for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 16:43:08 +0000 MIME-Version: 1.0 Subject: BUG #13694: Row Level Security by-passed with CREATEUSER permission To: pgsql-bugs@postgresql.org From: justin.catterson@sofiebio.com Date: Wed, 21 Oct 2015 16:42:33 +0000 Message-ID: <20151021164233.3017.94954@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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