Re: Proposal: BSD Authentication support

Lists: pgsql-hackers
From: Marisa Emerson <mje(at)insec(dot)sh>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Proposal: BSD Authentication support
Date: 2016-01-07 13:03:46
Message-ID: 1521c2f9465.e357a543197915.6912077634413325318@insec.sh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I would like to add support for BSD authentication, used on OpenBSD. BSD authentication works similarly to PAM and allows authentication using local accounts.

We use OpenBSD on our Postgres servers at work.

I have attached an initial implementation of the proposal.

Cheers,
Marisa Emerson

Attachment Content-Type Size
bsd_auth.patch application/octet-stream 7.0 KB

From: Greg Stark <stark(at)mit(dot)edu>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-07 13:26:05
Message-ID: CAM-w4HPFo_Zvyxcjv6-Lkxd0XAoLsFnwgzw4vinGuLj8OX_aHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

This sounds like a sensible thing to me. I'm actually surprised, it
sounds like something we would have already seen. Do some people just
use PAM on OpenBSD? Are both supported?

You should add the patch to https://commitfest.postgresql.org to
ensure it doesn't slip through the cracks. It's too late for January
though there's nothing stopping people from commenting on or even
committing patches outside the commitfest.


From: Marisa Emerson <mje(at)insec(dot)sh>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-08 02:40:11
Message-ID: 568F218B.3050800@insec.sh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

There's a port for PAM, but we would prefer to use BSD Auth as its quite
a lot cleaner and is standard on OpenBSD.

I've attached an updated patch that includes documentation. It has been
tested against OpenBSD 5.8. I'll add this thread to the commitfest.

On 07/01/16 23:26, Greg Stark wrote:
> This sounds like a sensible thing to me. I'm actually surprised, it
> sounds like something we would have already seen. Do some people just
> use PAM on OpenBSD? Are both supported?
>
> You should add the patch to https://commitfest.postgresql.org to
> ensure it doesn't slip through the cracks. It's too late for January
> though there's nothing stopping people from commenting on or even
> committing patches outside the commitfest.
>

Attachment Content-Type Size
bsd_auth.patch text/x-patch 8.8 KB

From: Marisa Emerson <mje(at)insec(dot)sh>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-12 07:27:41
Message-ID: 5694AAED.6030901@insec.sh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I've attached the latest version of this patch. I've fixed up an issue
with the configuration scripts that I missed.

On 08/01/16 12:40, Marisa Emerson wrote:
> There's a port for PAM, but we would prefer to use BSD Auth as its quite
> a lot cleaner and is standard on OpenBSD.
>
> I've attached an updated patch that includes documentation. It has been
> tested against OpenBSD 5.8. I'll add this thread to the commitfest.
>
> On 07/01/16 23:26, Greg Stark wrote:
>> This sounds like a sensible thing to me. I'm actually surprised, it
>> sounds like something we would have already seen. Do some people just
>> use PAM on OpenBSD? Are both supported?
>>
>> You should add the patch to https://commitfest.postgresql.org to
>> ensure it doesn't slip through the cracks. It's too late for January
>> though there's nothing stopping people from commenting on or even
>> committing patches outside the commitfest.
>>

Attachment Content-Type Size
bsd_auth.patch text/x-patch 8.6 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-15 04:22:28
Message-ID: CA+TgmobOQke8TQPSpu54Gdsms36_=_vht3qwfeB0jmJ8TZApYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 12, 2016 at 2:27 AM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
> I've attached the latest version of this patch. I've fixed up an issue with
> the configuration scripts that I missed.

Looks reasonable on a quick read-through. Can anyone with access to a
BSD system review and test?

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


From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-15 04:59:40
Message-ID: 56987CBC.2060105@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Forgive my late comment ... I haven't used the PAM support in postgresql
either, or I'd know. PAM (I know for sure), and I suppose similarly BSD
Authentication, models a generalized auth interaction where a given
authentication module can send a number of arbitrary prompts back to the
client (via callbacks so different protocols and UIs can be used), and
demand a number of arbitrary responses, so that a variety of authentication
schemes can easily be supported.

Is the PostgreSQL support (for either PAM or BSD Authentication) able to
handle that in its designed generality, or only for the case (number of
requested items = 1, item 1 = a password)?

Could the general form be handled with the existing fe/be protocol,
or would the protocol have to grow?

-Chap


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-01-15 15:17:02
Message-ID: CA+TgmoYZ4yL2j+NyG37ZZSs6mhCq1G-pK_f_pZ2ogq9dk7DjKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jan 14, 2016 at 11:59 PM, Chapman Flack <chap(at)anastigmatix(dot)net> wrote:
> Forgive my late comment ... I haven't used the PAM support in postgresql
> either, or I'd know. PAM (I know for sure), and I suppose similarly BSD
> Authentication, models a generalized auth interaction where a given
> authentication module can send a number of arbitrary prompts back to the
> client (via callbacks so different protocols and UIs can be used), and
> demand a number of arbitrary responses, so that a variety of authentication
> schemes can easily be supported.
>
> Is the PostgreSQL support (for either PAM or BSD Authentication) able to
> handle that in its designed generality, or only for the case (number of
> requested items = 1, item 1 = a password)?
>
> Could the general form be handled with the existing fe/be protocol,
> or would the protocol have to grow?

We support something like this for GSS, but not for other
authentication methods. See:

http://www.postgresql.org/docs/current/static/protocol-flow.html

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


From: David Steele <david(at)pgmasters(dot)net>
To:
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-11 16:14:05
Message-ID: 56E2EECD.8050600@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1/14/16 11:22 PM, Robert Haas wrote:
> On Tue, Jan 12, 2016 at 2:27 AM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>> I've attached the latest version of this patch. I've fixed up an issue with
>> the configuration scripts that I missed.
> Looks reasonable on a quick read-through. Can anyone with access to a
> BSD system review and test?

Is anyone with access to/experience with BSD able to review and test
this patch? Seems like it would make a great addition to 9.6.

Thanks,

--
-David
david(at)pgmasters(dot)net


From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-11 21:38:08
Message-ID: CAEepm=0t3JDQE1qdagx4Mg8LB255f378=Xqne+yHczrvbx_xRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Mar 12, 2016 at 5:14 AM, David Steele <david(at)pgmasters(dot)net> wrote:
> On 1/14/16 11:22 PM, Robert Haas wrote:
>> On Tue, Jan 12, 2016 at 2:27 AM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>>> I've attached the latest version of this patch. I've fixed up an issue with
>>> the configuration scripts that I missed.
>> Looks reasonable on a quick read-through. Can anyone with access to a
>> BSD system review and test?
>
> Is anyone with access to/experience with BSD able to review and test
> this patch? Seems like it would make a great addition to 9.6.

It looks like this needs review from an OpenBSD user specifically.
FreeBSD and NetBSD use PAM instead of BSD auth.

--
Thomas Munro
http://www.enterprisedb.com


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-12 02:49:24
Message-ID: 56E383B4.80509@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1/7/16 9:40 PM, Marisa Emerson wrote:
> There's a port for PAM, but we would prefer to use BSD Auth as its quite
> a lot cleaner and is standard on OpenBSD.
>
> I've attached an updated patch that includes documentation. It has been
> tested against OpenBSD 5.8. I'll add this thread to the commitfest.

(Not a BSD user, just reviewing the code.)

configure.in has "build with BSD support", which should be "build with
BSD Authentication support".

There should be some documentation of the new configure option in
installation.sgml.

The documentation in client-auth.sgml speaks of a postgresql user and an
auth group. Maybe that's clear to users of BSD, but I don't know
whether these are OS entities or groups that I need to create or what.

The auth_userokay() call hardcodes a "type" of "pg-auth". That seems
important and should probably be documented. Extrapolating from PAM, I
think that should perhaps be an option in pg_hba.conf.


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-12 02:50:34
Message-ID: 56E383FA.3090303@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 3/11/16 4:38 PM, Thomas Munro wrote:
> It looks like this needs review from an OpenBSD user specifically.
> FreeBSD and NetBSD use PAM instead of BSD auth.

FreeBSD has man pages for this stuff, so maybe they also have it now.


From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-15 06:51:38
Message-ID: CAEepm=2rKMsGsoXnnRTDerdJ_ePqO_DbVN5ePzCk5HhJtTqNcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Mar 12, 2016 at 5:14 AM, David Steele <david(at)pgmasters(dot)net> wrote:
> On 1/14/16 11:22 PM, Robert Haas wrote:
>> On Tue, Jan 12, 2016 at 2:27 AM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>>> I've attached the latest version of this patch. I've fixed up an issue with
>>> the configuration scripts that I missed.
>> Looks reasonable on a quick read-through. Can anyone with access to a
>> BSD system review and test?
>
> Is anyone with access to/experience with BSD able to review and test
> this patch? Seems like it would make a great addition to 9.6.

(Disclaimer: I am not a regular OpenBSD user or a security expert.)
I tried this out on OpenBSD 5.8 and it works as described, using
default "passwd" style authentication.

+ <note>
+ <para>
+ To use BSD Authentication, the postgresql user must first be added
+ to the <literal>auth</literal> group.
+ </para>
+ </note>

Our usual wording is "the PostgreSQL user account". Perhaps we should
be more explicit about the fact that membership of this Unix group is
needed on *OpenBSD*, since other current or future BSD forks could
vary. I see that the specific reason this is needed on this OpenBSD
5.8 box is so that it can fork/exec the setuid login_XXX binaries that
live under /usr/libexec/auth.

auth_userokay is called with a type of "pg-auth". I noticed from
looking at man page and source of some other applications that the
convention is usually a hardcoded string like "auth-myserver",
"auth-sockd", "auth-ssh", "auth-doas", "auth-popa3d" etc. So perhaps
we should have "auth-postgresql" (or "auth-postgres" or "auth-pgsql")
here? And as Peter E already said, that string should probably be
documented: it looks a bit like it is useful for allowing the
available authentication styles to be restricted or defaulted
specifically for PostgreSQL in login.conf based on that string.
(Though when I tried to set that up, it seemed to ignore my
possibly-incorrectly-specified rule asking it to use "reject" so I may
have misunderstood.)

The style argument is hard coded as NULL, as I see is the case in some
other applications. From the man page: "If style is not NULL, it
specifies the desired style of authentication to be used. If it is
NULL then the default style for the user is used. In this case, name
may include the desired style by appending it to the user's name with
a single colon (‘:’) as a separator." I wonder if such
user-controllable styles are OK (though I guess would require username
mapping to strip them off if we do want that as a feature). I wonder
if it should be possible to provide the style argument that we pass to
auth_userokay explicitly in pg_hba.conf, so that the DBA could
explicitly say BSD auth with style=radius.

I also tested on a system with no BSD auth support and configure
behaved sensibly with and without the new option ('error: header file
<bsd_auth.h> is required for BSD Authentication support'). I tried
configuring BSD auth in pg_hba.conf on a system built without the new
feature and it behaved sensibly ('invalid authentication method "bsd":
not supported by this build').

--
Thomas Munro
http://www.enterprisedb.com


From: Marisa Emerson <mje(at)insec(dot)sh>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: "David Steele" <david(at)pgmasters(dot)net>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-17 13:58:53
Message-ID: 15384df31d8.e1eb1f4a78511.6788448249244038941@insec.sh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>Our usual wording is "the PostgreSQL user account". Perhaps we should
>be more explicit about the fact that membership of this Unix group is
>needed on *OpenBSD*, since other current or future BSD forks could
>vary. I see that the specific reason this is needed on this OpenBSD
>5.8 box is so that it can fork/exec the setuid login_XXX binaries that
>live under /usr/libexec/auth.

The BSD Authentication framework currently only exists on OpenBSD. I've added some explicit documentation that this mechanism is currently only supported on OpenBSD and I've tried to be a bit more explicit about the auth group as suggested by Peter.

>auth_userokay is called with a type of "pg-auth". I noticed from
>looking at man page and source of some other applications that the
>convention is usually a hardcoded string like "auth-myserver",
>"auth-sockd", "auth-ssh", "auth-doas", "auth-popa3d" etc. So perhaps
>we should have "auth-postgresql" (or "auth-postgres" or "auth-pgsql")
>here? And as Peter E already said, that string should probably be
>documented: it looks a bit like it is useful for allowing the
>available authentication styles to be restricted or defaulted
>specifically for PostgreSQL in login.conf based on that string.
>(Though when I tried to set that up, it seemed to ignore my
>possibly-incorrectly-specified rule asking it to use "reject" so I may
>have misunderstood.)

This is correct, although so far I've only tested using the default login class. The attached patch includes some more explicit documentation about this string.

>The style argument is hard coded as NULL, as I see is the case in some
>other applications. From the man page: "If style is not NULL, it
>specifies the desired style of authentication to be used. If it is
>NULL then the default style for the user is used. In this case, name
>may include the desired style by appending it to the user's name with
>a single colon (‘:’) as a separator." I wonder if such
>user-controllable styles are OK (though I guess would require username
>mapping to strip them off if we do want that as a feature). I wonder
>if it should be possible to provide the style argument that we pass to
>auth_userokay explicitly in pg_hba.conf, so that the DBA could
>explicitly say BSD auth with style=radius.

I've so far only tested passwd authentication. I'd be interested to test some of the other authentication styles, I think this would be a useful feature.

Attachment Content-Type Size
bsd_auth.patch application/octet-stream 10.1 KB

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-17 17:57:27
Message-ID: CAEepm=3gDiZEqATKt5QbAob-EW7gGN4cxLvP0tmu60utmjCPdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Mar 18, 2016 at 2:58 AM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>
>>Our usual wording is "the PostgreSQL user account". Perhaps we should
>>be more explicit about the fact that membership of this Unix group is
>>needed on *OpenBSD*, since other current or future BSD forks could
>>vary. I see that the specific reason this is needed on this OpenBSD
>>5.8 box is so that it can fork/exec the setuid login_XXX binaries that
>>live under /usr/libexec/auth.
>
> The BSD Authentication framework currently only exists on OpenBSD. I've added some explicit documentation that this mechanism is currently only supported on OpenBSD and I've tried to be a bit more explicit about the auth group as suggested by Peter.
>
>>auth_userokay is called with a type of "pg-auth". I noticed from
>>looking at man page and source of some other applications that the
>>convention is usually a hardcoded string like "auth-myserver",
>>"auth-sockd", "auth-ssh", "auth-doas", "auth-popa3d" etc. So perhaps
>>we should have "auth-postgresql" (or "auth-postgres" or "auth-pgsql")
>>here? And as Peter E already said, that string should probably be
>>documented: it looks a bit like it is useful for allowing the
>>available authentication styles to be restricted or defaulted
>>specifically for PostgreSQL in login.conf based on that string.
>>(Though when I tried to set that up, it seemed to ignore my
>>possibly-incorrectly-specified rule asking it to use "reject" so I may
>>have misunderstood.)
>
> This is correct, although so far I've only tested using the default login class. The attached patch includes some more explicit documentation about this string.

You used one name in the docs and another in the code:

+ BSD Authentication on PostgreSQL uses the <literal>auth-postgres</literal>
+ login type and authenticates with the <literal>postgres</literal> login

+ retval = auth_userokay(user, NULL, "auth-postgresql", passwd);

>>The style argument is hard coded as NULL, as I see is the case in some
>>other applications. From the man page: "If style is not NULL, it
>>specifies the desired style of authentication to be used. If it is
>>NULL then the default style for the user is used. In this case, name
>>may include the desired style by appending it to the user's name with
>>a single colon (‘:’) as a separator." I wonder if such
>>user-controllable styles are OK (though I guess would require username
>>mapping to strip them off if we do want that as a feature). I wonder
>>if it should be possible to provide the style argument that we pass to
>>auth_userokay explicitly in pg_hba.conf, so that the DBA could
>>explicitly say BSD auth with style=radius.
>
> I've so far only tested passwd authentication. I'd be interested to test some of the other authentication styles, I think this would be a useful feature.

Agreed.

It looks like this is still very useful with the default, and maybe
adding support for specifying the auth style in pg_hba.conf could be a
follow-up patch if anyone is interested in writing that.

Except for the string mismatch above I would personally say this is
ready for a committer to look at. Since Stas Kelvich also signed up
as a reviewer I'll give it a few days to see if he has feedback before
updating the commitfest status.

--
Thomas Munro
http://www.enterprisedb.com


From: Marisa Emerson <mje(at)insec(dot)sh>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-17 23:49:59
Message-ID: 56EB42A7.5010604@insec.sh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 18/03/16 03:57, Thomas Munro wrote:
> You used one name in the docs and another in the code:
>
> + BSD Authentication on PostgreSQL uses the <literal>auth-postgres</literal>
> + login type and authenticates with the <literal>postgres</literal> login
>
> + retval = auth_userokay(user, NULL, "auth-postgresql", passwd);

Woops, fix attached.

Attachment Content-Type Size
bsd_auth.patch text/x-patch 10.1 KB

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pea(at)openbsd(dot)org
Subject: Re: Proposal: BSD Authentication support
Date: 2016-03-18 05:30:35
Message-ID: CAEepm=18Hcic2oByLF8iZwgO_1R8M_53DkBt=JNTa4Sew=Ggvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Mar 18, 2016 at 12:49 PM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
> On 18/03/16 03:57, Thomas Munro wrote:
>>
>> You used one name in the docs and another in the code:
>>
>> + BSD Authentication on PostgreSQL uses the
>> <literal>auth-postgres</literal>
>> + login type and authenticates with the <literal>postgres</literal>
>> login
>>
>> + retval = auth_userokay(user, NULL, "auth-postgresql", passwd);
>
>
> Woops, fix attached.

Thanks!

I'm CCng Pierre-Emmanuel André, maintainer of the OpenBSD postgresql
port/package, just in case he has any feedback.

Pierre-Emmanuel, here's the full thread in case you missed it:
http://www.postgresql.org/message-id/1521c2f9465.e357a543197915.6912077634413325318@insec.sh

--
Thomas Munro
http://www.enterprisedb.com


From: Pierre-Emmanuel André <pea(at)openbsd(dot)org>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Marisa Emerson <mje(at)insec(dot)sh>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-04-08 10:48:16
Message-ID: 20160408104816.GB20623@coredump.pacwan.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Mar 18, 2016 at 06:30:35PM +1300, Thomas Munro wrote:
> On Fri, Mar 18, 2016 at 12:49 PM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
> > On 18/03/16 03:57, Thomas Munro wrote:
> >>
> >> You used one name in the docs and another in the code:
> >>
> >> + BSD Authentication on PostgreSQL uses the
> >> <literal>auth-postgres</literal>
> >> + login type and authenticates with the <literal>postgres</literal>
> >> login
> >>
> >> + retval = auth_userokay(user, NULL, "auth-postgresql", passwd);
> >
> >
> > Woops, fix attached.
>
> Thanks!
>
> I'm CCng Pierre-Emmanuel André, maintainer of the OpenBSD postgresql
> port/package, just in case he has any feedback.
>
> Pierre-Emmanuel, here's the full thread in case you missed it:
> http://www.postgresql.org/message-id/1521c2f9465.e357a543197915.6912077634413325318@insec.sh
>

Hi,

Sorry for the late answer.
I've tested the patch on @amd64 with the latest PostgreSQL 9.6devel. I can't judge the diff
itself (it looks good but i'm not a PostgreSQL developper) but everything works fine.
It would be a nice feature to have on OpenBSD.

Regards,


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pierre-Emmanuel André <pea(at)openbsd(dot)org>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-04-08 15:20:11
Message-ID: CA+TgmoZteKUFCE=BZdc-yRzSHYg5gFz-UURng3kBqXzj9d0SMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Apr 8, 2016 at 6:48 AM, Pierre-Emmanuel André <pea(at)openbsd(dot)org> wrote:
> On Fri, Mar 18, 2016 at 06:30:35PM +1300, Thomas Munro wrote:
>> On Fri, Mar 18, 2016 at 12:49 PM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>> > On 18/03/16 03:57, Thomas Munro wrote:
>> >>
>> >> You used one name in the docs and another in the code:
>> >>
>> >> + BSD Authentication on PostgreSQL uses the
>> >> <literal>auth-postgres</literal>
>> >> + login type and authenticates with the <literal>postgres</literal>
>> >> login
>> >>
>> >> + retval = auth_userokay(user, NULL, "auth-postgresql", passwd);
>> >
>> >
>> > Woops, fix attached.
>>
>> Thanks!
>>
>> I'm CCng Pierre-Emmanuel André, maintainer of the OpenBSD postgresql
>> port/package, just in case he has any feedback.
>>
>> Pierre-Emmanuel, here's the full thread in case you missed it:
>> http://www.postgresql.org/message-id/1521c2f9465.e357a543197915.6912077634413325318@insec.sh
>
> Sorry for the late answer.
> I've tested the patch on @amd64 with the latest PostgreSQL 9.6devel. I can't judge the diff
> itself (it looks good but i'm not a PostgreSQL developper) but everything works fine.
> It would be a nice feature to have on OpenBSD.

Opinion poll:

Should we commit this patch?

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


From: David Steele <david(at)pgmasters(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Pierre-Emmanuel André <pea(at)openbsd(dot)org>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-04-08 15:53:59
Message-ID: 5707D417.8010303@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 4/8/16 11:20 AM, Robert Haas wrote:
> On Fri, Apr 8, 2016 at 6:48 AM, Pierre-Emmanuel André <pea(at)openbsd(dot)org> wrote:
>> On Fri, Mar 18, 2016 at 06:30:35PM +1300, Thomas Munro wrote:
>>> On Fri, Mar 18, 2016 at 12:49 PM, Marisa Emerson <mje(at)insec(dot)sh> wrote:
>>>> On 18/03/16 03:57, Thomas Munro wrote:
>>>>>
>>>>> You used one name in the docs and another in the code:
>>>>>
>>>>> + BSD Authentication on PostgreSQL uses the
>>>>> <literal>auth-postgres</literal>
>>>>> + login type and authenticates with the <literal>postgres</literal>
>>>>> login
>>>>>
>>>>> + retval = auth_userokay(user, NULL, "auth-postgresql", passwd);
>>>>
>>>>
>>>> Woops, fix attached.
>>>
>>> Thanks!
>>>
>>> I'm CCng Pierre-Emmanuel André, maintainer of the OpenBSD postgresql
>>> port/package, just in case he has any feedback.
>>>
>>> Pierre-Emmanuel, here's the full thread in case you missed it:
>>> http://www.postgresql.org/message-id/1521c2f9465.e357a543197915.6912077634413325318@insec.sh
>>
>> Sorry for the late answer.
>> I've tested the patch on @amd64 with the latest PostgreSQL 9.6devel. I can't judge the diff
>> itself (it looks good but i'm not a PostgreSQL developper) but everything works fine.
>> It would be a nice feature to have on OpenBSD.
>
> Opinion poll:
>
> Should we commit this patch?

To summarize:

Robert Haas and Peter Eisentraut have done code-only reviews. Thomas
Munro has reviewed and tested with a caveat that he is no BSD expert.
Pierre-Emmanuel tested but did not do a code review review due to his
unfamiliarity with the Postgres code-base.

The patch does not seem invasive or likely to cause problems on non-BSD
systems. From my perspective this has gotten about as much review as it
can, so +1 from me at least.

--
-David
david(at)pgmasters(dot)net


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pierre-Emmanuel André <pea(at)openbsd(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Marisa Emerson <mje(at)insec(dot)sh>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-04-08 16:36:10
Message-ID: 10126.1460133370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

David Steele <david(at)pgmasters(dot)net> writes:
> On 4/8/16 11:20 AM, Robert Haas wrote:
>> Should we commit this patch?

> To summarize:

> Robert Haas and Peter Eisentraut have done code-only reviews. Thomas
> Munro has reviewed and tested with a caveat that he is no BSD expert.
> Pierre-Emmanuel tested but did not do a code review review due to his
> unfamiliarity with the Postgres code-base.

> The patch does not seem invasive or likely to cause problems on non-BSD
> systems. From my perspective this has gotten about as much review as it
> can, so +1 from me at least.

Given our lack of BSD developers, there's probably not much more we can
do, but one more set of eyeballs on the patch wouldn't hurt. I'll take
it, unless somebody else wants to.

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marisa Emerson <mje(at)insec(dot)sh>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: BSD Authentication support
Date: 2016-04-08 17:53:01
Message-ID: 28671.1460137981@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Marisa Emerson <mje(at)insec(dot)sh> writes:
> Woops, fix attached.

Pushed with minor adjustments.

regards, tom lane