From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: MD5 authentication needs help |
Date: | 2015-03-06 23:17:20 |
Message-ID: | 20150306231720.GC12967@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 6, 2015 at 12:50:14PM -0800, Josh Berkus wrote:
> On 03/06/2015 08:19 AM, Stephen Frost wrote:
> > * Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> >> Stephen Frost wrote:
> >> Sure. I was thinking we would have some mechanism to authenticate the
> >> connection as coming from a pooler that has been previously authorized;
> >> something simple as a new pg_hba.conf entry type for "poolers" that are
> >> only authorized to connect to such-and-such databases, perhaps limit to
> >> such-and-such users, etc.
> >
> > Well, server-side, we already have that- have pgbouncer run on the
> > database server (something which I'm typically in favor of anyway) and
> > use 'peer'. If it supported TLS then it could use certificates instead.
> > The question is what to do after the pooler has connected and that's
> > actually a generic issue which goes beyond poolers and into
> > applications, basically, "how can I re-authenticate this connection
> > using a different role." We have SET ROLE, but that gives a lot of
> > power to the role the pooler logs in as. It'd definitely be neat to
> > provide a way to use SCRAM or similar to do that re-authentication after
> > the initial connection.
>
> Using pgbouncer on the DB server is common, but less common that using
> it on an intermediate server or even the app server itself. So anything
> we create needs to be implementable with all three configurations in
> some way.
I think the best solution to this would be to introduce a per-cluster
salt that is used for every password hash. That way, you could not
replay a pg_authid hash on another server _unless_ you had manually
assigned the same cluster salt to both servers, or connection pooler.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-03-06 23:54:56 | Re: Clamping reulst row number of joins. |
Previous Message | Bruce Momjian | 2015-03-06 23:04:42 | Re: MD5 authentication needs help |