Re: [SQL] connecting with password

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: [SQL] connecting with password
Дата
Msg-id m0zHJcB-00006FC@druid.net
обсуждение исходный текст
Ответ на connecting with password  (Eric McKeown <ericm@palaver.net>)
Ответы Re: [SQL] connecting with password  (Eric McKeown <ericm@palaver.net>)
Список pgsql-sql
Thus spake Eric McKeown
> Is there any way to set up special password protections for a Postgres
> database, so that I can force someone to present a username and password
> when connecting from a PHP script?  I've combed the docs for something on
> this, and I may just be completely off base on the feasibility.

What I do is run the page as the database owner (I run a separate Apache
on a different port) and use the Apacher server password protections.
Just remember to check who the remote user is every time you do any
operation where the specific user is important.  If you just need to
make a general restriction on a database for a group then the protection
in the config files (or .htaccess) should be fine.

How you do this in PHP is up to you.  I do it all in Python.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

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

Предыдущее
От: Daniele Orlandi
Дата:
Сообщение: Re: [SQL] connecting with password
Следующее
От: Eric McKeown
Дата:
Сообщение: Re: [SQL] connecting with password