Re: db_user_namespace a "temporary measure"

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: db_user_namespace a "temporary measure"
Date: 2014-03-12 14:58:24
Message-ID: CABUevEzqNLHn_BD6vOQ6KDbZSah0GBtyYmOPuSWfXkhttR9mbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 12, 2014 at 3:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> >> Yeah, what we really need is encapsulated per-DB users and local
> >> superusers. I think every agrees that this is the goal, but nobody
> >> wants to put in the work to implement a generalized solution.
>
> > Encapsulated would probably be the doable part. But local superuser?
> Given
> > that a superuser can load and run binaries, how would you propose you
> > restrict that superuser from doing anything they want? And if you don't
> > need that functionality, then hows it really different from being the
> > database owner?
>
> A local user with the superuser privilege would not be able to log into
> another database, because superuser doesn't give you any extra privilege
> until you've logged in.
>
> Yeah, as superuser you could still break things as much as you pleased,
> but not through SQL.
>

You could COPY over the hba file or sometihng like that :) Or just
pg_read_binary_file() on the files in another database, which is accessible
through SQL as well.

I share your doubts as to how useful such a concept actually is, but
> it'd work if we had real local users.
>

It can also do interesting things like ALTER SYSTEM, replication, backups,
etc. All of which could be used to escalate privileges beyond the local
database.

So you'd have to somehow restrict those, at which point what's the point of
the property in the first place?

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-03-12 15:06:49 Re: db_user_namespace a "temporary measure"
Previous Message Tom Lane 2014-03-12 14:52:14 Re: db_user_namespace a "temporary measure"