Re: postgres_fdw super user checks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw super user checks
Date: 2017-10-12 19:08:10
Message-ID: CA+TgmobG1TV4nCeUMYw7DMuaM1b8iVprznvQuYafffLorBprVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 5, 2017 at 1:02 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> I don't see a reason to block a directly-logged-in superuser from using a
> mapping. I asked in the closed list whether the current (released)
> behavior was a security bug, and the answer was no. And I don't know why
> else to block superusers from doing something other than as a security bug.
> Also it would create a backwards compatibility hazard to revoke the ability
> now.

Well, my thought was that we ought to be consistent about whose
authorization matters. If we're using the view owner's credentials in
general, then we also (defensibly, anyway) ought to use the view
owner's superuser-ness to decide whether to enforce this restriction.
Using either the view owner's superuser-ness or the session user's
superuser-ness kind of puts you halfway in the middle. The view
owner's rights are what matters mostly, but your own rights also
matter a little bit around the edges. That's a little strange.

I don't have violently strong opinions about this - does anyone else
have a view?

--
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 2017-10-12 19:18:37 Re: Optimise default partition scanning while adding new partition
Previous Message Gourav Kumar 2017-10-12 18:59:51 Re: How does postgres store the join predicate for a relation in a given query