Re: Providing catalog view to pg_hba.conf file - Patch submission

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "Prabakaran, Vaishnavi" <vaishnavip(at)fast(dot)au(dot)fujitsu(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: 2015-01-30 23:16:05
Message-ID: 54CC10B5.7090403@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/29/15 9:13 PM, Amit Kapila wrote:
> > Aside from Tom's concern about sets not being a good way to handle
> this (which I agree with), the idea of "editing" pg_hba.conf via SQL
> raises all the problems that were brought up when ALTER SYSTEM was being
> developed. One of the big problems is a question of how you can safely
> modify a text file that's full of comments and what-not. You'd need to
> address those issues if you hope to modify pg_hba.conf via SQL.
> >
>
> I think the big problem you are mentioning can be resolved in
> a similar way as we have done for ALTER SYSTEM which is
> to have a separate file (.auto.conf) for settings done via
> ALTER SYSTEM command, do you see any major problem
> with that approach.

Yes I do. pg_hba.conf is completely depending on ordering, so there's no
way you can simply toss another file into the mix. It's bad enough that
we do that with postgresql.auto.conf, but at least that's a simple
over-ride. With HBA a single ALTER SYSTEM could activate (or deactivate)
a huge swath of pg_hba.conf. That makes for a system that's fragile, and
since it's security related, dangerous.

I could maybe see an interface where we allowed users to perform
line-level operations on pg_hba.conf via SQL: UPDATE line X, INSERT
BEFORE/AFTER line X, DELETE line X. At least that would preserve the
critical nature of rules ordering.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-01-30 23:25:59 Re: Fwd: [GENERAL] 4B row limit for CLOB tables
Previous Message Peter Geoghegan 2015-01-30 21:58:39 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0