Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jFKnP-0002f5-N0 for pgsql-general@arkaria.postgresql.org; Fri, 20 Mar 2020 16:46:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jFKnO-0002Y7-Fr for pgsql-general@arkaria.postgresql.org; Fri, 20 Mar 2020 16:46:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jFKnO-0002Y0-0J for pgsql-general@lists.postgresql.org; Fri, 20 Mar 2020 16:46:54 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jFKnH-0003EC-9U for pgsql-general@lists.postgresql.org; Fri, 20 Mar 2020 16:46:52 +0000 Received: by mail-ot1-x333.google.com with SMTP id w26so692124otp.8 for ; Fri, 20 Mar 2020 09:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=gCIy8Oxrkz4GRUenfmVyEPBYZASopjr5LCCq2f9BtlA=; b=jVYszdf+UXP57/tFk5/0FM819umC5m8r2kjERYCzfSSA5UjXWCG08xun0TNgFFXSE2 nigKhzkTZow1myNxwilrh9JOrduVHD1bGh4ebf//LrhVDVkPHRXW1Zwbk37hdDLREA9k bT6FdlY3K5NaXNQYFqNMjSFvQ8DGoXrdskKm5pJRe6Uhzk/rBKQOmyDpq5uZSFsOlQEz eDROTIFYik+Iy+YInYXivIDRYTeLK1PEAV+cpgdWWw+pQ15lOBmeF7/vqEjeZM9lldpB ZMZHVgwM/TL0Zd6qMpzVrRmYbufcIPuPzNB49Q/t0VWprmLuA9aguhUJYCjxWzPAN4Cw lsyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=gCIy8Oxrkz4GRUenfmVyEPBYZASopjr5LCCq2f9BtlA=; b=IYoBA9n94xgEqPExMtJGvhFj/rxGK5tvzc5+VSPQkDu48ti4NQYEqnLGM/2p1Efedd rSHvjlLRlDYzXrRw325LOyEkSVVuLv82ODVAR8jNBApQNbkWeNkQEUzSjQfkeS7zwcgE gidIQObBRk2Umf4zZn8NLlutqJsPf6GBYIdTPrD9IDugTs7tNRZ8ZNVCehtwFOOa86Pq ZIFi3GoJcrd+DxSRULQ7Cd3x5nw9V5/BL82gdevsxobths+hfKrnBu6c1I2kCJNF/cw8 BNOJrDeexsYQ7bIq9Z8mZuzuOXB+Fq7es+xNJdP/y7p+N1DW76o2Polb5zmQNDG7xc1n 7MPw== X-Gm-Message-State: ANhLgQ2CZcxCIAyMVz2tZZv/rconsBLGdR1E1D8EtDuQZgIuqtnRZImb bxy5H5Tq9sl69w/iWNeP6AO84XccKE8= X-Google-Smtp-Source: ADFU+vs6Y7S5HvcREaP8s10ukhyiAmAWn6ieAvLQpux5eyOXGhpYSqa1aRDqu2wg56inHD4bi76CBA== X-Received: by 2002:a9d:6443:: with SMTP id m3mr7321360otl.20.1584722806038; Fri, 20 Mar 2020 09:46:46 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id t206sm2153699oib.7.2020.03.20.09.46.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Mar 2020 09:46:45 -0700 (PDT) Subject: Re: Passwordcheck configuration To: pgsql-general@lists.postgresql.org References: <5502.1584659946@sss.pgh.pa.us> From: Ron Message-ID: <2ae09ce4-3a4a-d6fd-18c4-58d3b33ffaeb@gmail.com> Date: Fri, 20 Mar 2020 11:46:44 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <5502.1584659946@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/19/20 6:19 PM, Tom Lane wrote: > Dave Hughes writes: >> I have a requirement to set some password complexity for our database such >> as length of password, upper case, lower case, special characters, >> expiration limit, reuse, etc. > Usually, if you have to do something like that, we recommend setting PG to > use PAM authentication and configuring the restrictions on the PAM side. > The only native capability in that direction is that you can set a > password expiration date. > > Note that it's widely believed that this sort of thing makes you LESS > secure, not more. Correct. https://pages.nist.gov/800-63-3/sp800-63b.html#memsecret NIST Special Publication 800-63B Digital Identity Guidelines 5.1.1.2 Memorized Secret Verifiers "Verifiers SHALL require subscriber-chosen memorized secrets to be at least 8 characters in length." "Verifiers SHOULD NOT impose other composition rules (e.g., requiring mixtures of different character types or prohibiting consecutively repeated characters) for memorized secrets." "Verifiers SHOULD NOT require memorized secrets to be changed arbitrarily (e.g., periodically)." > Quite aside from the well-established fact that forced > password changes are bad from a human-factors standpoint, you can't check > any of those other points unless the password is sent to the server as > cleartext. That creates its own set of vulnerabilities, and I don't > know of anybody who considers it good practice. > >> I saw there was a module you can use for this called passwordcheck. Seems >> easy to install, but I don't see how you can configure it for you specific >> needs? > passwordcheck hasn't got any out-of-the-box configurability. It's mainly > meant as sample code that people could modify if they have a mind to. > > (I seem to recall some recent discussion about deprecating/removing > passwordcheck altogether, but I can't find it right now.) > > regards, tom lane > > -- Angular momentum makes the world go 'round.