mod_auth_pgsql_sysIt was required for local intranet to synchronize users and their rights of access to a database on PostgreSQL and to a web-server on Apache. I have not thought up anything better than to take mod_auth_pgsql and to train it to use the information from system tables PostgreSQL (pg_shadow, pg_group). Now contents .htaccess can be for example such:
deny from all
AuthType Basic
Auth_PGhost database.server.com
Auth_PGdatabase office
Auth_PGpwd_table pg_shadow
Auth_PGgrp_table pg_group
AuthName directory
require group managers
require valid-user
satisfy all
As autentification it is considered successful if it was possible
to open a database with the name entered by the user and the
password PostgreSQL should be adjusted in appropriate way (see
pg_hba.conf).Here you will find original mod_auth_pgsql, my variant and itself patch. And it is variant for work with PostgreSQL v7, made by Victor Glushchenko (vic@adv.ru). Понадобилось для местного интранета синхронизировать пользователей и их права доступа к базе данных на PostgreSQL и web-серверу на Russian Apache. Я не придумал ничего лучше, чем взять mod_auth_pgsql и обучить его пользоваться информацией из системных таблиц PostgreSQL (pg_shadow, pg_group). Теперь содержимое .htaccess может быть например таким:
deny from all
AuthType Basic
Auth_PGhost database.server.com
Auth_PGdatabase office
Auth_PGpwd_table pg_shadow
Auth_PGgrp_table pg_group
AuthName directory
require group managers
require valid-user
satisfy all
Так как аутентификация считается успешной если удалось открыть базу данных с
введенными пользователем именем и паролем, то PostgreSQL должен быть настроен
соответствующим образом (см. pg_hba.conf).Здесь Вы найдете оригинальный mod_auth_pgsql, мой вариант и сам патч. А это вариант для работы с PostgreSQL v7, сделанный Виктором Глущенко (vic@adv.ru). Last modified: Mon Jul 17 11:31:10 MSD 2000 |