Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHEwX-0005NS-J2 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Sep 2013 15:24:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VHEwW-0004MZ-Ct for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Sep 2013 15:24:28 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHEwK-00044f-QH for pgsql-hackers@postgresql.org; Wed, 04 Sep 2013 15:24:16 +0000 Received: from nm37-vm8.bullet.mail.bf1.yahoo.com ([72.30.238.220]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHEwG-0003QH-Mw for pgsql-hackers@postgresql.org; Wed, 04 Sep 2013 15:24:15 +0000 Received: from [66.196.81.171] by nm37.bullet.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 15:24:11 -0000 Received: from [98.139.212.208] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 15:24:11 -0000 Received: from [127.0.0.1] by omp1017.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 15:24:11 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 586303.58411.bm@omp1017.mail.bf1.yahoo.com Received: (qmail 55561 invoked by uid 60001); 4 Sep 2013 15:24:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1378308251; bh=9mbTYbE/zPZk66zUWJ8MEucBK1Jg5x2OBfZhP//ISZk=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=MM3T8bVFex9Uxdy9hOef6FHe5Br6yvMgXYNAlLRhua4SlmRYDviM9sH8oHSEVb5USKjD/7XjWGius9anaWswH8wwQqseAa9Bfnql6dl+mE4+UkFtCCI7V57xEji6lkNUej3Ru+HnJ7PbUMs1nvRe27EZtr9cTvCf5pNZbTxJwUo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Vcnd01T1FPcdEFJzRjO/9VeiKjWgO6oUtXAPwEaXH0pKmS/HqdrwkrbTpH5GCL/TOzE8I/4X3dmcHBAqR0v5Le+IRq8oS+Tn6xwp8YJmGPuNY+FVbG1PigHi19dmCNA6fljDOM2AlKpb8l7071WnQvwcQqLN/zEEADCvib1EUas=; X-YMail-OSG: QnFu5I8VM1lNI89zuCQimqCYybP5W54Fx3zVBV2yb5LDFy7 mqJwgDJEyn7EBq1jjzzyADcPSGBoW0tuYpEb2Ql_wgUgiD.r.rbOozE8gnCD GsMfnwh5Cq6g7JCc_CXAXdmQiNFr0F3Nzlvj5aXFVMTjhOtVKUhss3XUfFay 4HfsSJoTL8LvYcGWW7KVaC_a4W1h13T1CFbIwnWgKgHqWi_UcNBjkk18QGGq NLtm84ZlXxdRHJSFKeHvbTYmDSA.xnqM2JNfxiYdWVkA.u5TpCT.F3lht2Wq 0TtD7PaShrdNKRrAtkVBW3XkfL6WT8ylX6KfxbFwTwwYfRamQvyaIBOxW9gH aAJ9RZ2MPl4JLN39ceXBVsKqTrmLJVdBThsaGYXWBJFNWsWYFWbCB38j7lnL HkabOiiilcRWut0NVJ55GCOSgktyCG44wsBih0qc9Q7Ub0LI8VUsNBQVEsEh rK58L7droQ65AeUXyYbg8KP8Lr6Q_u3188phqXNX5d_vQcENfHCL3tAogGWC n_CK.rm4PumPszsvE5zQ6P5wwlmaQn3DBiWk1f4yLloOL9tWbjthxV7UA5vo LvYqw0E4pZqut3h1VX9CcTv2qh_y8Bk52Y0aAFlWlSD2iYz97AXD9vz1RASw QFvA- Received: from [76.255.18.237] by web162905.mail.bf1.yahoo.com via HTTP; Wed, 04 Sep 2013 08:24:11 PDT X-Rocket-MIMEInfo: 002.001, Um9iZXJ0IEhhYXMgPHJvYmVydG1oYWFzQGdtYWlsLmNvbT4gd3JvdGU6Cj4gVG9tIExhbmUgPHRnbEBzc3MucGdoLnBhLnVzPiB3cm90ZToKPj4gUm9iZXJ0IEhhYXMgPHJvYmVydG1oYWFzQGdtYWlsLmNvbT4gd3JpdGVzOgoKPj4.IElNSE8sIHRoaXMgbmV3IGZlYXR1cmUgc2hvdWxkIGJlIHNpbWlsYXJseSBzaW1wbGU6IHdoZW4gYW4KPj4.IHVucHJpdmlsZWdlZCB1c2VyIHJlZmVyZW5jZXMgYSB0YWJsZSwgdHJlYXQgdGhhdCBhcyBhIHJlZmVyZW5jZQo.Pj4gdG8gYSBsZWFrcHJvb2YgdmlldyBvdmVyIHQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.156.576 References: <20130829142321.GA30496@aart.rice.edu> <521F7DFB.8060602@agliodbs.com> <5220D832.7090104@agliodbs.com> <20130830192729.GO2706@tamriel.snowman.net> <16798.1377891794@sss.pgh.pa.us> <1398.1378305956@sss.pgh.pa.us> <1543.1378306249@sss.pgh.pa.us> Message-ID: <1378308251.45837.YahooMailNeo@web162905.mail.bf1.yahoo.com> Date: Wed, 4 Sep 2013 08:24:11 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: [v9.4] row level security To: Robert Haas , Tom Lane Cc: Stephen Frost , Josh Berkus , Kohei KaiGai , "ktm@rice.edu" , Alexander Korotkov , Oleg Bartunov , Greg Smith , PgHacker In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas wrote: > Tom Lane wrote: >> Robert Haas writes: >>> IMHO, this new feature should be similarly simple: when an >>> unprivileged user references a table, treat that as a reference >>> to a leakproof view over the table, with the RLS qual injected >>> into the view. >> >> And for insert/update/delete, we do what exactly? > > The same mechanism will prevent UPDATE and DELETE from seeing any > rows the user shouldn't be able to touch. +1 > Simon and Greg are arguing that when an INSERT or UPDATE happens, > we ought to also check that the NEW row matches the RLS qual.=A0 I > don't find that to be terribly important because you can > accomplish the same thing with a per-row trigger today; and I > also don't think everyone will want that behavior. As an example from my Wisconsin Courts days, source documents come in which need to be entered, which may contain a Social Security Number, and most of the Clerk of Courts staff should be authorized to enter that into the database.=A0 Once it is entered, most people should not be allowed to view it, including many of the people who were authorized to enter it initially.=A0 It's one thing for a line staff person to have a handful of documents come across their desk with SSN on a given day; it's quite another if they could dump a list of names, addresses, dates of birth, and SSNs for the entire database on demand. In a way this issue is similar to the covert channel issue -- volume matters. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers