Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VGL6v-0005fW-Je for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Sep 2013 03:47:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VGL6u-0001H5-OY for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Sep 2013 03:47:28 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VGL6t-0001Gv-Ih for pgsql-hackers@postgresql.org; Mon, 02 Sep 2013 03:47:27 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VGL6q-00074W-O7 for pgsql-hackers@postgresql.org; Mon, 02 Sep 2013 03:47:26 +0000 Received: from [192.168.1.30] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MhJrR-1VchS12vMf-00MM3p; Mon, 02 Sep 2013 05:47:17 +0200 Message-ID: <52240A43.3000100@2ndQuadrant.com> Date: Sun, 01 Sep 2013 23:47:15 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Greg Stark CC: Kohei KaiGai , Josh Berkus , "ktm@rice.edu" , Alexander Korotkov , Oleg Bartunov , PgHacker Subject: Re: [v9.4] row level security References: <51E8A8C1.2050700@2ndQuadrant.com> <20130829142321.GA30496@aart.rice.edu> <521F7DFB.8060602@agliodbs.com> <5220D832.7090104@agliodbs.com> <52238206.2060705@agliodbs.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Y1KfvqCmtHLFrUOsG8XviVErNHsJolw7Js8B4TD+Lpm r+7UJxmb4k7tnHtxVkx3bSfNeNsZPZacyKLlwQ72WecE/Y9kG3 UqYer+RlJMFTW4frbVua8qKAyO6VBacNCRZ9JVVamUald5WqTs /YWRgDr0jkmw+wV3ioQmcZ69CXzj1c3LxY7cdu4U9VupQp2HDJ tezeZPpc+QdgEOlA8lc0YtTdJj3GokJ7bs+UucalrkVJoO7O0M BZf0AhalnjoPe3FJEWfYToOHNrqqaGIcRj1han3RLnND5q0sP6 59hx8OmYCaAMPCoFNTTYjuQW/1Q+NSVtdsNpSC0qUxinYHOqmR 0b4ctaJjzYfW9lG3ekiY= X-Pg-Spam-Score: -1.9 (-) 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 On 9/1/13 5:54 PM, Greg Stark wrote: > So I think up above Tom is wrong about why it's ok that INSERT leaks > keys when it reports a unique key violation. The reason why it's ok > that there's a covert channel there is that the DBA can avoid that > covert channel by being careful when creating unique constraints. He > or she should be aware that creating a unique constraint implicitly > provides a kind of limited access to data to users who have INSERT > privilege even if they lack the real SELECT privilege. And if someone can INSERT values that they can't actually see once they're committed, that's a similarly bad we should describe. People should be dumping their trash in their neighbor's yard. I think eventually this needs to be wrestled to the ground in a robust way. I want to see if all unique violations might be changed to give less information in this sort of RLS context. One rough early idea is to create a new error condition that means you hit something protected by RLS, but doesn't leak any more information than that. Just a generic "Security restriction operation" that comes out of fishing for keys, inserting outside your area, etc. I want to think through some use cases and review the code to see whether that concept helps or not. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers