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 1jWKEU-0007rO-Az for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 13:37:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWKES-0006Lp-Uh for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 13:37:04 +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 1jWKES-0006J8-Fm for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 13:37:04 +0000 Received: from mailfo01.lmco.com ([192.31.106.12]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWKEP-0002M0-88 for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 13:37:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lmco.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corpgw190711; bh=2h7lQO3hfFCVlcKFoG1xy2T32yNCHZS1huF+6WKwZAQ=; b=nTvlS5LBQWl+E/1QsI7/70M1Hce1fKuOpi1s8WLg3QnSmhbGYGRUBbj9ifPEycFa7k1c 6dCHt+d1PoA4MgkF2/Ztm6qHZxC0wH6dKGPmG1mhNTQekTvHI+Xl9/XFWKA+DDZ7Aw2Q anWttS+GUQRRhLqgMdrjirazBHvnWKI0/2+wclK6ReYIO/BznSTqcBP+qC4R7oau/sg0 g2wkgB/UVNEV0MsvaE2zTR3fqy7gFDzXCoX8M9sas5uvYUq78lFpS32RMcA4G+jfKCjF aZftqIem+08GkhpOPCApFHptESeYikWcQXzpZsYGjkFpier3hIB+DAqy+IDzKevX9MAi 6A== Received: from lmxpdend11w01.us.lmco.com (lmxpdend11w01.ems.lmco.com [172.23.20.72]) by mailfo01.lmco.com (8.16.0.22/8.16.0.22) with ESMTP id 046Dar6X027634; Wed, 6 May 2020 13:36:53 GMT Received: from lmxpdend11w04.us.lmco.com (172.23.20.75) by lmxpdend11w01.us.lmco.com (172.23.20.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1466.3; Wed, 6 May 2020 07:36:52 -0600 Received: from lmxpdend11w04.us.lmco.com ([172.23.20.75]) by lmxpdend11w04.us.lmco.com ([172.23.20.75]) with mapi id 15.01.1466.003; Wed, 6 May 2020 07:36:52 -0600 From: "Wolff, Ken L" To: Stephen Frost , Geoff Winkless CC: Tim Cross , "pgsql-generallists.postgresql.org" Subject: RE: EXTERNAL: Re: Lock Postgres account after X number of failed logins? Thread-Topic: EXTERNAL: Re: Lock Postgres account after X number of failed logins? Thread-Index: AdYjK/cbCPxU27tARVW3xXe+qVZmvAAN/jyAABPXzoAACk1bAAAMiMpA Date: Wed, 6 May 2020 13:36:52 +0000 Message-ID: <72e6959cb2624cafb328ce3100046633@lmco.com> References: <98e0c063111b424486fc4735a31e4fc0@lmco.com> <87h7wuj840.fsf@gmail.com> <20200506132828.GP13712@tamriel.snowman.net> In-Reply-To: <20200506132828.GP13712@tamriel.snowman.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.20.14] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-LM-Outbound: External 172.23.20.72 cntry=** g=8alBwfsVQg1aNJAsHS0OgnHfvgSumK8c q=046Dar6X027634 m=1 X-LM-OSENDER: ken.l.wolff@lmco.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-05-06_07:2020-05-05,2020-05-06 signatures=0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thanks again, everyone, for all the responses and ideas. I'm still getting= caught up on the various responses but with respect to LDAP/AD, I truly wi= sh it were an option. I agree with the various sentiments that AD authenti= cation is more manageable, scalable, secure, etc. However, if there were o= ne set of environs where you'd think we could rely exclusively on AD authen= tication, it would be SQL Server, which by default, relies on Windows & AD = for its authentication. However, for our company, even in our SQL Server e= nvironments, we almost always have to resort to internal (SQL-authenticated= ) accounts at times for various reasons: usually because vendor software d= oesn't support AD authentication, but I've even heard some people mention d= ocker containers can't use it, either. Full disclosure - I haven't run tha= t last one down yet, have only heard it in passing so don't know the detail= s. Christian's idea of fail2ban looks interesting, so I'm going to be investig= ating that. =20 Thanks again, all of you. Really appreciate the feedback and ideas! Ken -----Original Message----- From: Stephen Frost =20 Sent: Wednesday, May 06, 2020 7:28 AM To: Geoff Winkless Cc: Tim Cross ; pgsql-generallists.postgresql.org Subject: EXTERNAL: Re: Lock Postgres account after X number of failed login= s? Greetings, * Geoff Winkless (pgsqladmin@geoff.dj) wrote: > On Wed, 6 May 2020 at 00:05, Tim Cross wrote: > > Where Tom's solution fails is with smaller companies that cannot=20 > > afford this level of infrastructure. >=20 > Is there an objection to openldap? It's lightweight (so could=20 > reasonably be run on the same hardware without significant impact),=20 > BSD-ish and mature, and (with the password policy overlay) should=20 > provide exactly the functionality the OP requested. LDAP-based authentication in PG involves passing the user's password to the= database server in the clear (or tunneled through SSL, but that doesn't he= lp if the DB is compromised), so it's really not a good solution. Thanks, Stephen