Re: Thoughts on pg_hba.conf rejection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Thoughts on pg_hba.conf rejection
Дата
Msg-id 5856.1271709021@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Thoughts on pg_hba.conf rejection  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Thoughts on pg_hba.conf rejection
Re: Thoughts on pg_hba.conf rejection
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> Point of note on giving information to the bad guys: if a
> should-be-rejected connection request attempts to connect to a
> non-existent database, we say "database does not exist".

Yeah.  This was an acknowledged shortcoming of the changes to eliminate
flat-file storage of authentication information --- as of 9.0, it's
necessary to connect to some database in order to proceed with auth
checking.  We discussed it at the time and agreed it was an acceptable
loss.

The only way I can think of to improve that without going back to flat
files would be to develop a way for backends to switch databases after
initial startup, so that auth could be done in a predetermined database
(say, "postgres") before switching to the requested DB.  This has enough
potential gotchas, in regards to catalog caching for instance, that I'm
not eager to go there.

Alternatively we could lie, and produce an auth failure message of some
sort rather than admitting the DB doesn't exist.  But that seems like
it's going to create enough confusion to not be acceptable.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Standalone backends run StartupXLOG in an incorrect environment
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Thoughts on pg_hba.conf rejection