Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

Поиск
Список
Период
Сортировка
От Jacob Champion
Тема Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf
Дата
Msg-id CAAWbhmhifLJfCGk1zMjWNHg+uGo9SohdSEqsFo0wa2rBNCB85g@mail.gmail.com
обсуждение исходный текст
Ответ на Patch proposal: make use of regular expressions for the username in pg_hba.conf  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Ответы Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Aug 19, 2022 at 1:13 AM Drouvot, Bertrand <bdrouvot@amazon.com> wrote:
> This is why I think username filtering with regular expressions would
> provide its own advantages.
>
> Thoughts? Looking forward to your feedback,

I think your motivation for the feature is solid. It is killing me a
bit that this is making it easier to switch authentication methods
based on the role name, when I suspect what someone might really want
is to switch authentication methods based on the ID the user is trying
to authenticate with. But that's not your fault or problem to fix,
because the startup packet doesn't currently have that information.
(It does make me wonder whether I withdrew my PGAUTHUSER proposal [1]
a month too early. And man, do I wish that pg_ident and pg_hba were
one file.)

I think you're going to have to address backwards compatibility
concerns. Today, I can create a role named "/a", and I can put that
into the HBA without quoting it. I'd be unamused if, after an upgrade,
my rule suddenly matched any role name containing an 'a'.

Speaking of partial matches, should this feature allow them? Maybe
rules should have to match the entire username instead, and sidestep
the inevitable "I forgot to anchor my regex" problems?

Thanks,
--Jacob

[1] https://commitfest.postgresql.org/38/3314/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: pg_upgrade failing for 200+ million Large Objects
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf