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 1jW6d0-0006UU-Us for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 23:05:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jW6cz-0003Wc-KR for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 23:05:29 +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 1jW6cz-0003WV-A0 for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 23:05:29 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jW6cw-0004BE-2s for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 23:05:28 +0000 Received: by mail-pf1-x42f.google.com with SMTP id 18so29955pfv.8 for ; Tue, 05 May 2020 16:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:in-reply-to:message-id:date :mime-version; bh=q7rtjOuW9vawXo5zlGhJLsEBoVcZPgH2qrJ26hUYI2c=; b=mhmmtFxXLi37c+o+4sBzLzoyLujkWhxJQHoZx44z69pkrLLNTdCwmZnLjut9SupXAZ rEnhs4wLWiOM16TjecvVBWl9u33v6c1XZKJWtyVRwMQ9/bY2WzDHFIGmtGYoZ8WCqFBa iYxNeRL6sSO2f8RhAP5BJ6ZgSxeSLuXa3dEXbHM+CaKH4KBFklj8A6tsnGShAFdvPJSj hIN5sw/613ncRDd4CMjHB+xuKwM+OTy8r9PmHLbvlvSuc9MfrVEWbGBDadbArF12tpaP p7MXASG0zvQkE6ypCyH8V2fOa8nONy7jcccJVxYQT1MdNrfM49PEzTMZMTUrp9Ln5Z9v 4UPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:message-id:date:mime-version; bh=q7rtjOuW9vawXo5zlGhJLsEBoVcZPgH2qrJ26hUYI2c=; b=XLIQK2JyXfChwzyYylFC9djO9jC/j9ZUoYdDguvl7Lm0sT6OrfVqfqE9F7cNf97QgU dCWb3vJc9rCVMnb8edfM5XJW0fFxYhb+y9rV5Pp2RATEnaOQR/6Mm7I7In8PMT13yaCG zzNahNROw7utZ6QF2DUw/FjderDK87DhFHoMIRlCodgrGNmytg8foIj9fXyfZ3MRbmth gv5yY8f4UoUY9V0DQH4ysueSMnt4k877j5Aj6laShsEWs7a8vD2ALUrflGw7Jzej1z+k g/fo1ghcbHwV6GEUMvFee+5bhMkj+z9qVYp0Y88vZST/zqagqjOnRWtDDdzP5nsgwMVv 9H+Q== X-Gm-Message-State: AGi0PuYrs46wphaRYrKwLNo9xChBdQJa6rQZRpCsnWsSRK4J8p4G7HYp hgWw3dKEMb6M5IcuxAXwszic47uo X-Google-Smtp-Source: APiQypKpoL3o7Whpvdpgflu7jT5rpKNBMEbuQtzzETl0oH5YRu3lJ8uEfA096KYm7ujYFYBUNk2/VA== X-Received: by 2002:a62:3607:: with SMTP id d7mr5282352pfa.245.1588719923651; Tue, 05 May 2020 16:05:23 -0700 (PDT) Received: from tim-desktop (203-173-19-35.dyn.iinet.net.au. [203.173.19.35]) by smtp.gmail.com with ESMTPSA id w75sm57843pfc.156.2020.05.05.16.05.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 16:05:23 -0700 (PDT) References: <98e0c063111b424486fc4735a31e4fc0@lmco.com> User-agent: mu4e 1.4.4; emacs 27.0.91 From: Tim Cross To: pgsql-general@lists.postgresql.org Subject: Re: Lock Postgres account after X number of failed logins? In-reply-to: <98e0c063111b424486fc4735a31e4fc0@lmco.com> Message-ID: <87h7wuj840.fsf@gmail.com> Date: Wed, 06 May 2020 09:05:19 +1000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Wolff, Ken L writes: > As Stephen states, even some basic functionality in this regard would go a long way. Perhaps something could be built into the postgresql-contrib RPM? Right now the only way I see is to write a hook, which involves changing source code, which then puts us into the situation of (1) maintaining our own code tree and (2) figuring out how to produce a new set of RPMs. > > I realize Postgres is a community project and that there are a great number of other valuable feature/enhancement requests in the queue. Just adding my $.02 here. > The problem here is that everyone has valid points. Tom is quite correct that this sort of security policy really needs to be implemented in a single central location, such as LDAP, AD or some other IAM middleware. Having security policies implemented separately in different systems is where failures creep in and why maintenance becomes a problem. Where Tom's solution fails is with smaller companies that cannot afford this level of infrastructure. They can still fall victim to the same level of regulatory bureaucracy, but without the necessary level of technical resources of larger organisations. For these organisations, basic facilities, like the ability to lock an account after a certain number of failed login attempts for a period of time is a very useful feature. My suggestion would be to develop the basic requirements and contribute the result to Postgres. This would give back to the community and eliminate the need to maintain separate code in the long-term. The cost of paying for extra resources to do this development and maintenance is still going to be less than the licensing costs for that commercial competitor. Just requesting the facility is unlikely to result in any acceptable outcome within any reasonable time frame. If your security people are really on top of their game, they will be providing you with a security architecture which fulfils the enterprise architecture requirements and which centralises IAM management. This is really the only truly secure solution which guarantees access is removed from all system in a timely manner, enables effective logging and auditing of access, ensures consistent application of security policy and allows consistent response to security incidents and events. While requiring additional resources to establish, it does tend to result in reduced maintenance costs in the longer term. -- Tim Cross