pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add TAP tests for role membership in pg_hba.conf
Date: Tue, 11 Oct 2022 04:57:20 +0000
Message-ID: <E1oi7KS-001qcT-0Z@gemulon.postgresql.org> (raw)

Add TAP tests for role membership in pg_hba.conf

This commit expands the coverage of pg_hba.conf with checks specific to
role memberships (one "root" role combined with a member and a
non-member).  Coverage is added for the database keywords "samegroup"
and "samerole", where the specified role has to be be a member of the
role with the same name as the requested database, and '+' on the user
entry, where members are allowed.  These tests are plugged in the
authentication test 001_password.pl as of extra connection attempts
combined with resets of pg_hba.conf, making them rather cheap.

Author: Nathan Bossart
Reviewed-by: Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/20221009211348.GB900071@nathanxps13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8432a815feb8897aabe0c6ed59f32bc47a6b2d50

Modified Files
--------------
src/test/authentication/t/001_password.pl | 126 ++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)



Message-ID: <E1oi7KS-001qcT-0Z@gemulon.postgresql.org>
Permalink:  ../E1oi7KS-001qcT-0Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oi7KS-001qcT-0Z@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Add TAP tests for role membership in pg_hba.conf
  In-Reply-To: <E1oi7KS-001qcT-0Z@gemulon.postgresql.org>
  References: <E1oi7KS-001qcT-0Z@gemulon.postgresql.org>

* 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