Re: Record last password change - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Record last password change
Date
Msg-id 198b1eed-312e-1b3b-dacb-a8ab90abe90d@anastigmatix.net
Whole thread Raw
In response to Re: Record last password change  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Record last password change
List pgsql-hackers
On 12/11/18 9:56 AM, Tom Lane wrote:
> I've heard that if you want to implement a password aging policy, PAM
> authentication can manage that for you; but I don't know the details.

Interesting idea ... could use pam-pgsql[1] and PAM as the
authentication method. Might result in another connection (from PAM)
to authenticate every connection, though. I suppose the module could
use a daemon keeping one connection open for auth queries, but the
README doesn't *say* it does. Could set up a pooler just for the auth
module to connect through, I guess.

It allows you to configure arbitrary auth_query, acct_query, pwd_query,
etc., so you could conceivably join pg_authid with some other table
where you'd keep expiration info.

Looks like our PAM authentication might not support some PAM
capabilities like conducting additional message exchanges (for
example, to prompt for a new password on the spot if the old
one has expired).

It might be possible to shoehorn that capability into the existing
fe-be protocol by calling it a custom SASL method, something analogous
to ssh's "keyboard-interactive"[2].

-Chap


[1] https://github.com/pam-pgsql/pam-pgsql
[2] https://tools.ietf.org/html/rfc4256


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why not represent "never vacuumed" accurately wrt pg_class.relpages?
Next
From: Andres Freund
Date:
Subject: Re: Why not represent "never vacuumed" accurately wrtpg_class.relpages?