Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTijZ-008qCP-BW for pgsql-general@arkaria.postgresql.org; Mon, 23 Jun 2025 15:05:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uTijX-003tOz-E2 for pgsql-general@arkaria.postgresql.org; Mon, 23 Jun 2025 15:05:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTijX-003tOq-30 for pgsql-general@lists.postgresql.org; Mon, 23 Jun 2025 15:05:19 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uTijT-003Z61-0P for pgsql-general@lists.postgresql.org; Mon, 23 Jun 2025 15:05:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 55NF5Be53352512; Mon, 23 Jun 2025 11:05:11 -0400 From: Tom Lane To: raphi cc: pgsql-general@lists.postgresql.org Subject: Re: password rules In-reply-to: <65b65e9f-b4b0-4927-b872-d24dff11449b@crashdump.ch> References: <65b65e9f-b4b0-4927-b872-d24dff11449b@crashdump.ch> Comments: In-reply-to raphi message dated "Mon, 23 Jun 2025 16:35:35 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3352510.1750691111.1@sss.pgh.pa.us> Date: Mon, 23 Jun 2025 11:05:11 -0400 Message-ID: <3352511.1750691111@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk raphi writes: > We can set a password for a role in PG but there is no way to force a > user to change it, prevent reuse or to enforce some complexity on it. As > I understand, that's by choice and when I ask about this, the usual > answer is "that's not the job of a database, use LDAP for it". > ... > Is there any chance PG will provide this natively or are there any > technical limitations I am unaware of? I think we have pretty much decided that that will never be part of core Postgres. If you don't like using an extension for it, you're out of luck. (The core developers have too much to do already, so we are never going to be receptive to arguments like "I don't want to use an extension". But in this case the space of possible requirements is so large that it doesn't make sense to try to build a one-size-fits-all in-core solution.) Extension or not, there are serious objections to many aspects of such a feature, namely that they can't be enforced without requiring clients to send cleartext passwords to the server. That in itself is a security problem. For that matter, the whole business of using passwords rather than other ID technologies (SSL certificates, Kerberos/GSS tickets, etc) is feeling pretty twentieth-century. regards, tom lane