pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: David Johnston <polobo@yahoo.com>
Cc: Brice André <brice@famille-andre.be>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Handling mutliple clients access with views
Date: Tue, 25 Oct 2011 11:50:16 +0800
Message-ID: <4EA631F8.1080508@ringerc.id.au> (raw)
In-Reply-To: <34C216F7-8D8D-4F18-A693-AAF922BF6672@yahoo.com>
References: <CAOBG12kFTaWUDHU-puJuDK5wQUZ=hdkFBbN1Ku9HUA8_qp0BAg@mail.gmail.com>
	<4EA62500.9070000@ringerc.id.au>
	<34C216F7-8D8D-4F18-A693-AAF922BF6672@yahoo.com>

On 25/10/11 11:36, David Johnston wrote:

> Except database roles cannot strictly enforce row-level security (i.e., multiple-tenant) which is the goal of this setup.

Ah, yes, if theyr'e relying on _row_ level security then that's very
much the case. I misread their post as suggesting that they had
different tables for different clients, rather than tables that mix
different clients' data.

Declarative row-level security (row ownership) would be really nice...
here's hoping the SELinux work can be extended to support a simpler,
OS-agnostic non-SELinux-based row-level RBAC mechanism.

I'd still use SET ROLE where possible, and rely on SECURITY DEFINER
stored procs in cases where clients' data is mixed in a table so you
need to filter it programmatically. Then I'd wrap those procs in a view
so they were transparent and looked like tables, so once row-level
security is implemented you could switch to that without the app caring.

--
Craig Ringer



view thread (6+ messages)  latest in thread

Message-ID: <4EA631F8.1080508@ringerc.id.au>
Permalink:  ../4EA631F8.1080508@ringerc.id.au/
Also on:    postgresql.org/message-id/4EA631F8.1080508@ringerc.id.au

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ringerc@ringerc.id.au, polobo@yahoo.com, brice@famille-andre.be
  Subject: Re: Handling mutliple clients access with views
  In-Reply-To: <4EA631F8.1080508@ringerc.id.au>

* 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