pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Alexey Shishkin <alexey.shishkin.01@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: pg_ident.conf + regular expressions issue
Date: Mon, 21 Oct 2024 11:49:03 -0400
Message-ID: <1565682.1729525743@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwY5TtT=ekksb79MgQwp_pU=ytiO+Z3qxessQoRxyT-A5w@mail.gmail.com>
References: <CAL2LCjzN9ZgfLApebD_a=Hi=Q6As8+VwjPS6Fr6LUjj_zDVM+A@mail.gmail.com>
	<1556449.1729522277@sss.pgh.pa.us>
	<CAKFQuwY5TtT=ekksb79MgQwp_pU=ytiO+Z3qxessQoRxyT-A5w@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The OP never said they were using the ident auth-method. The test involves
> peer authentication with a user name mapping file, pg_ident.conf.  Not
> specifically the ident authentication type (which devolves to peer anyway
> if the connection is local).

Ah, right, -ENOCAFFEINE: I'd forgotten that "ident" is automatically
converted to "peer" for a Unix-socket connection.  So that explains
the phrasing of the error message.

Given that, I don't see anything wrong with the behavior of test05.
The OS user name SMOKEYBEAR successfully matches the rule, sure,
and then the \1 says that that user can log in as role SMOKEYBEAR.
But the request is to log in as smokeybear (lower case), so it fails.
The "(?i)" option only makes the regex able to match different casings
of the OS name, it doesn't make matching of the \1 result to the
requested role name be case-insensitive.

test11 seems to be the same thing, only with actual ident auth.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <1565682.1729525743@sss.pgh.pa.us>
Permalink:  ../1565682.1729525743@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1565682.1729525743@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, alexey.shishkin.01@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: pg_ident.conf + regular expressions issue
  In-Reply-To: <1565682.1729525743@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox