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 1pFMzu-0003Iy-Pa for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Jan 2023 22:21:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFMzt-0001Oj-EF for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Jan 2023 22:21:33 +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 1pFMzt-0001MU-5u for pgsql-bugs@lists.postgresql.org; Tue, 10 Jan 2023 22:21:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFMzq-0004x1-Gt for pgsql-bugs@postgresql.org; Tue, 10 Jan 2023 22:21:32 +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 30AMLRpK379035; Tue, 10 Jan 2023 17:21:27 -0500 From: Tom Lane To: Pavel Borisov cc: noloader@gmail.com, Magnus Hagander , PostgreSQL mailing lists Subject: Re: [OT] Microsoft: Kubernetes clusters hacked in malware campaign via PostgreSQL In-reply-to: References: Comments: In-reply-to Pavel Borisov message dated "Tue, 10 Jan 2023 19:20:16 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <379033.1673389287.1@sss.pgh.pa.us> Date: Tue, 10 Jan 2023 17:21:27 -0500 Message-ID: <379034.1673389287@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Borisov writes: > Regarding the fact that using weak passwords isn't limited, I think > anyone can write an extension that limits (or advises against) weak > passwords based on the author's definition of weakness, like checking > by dictionary or so. That's the power of Postgres extensibility. I > don't like an idea that Postgres core should enforce some arbitrary > things like "weakness". It's less easy than it sounds, actually, because current best practice is that the server will never see the cleartext password at all, so you can't apply the usual litany of weak-password checks. About all you can do is apply a brute force rainbow attack, which is far from cheap (although I guess the DBA could run such checks in the background). Even that might be rendered infeasible if the password is stored as a SCRAM verifier; I'm not sure about that. Anyway, this is why contrib/passwordcheck is a development backwater rather than something people actually use. regards, tom lane