public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tomas Vondra <[email protected]>
To: Emanuele Musella <[email protected]>
To: [email protected]
Subject: Re: Parametrization minimum password lenght
Date: Tue, 12 Nov 2024 14:48:28 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+ugDNyYtHOtWCqVD3YkSVYDWD_1fO8Jm_ahsDGA5dXhbDPwrQ@mail.gmail.com>
References: <CA+ugDNyYtHOtWCqVD3YkSVYDWD_1fO8Jm_ahsDGA5dXhbDPwrQ@mail.gmail.com>
Hi,
On 11/12/24 14:41, Emanuele Musella wrote:
> The goal about this patch is to parameterize the minimum password lenght
> on users database and apply it on the general code.
> The patch is applicable to the master branch.
> We already tested it: it build and works as expected and nothing is
> found broken,
>
> Settings in postgresql.conf parametrization like following:
>
> shared_preload_libraries = 'passwordcheck'
> min_password_lenght = 12
>
> example:
>
> postgres=# create user prova with password 'eftghaki';
> ERROR: password is too short
> postgres=# create user prova with password 'eftghaki1234';
> CREATE ROLE
>
>
> In attach the file patch.
>
Thanks for the patch, seems like a useful feature. Please add the patch
to the next commitfest (2025-01) at https://commitfest.postgresql.org/
A couple comments:
1) The proper spelling is "length" (not "lenght").
2) The GUC should be added to the "passwordcheck" extension, not to the
core GUC file. See how auto_explain defines options in _PG_init() using
DefineCustomIntVariable.
3) It might be a good idea to add a test to passwordcheck.sql.
regards
--
Tomas Vondra
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Parametrization minimum password lenght
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox