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 1jVyYk-0008TM-1B for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 14:28: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 1jVyYi-0005fD-TB for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 14:28:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVyYh-0005f4-R6 for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 14:28:32 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVyYe-0005Wf-B0 for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 14:28:31 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2D3BF5C0089; Tue, 5 May 2020 10:28:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 05 May 2020 10:28:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=j Ntuet22BNKHNYV75TRQA8h3cndhea152MdpTTBv+PI=; b=bwv2j72b//B0JFxcF op/p5oVop7kjYUBrQ1GHrcRX97scOvoL4ERf4E1htp3Yp+JBYmporSJqgPDot//r aencYG4HhfwIuFUXgmqqwnpxa60QUBF0tDxPUjWCtYKGeS0iJWE/8WUK227jdPrR Ni3zKlBTGrP00S85ZPQURNSd/WReqYF+766EnIRXKumAtK+WQcMFUq3NiwE4Vj/W 1TWmQ1xsP/7PQDOgsaMiJIbNsrXCuDbU1SZB42Et/wfg6UYU+TnStpvADNAtK6vQ 2Txh8DEfGeW24kNx48reNilQTidoV0H2M5ByJBTlt0SgAuIh/dT9NwSclOgeysUK ov5eQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=jNtuet22BNKHNYV75TRQA8h3cndhea152MdpTTBv+ PI=; b=UYAoeNBQizn2nE5YvSz4Q+4y8wPajoPK1WSbJQ79WLAH1AEATJbjP+B+/ +X9ek6iPmbs0xMV1/GEOsNHo6Pyq9Axx8pY3KKIiDqdawwayCZXfRj26yNFSrusZ B3QRRRlgEek61ldb6oyKSJ/vOX2fVueDJWRx3lJGppw6dxTauw/d+MnFBY9qk0ch kcNIO3/MabccdiK4kpiS6BRQbVyXuyZU1XzwCWx4rcgkAmKf75qQMB0dZNU2UaNh gPo5LxwYiBXysiohzNh/TN640PeZToUU2sg2jx7lhUBRBgtQMl1mIF0T0ZiYjTQT FqlVo9HiROVlc7Ra6NuOkblRxgwjg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeigdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefheenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeetvdeijeeihf eugeefvdehtdfgueejjeeihfekueeitdefheehgffhtefhgeegjeenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejhedrudejvddrhedrvdefudenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 36772306612F; Tue, 5 May 2020 10:28:19 -0400 (EDT) Subject: Re: Lock Postgres account after X number of failed logins? To: "Wolff, Ken L" , "pgsql-general@lists.postgresql.org" References: <61463e206b7c4c0ca17b03a59e890b78@lmco.com> From: Adrian Klaver Message-ID: <885dab4b-e009-47f3-b572-98005ed5252f@aklaver.com> Date: Tue, 5 May 2020 07:28:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <61463e206b7c4c0ca17b03a59e890b78@lmco.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/5/20 7:13 AM, Wolff, Ken L wrote: > Hi, everyone.  Wondering if there’s a way in PostgreSQL to automatically > lock accounts after a number of failed logins (a security requirement > for my organization).  I’ve been investigating this for a while and the > only reference I’ve found is to write a hook: > https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf , which > is a little more involved than I’d hoped.  Was hoping there was > something native available within PostgreSQL. There is not. You might want to take a look at this thread: https://www.postgresql.org/message-id/OF010D9AFE.7D96A308-ON85257AB6.00746957-85257AB6.0074746B%40us.ibm.com > > Locking accounts after X number of failed logins is an excellent way to > defeat brute force attacks, so I’m just wondering if there’s a way to do > this, other than the aforementioned hook. > > This is my first time using this mail list so apologies in advance if > I’m not following etiquette or doing something incorrectly. > > Thanks in advance. > > Ken W > -- Adrian Klaver adrian.klaver@aklaver.com