pgsql: Store IdentLine->pg_user as an AuthToken

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Store IdentLine->pg_user as an AuthToken
Date: 2023-01-16 04:59:00
Message-ID: E1pHHaG-003trU-1n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Store IdentLine->pg_user as an AuthToken

While system_user was stored as an AuthToken in IdentLine, pg_user was
stored as a plain string. This commit changes the code as we start
storing pg_user as an AuthToken too.

This does not have any functional changes, as all the operations on
pg_user only use the string from the AuthToken. There is no regexp
compiled and no check based on its quoting, yet. This is in preparation
of more features that intend to extend its capabilities, like support
for regexps and group membership.

Author: Jelte Fennema
Discussion: https://postgr.es/m/CAGECzQRNow4MwkBjgPxywXdJU_K3a9+Pm78JB7De3yQwwkTDew@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/02d3448f4f792964995b8071fa07176606e1af85

Modified Files
--------------
src/backend/libpq/hba.c | 20 +++++++++++---------
src/backend/utils/adt/hbafuncs.c | 2 +-
src/include/libpq/hba.h | 2 +-
3 files changed, 13 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-01-16 07:32:47 pgsql: Refactor code in charge of running shell-based recovery commands
Previous Message Tom Lane 2023-01-15 22:32:14 pgsql: Remove arbitrary FUNC_MAX_ARGS limit in int2vectorin and oidvect