Re: passwordcheck: Make the user name check case-insensitive

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Anthony Sotolongo <asotolongo(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: passwordcheck: Make the user name check case-insensitive
Date: 2026-11-26 16:12:32
Message-ID: 9d334a9a7b5b962f94384cfa66fab8021f253873.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2026-11-25 at 20:30 +0100, Daniel Gustafsson wrote:
> > On 25 Nov 2026, at 20:24, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > So yeah, I'd really prefer to deprecate it. The functionality
> > could move into psql's \password command, perhaps.
>
> It probably won't satisfy most of the users of passwordcheck, but I still like
> the idea.
>
> If we deprecate and remove passwordcheck someone can, and most likely will,
> pick it up and make a third party extension out of it, which is perfectly fine.

We have been there before; see the lengthy thread that led to the addition
of the contrib [1].

The idea to check passwords on the client was deemed useless [2]:

> Surely you can see that it is *absolutely pointless* to put an
> password complexity checking in the client? All a user would need to
> do is grab a copy of psql to bypass it. If they can't do that, there's
> probably a scripting language or 12 that would make it similarly easy.

The contrib was accepted a) as a code sample and b) to satisfy a checkbox
item [3]:

> Okay, fine, so we're not looking for actual high-grade security,
> we're looking to tick off a checkbox in the minds of not terribly
> well-informed people. Then the plugin mechanism as currently proposed
> will do the job just fine.

Perhaps things have changed, and people today care less about checkbox
items to pass the requirements for a certification. Not sure.

My personal opinion is that the warnings attached to passwordcheck are
clear enough for anybody who really cares. I don't think that the change
proposed in this thread will add any value, but I wouldn't take that as
a reason to remove the module. Mundus vult decipi, and I don't think
removing passwordcheck will increase security anywhere.

Yours,
Laurenz Albe

[1]: https://postgr.es/m/flat/D960CB61B694CF459DCFB4B0128514C203937F49%40exadv11.host.magwien.gv.at
[2]: https://postgr.es/m/937d27e10910140844v4bc96cd8r33cddcd3a12bf795%40mail.gmail.com
[3]: https://postgr.es/m/1649.1255550447%40sss.pgh.pa.us

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-11-26 16:24:42 Re: Interrupts vs signals
Previous Message Ayoub Kazar 2026-11-26 16:04:37 Re: Simplify the uniqueness proof for self-join elimination