Re: pg_ident.conf + regular expressions issue

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alexey Shishkin <alexey(dot)shishkin(dot)01(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_ident.conf + regular expressions issue
Date: 2024-10-21 15:37:26
Message-ID: CAKFQuwax1My2dkS+khckf2qA524NoQhF-kqUZq=EJ6=LEDnZxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 21, 2024 at 4:33 AM Alexey Shishkin <
alexey(dot)shishkin(dot)01(at)gmail(dot)com> wrote:

> I'm not 100% sure it's a bug, but at least it doesn't work as expected.
>
>
You seem to be expecting regular expressions to be able to turn what is a
case-sensitive login matching process into a case-insensitive one. A
regular expression cannot do that - well, not one that uses \1.

The value of \1 is going to be in whatever case the OS user name is. So if
you try and login with a case that doesn't match the case of the role
supplied with -U the login attempt will fail. If they do match, it will
succeed. You have to get rid of the \1 and hardcode "smokeybear" as the PG
user name if you want any random capitalization of smokeybear to be able to
login using that role name (not tested...).

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-10-21 15:49:03 Re: pg_ident.conf + regular expressions issue
Previous Message David G. Johnston 2024-10-21 15:09:02 pg_ident.conf + regular expressions issue