Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfN9R-0001SV-2i for pgsql-admin@arkaria.postgresql.org; Sat, 08 May 2021 13:37:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lfN9Q-0003wy-0M for pgsql-admin@arkaria.postgresql.org; Sat, 08 May 2021 13:37:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfN9P-0003vf-Nb for pgsql-admin@lists.postgresql.org; Sat, 08 May 2021 13:37:47 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfN9N-00016F-Hx for pgsql-admin@lists.postgresql.org; Sat, 08 May 2021 13:37:46 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lfN9K-0007DS-8o; Sat, 08 May 2021 09:37:42 -0400 Date: Sat, 8 May 2021 09:37:42 -0400 From: Bruce Momjian To: Laurenz Albe Cc: Vipin Madhusoodanan , Vijaykumar Jain , pgsql-admin@lists.postgresql.org, Holger Jakobs Subject: Re: Query on User account password change details Message-ID: <20210508133742.GA27049@momjian.us> References: <90B6B3A1-BB95-4D69-99EF-D86C0A859431@jakobs.com> <6bc4ea2d4055691bc3e309aa1488721da9c8c2c0.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6bc4ea2d4055691bc3e309aa1488721da9c8c2c0.camel@cybertec.at> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, May 8, 2021 at 05:44:52AM +0200, Laurenz Albe wrote: > On Fri, 2021-05-07 at 15:47 -0500, Vipin Madhusoodanan wrote: > > Can someone help with suggestions or ideas for a workaround to achieve this? > > > > > > > > Please advise on the possibilities to retrieve “last password change date” for a PostgreSQL user account. > > > > > > We have an audit requirement to identify the password change details for local PostgreSQL user accounts. > > You cannot do that unless you want to modify PostgreSQL. > > For requirements like this, the recommendation is *not* to use passwords > in the database for authentication. Use one of the other authentication > methods that uses an external authority. > > Identity management systems specialize in that kind of thing, and you may > be able to get that information from there. Here is a blog entry about using cerrificate authenticaiton and rotating them: https://momjian.us/main/blogs/pgblog/2020.html#July_17_2020 The certificates must have expiration dates. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.