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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Providing catalog view to pg_hba.conf file - Patch submission
Дата
Msg-id CAA4eK1Kq_K8tBB9QbyRHN5bVNLL6Ug9uOsXTQOe-pkdPzqLpFQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Providing catalog view to pg_hba.conf file - Patch submission  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Jan 30, 2015 at 10:58 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Thu, Jan 29, 2015 at 10:13 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > 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.  The contents of postgresql.conf are only mildly order-dependent.
> If you put the same setting in more than once, it matters which one is
> last.  Apart from that, though, it doesn't really matter:
> wal_keep_segments=10 means the same thing if it occurs before
> max_connections=401 that it means after that.  The same is not true of
> pg_hba.conf, where the order matters a lot.  

Do you mean to say that as authentication system uses just the
first record that matches to perform authentication, it could lead
to problems if an order is not maintained?  Won't the same
set of problems can occur if user tries to that manually and do
it without proper care of such rules.  Now the problem with
command is that user can't see the order in which entries are
being made, but it seems to me that we can provide a view or some
way to user so that the order of entries is visible and the same is
allowed to be manipulated via command.
 
> This makes merging two
> files together much less feasible, and much more confusing.
>
> You are also a lot more likely to lock yourself out of the database by
> adjusting pg_hba.conf.  

I think that could be even possible via Alter User .. password, if the
password is changed then also kind of user can be locked out of
database, basically it is also part of authentication mechanism.

> Even if I had a feature that would let me
> modify pg_hba.conf remotely, I'm not sure I'd be brave enough to use
> it.
>

Okay, but how about via some server side utility or some other way with
which users don't need to manually edit the file?

It seems to be that some of the other databases like Oracle also provide
a way for users to operate of similar files via commands, although in a
different way [1].

> Overall, this seems to me like a can of worms better left unopened.

Sure, I can understand the dangers you want to highlight, however
OTOH it seems to me that providing some way to users with which
they can change things without manually editing file is a good move.




With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Sawada Masahiko
Дата:
Сообщение: Re: Proposal: knowing detail of config files via SQL
Следующее
От: Sawada Masahiko
Дата:
Сообщение: Re: Proposal: knowing detail of config files via SQL