Re: Proposal: new file format for hba/ident/hosts configuration?

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tristan Partin <tristan(at)partin(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: new file format for hba/ident/hosts configuration?
Date: 2026-07-10 23:07:54
Message-ID: CAN4CZFNVu1-ujfo-_eDJweh8Yg=1cDN0n3uwfFFBXNmbzj6L1w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> "Connections using SCRAM authentication should time out in X seconds
> instead of the default." Or "this group of users should use the
> following list of GUCs." The sample I used in [1] a long time ago was
>
> Everyone has to use LDAP auth
> With this server
> And these TLS settings
>
> Except admins
> who additionally need client certificates
> with this CA root
>
> And Jacob
> who isn't allowed in anymore

The first 2 options would fit easily into my mockups, as if I parse
that correctly, that is tied to our HBA GUC discussion I linked in
earlier messages.

About the second part of it, and the issue with arrays, I agree that I
could imagine a better way of configuring things than mapping current
pg_hba 1:1 to a different file format. But I also didn't want to
propose changing too many things at once. If we already have HBA
information stored in generic structured file format such as
JSON/TOML, then refactoring/extending it seems easier to me than doing
everything in one step.

If we do everything in one step, it will be a really ambitious big
patch, touching many different parts of postgres.

Another option would be first refactoring the authentication logic
internally, leaving the user interface (configuration) limited to
what's currently available with pg_hba, so that the new configuration
file only has to make the new features available instead of
implementing from scratch. But that seems like doing things backwards
to me.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2026-07-10 23:20:54 Re: Reduce cleanup lock contention on standby replay
Previous Message Zsolt Parragi 2026-07-10 22:48:20 Re: Proposal: new file format for hba/ident/hosts configuration?