Re: Multi-tenancy with RLS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multi-tenancy with RLS
Date: 2016-02-09 20:46:39
Message-ID: CA+TgmoYFZmX8O2C1S-2Nh2_XkgZtYJpbG56-d=Uf2tyKEzL+vA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 9, 2016 at 3:26 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Arbitrary code execution is quite a different concern from the prior
> concern regarding incomplete dumps.

I've had both concerns all along, and I think I've mentioned them before.

> To the extent that untrusted code execution is an issue (and my
> experience with environments which would deploy RLS tells me that it
> isn't a practical concern), an option could be created which would cause
> an error to be thrown on non-catalog RLS being run.

There's a major release already in the wild that doesn't behave that
way. And anyway I think that's missing the point: it's true that
features that are turned off don't cause problems, but features that
are turned on shouldn't break things either.

> When it comes to multi-tenancy environments, as this thread is about,
> chances are the only tables you can see are ones which you own or are
> owned by a trusted user, which is why I don't view this as a pratical
> concern, but I'm not against having a solution to address the issue
> raised regarding arbitrary code execution, provided it doesn't create
> more problems than it purports to solve.

Well, I'm against accepting this patch without such a solution.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-02-09 20:47:22 Re: Multi-tenancy with RLS
Previous Message Robert Haas 2016-02-09 20:42:11 Re: [COMMITTERS] pgsql: postgres_fdw: Push down joins to remote servers.