pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rob Sargent <robjsargent@gmail.com>
Cc: Tim Clarke <tim.clarke@minerva.info>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Web users as database users?
Date: Fri, 20 Sep 2019 10:18:52 -0400
Message-ID: <16391.1568989132@sss.pgh.pa.us> (raw)
In-Reply-To: <28CB89D3-194A-420F-868A-0AFC169EF7E5@gmail.com>
References: <CAPjKuyVzvojzntx2MNMWEvuP3--z_8ZzDbdYrbvNmXkqUeLfhQ@mail.gmail.com>
	<f5dbb11b-c041-cea6-766f-63c223c526f2@minerva.info>
	<28CB89D3-194A-420F-868A-0AFC169EF7E5@gmail.com>

Rob Sargent <robjsargent@gmail.com> writes:
>> On Sep 20, 2019, at 6:15 AM, Tim Clarke <tim.clarke@minerva.info> wrote:
> On 20/09/2019 12:50, David Gallagher wrote:
>>> ... would it make sense to have a user account on the database
>>> to mirror the user account from the web app? Is that an unusual practice?

>> Not at all, we're doing it

> But you likely want a many-to-one mapping of actual user to permission group

Yeah.  You're likely to end up with a *lot* of user accounts in this
scenario.  There is a restriction on how many distinct GRANTs you can
issue against any one object --- performance will get bad if the ACL
list gets too large.  However, you can add lots of users to any group
role.  So put the users into appropriate group(s) and issue database
permissions on the group level.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <16391.1568989132@sss.pgh.pa.us>
Permalink:  ../16391.1568989132@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16391.1568989132@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robjsargent@gmail.com, tim.clarke@minerva.info
  Subject: Re: Web users as database users?
  In-Reply-To: <16391.1568989132@sss.pgh.pa.us>
  References: <CAPjKuyVzvojzntx2MNMWEvuP3--z_8ZzDbdYrbvNmXkqUeLfhQ@mail.gmail.com> <f5dbb11b-c041-cea6-766f-63c223c526f2@minerva.info> <28CB89D3-194A-420F-868A-0AFC169EF7E5@gmail.com> <16391.1568989132@sss.pgh.pa.us>

* 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