Re: [pgsql-fr-generale][résolu] Apache et postgresql

From: BPascal <pascal62fr(at)free(dot)fr>
To: pgsql-fr-generale(at)postgresql(dot)org
Subject: Re: [pgsql-fr-generale][résolu] Apache et postgresql
Date: 2008-11-24 14:58:15
Message-ID: 492AC107.1000505@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

Bonjour,

Je complète et je corrige mon mail précédent.
Ce mail est un howto rapide testé sur une RHEL5.

>
> Problème résolu, j'ai une authentification Apache Postgresql si
> appartenance à un ou plusieurs groupes.
> Les droits sont gérés par répertoire dans l'exemple donné.

Les tables users et groups sont conformes à la description incluse en
commentaire dans le fichier auth_pgsql.conf.

Voici un exemple de fichier auth_pgsql.conf
<Directory /var/www>
AuthName "PostgreSQL group authenticated zone"
AuthType Basic
Auth_PG_database cnltel
Auth_PG_pwd_table users
Auth_PG_uid_field user_name
Auth_PG_pwd_field user_passwd
Auth_PG_grp_table groups
Auth_PG_grp_user_field user_name
Auth_PG_grp_group_field user_group
</Directory>

Voici un exemple de fichier .htaccess pour tester l'appartenance au
groupe "correspondant".

AuthName "Acces restreint aux correspondants"
AuthType basic
#AuthBasicAuthoritative off
Auth_PG_authoritative on
Auth_PG_host localhost
Auth_PG_port xxxx
Auth_PG_user xxxx
Auth_PG_database xxxx
#Auth_PG_pwd xxxxxxxx

Auth_PG_pwd_table "users"
Auth_PG_uid_field user_name
Auth_PG_pwd_field user_passwd

Auth_PG_grp_table "groups"
Auth_PG_grp_user_field user_name
Auth_PG_grp_group_field user_group
Auth_PG_grp_whereclause " and user_group = 'correspondant' "

Auth_PG_encrypted off
<LIMIT GET POST>
require valid-group
</LIMIT>

A bientôt
--
Pascal
http://www.unr-npdc.org/logiciels

In response to

Responses

Browse pgsql-fr-generale by date

  From Date Subject
Next Message Guillaume Lelarge 2008-11-24 15:10:49 Re: Re: [pgsql-fr-generale][résolu] Apache et postgresql
Previous Message BPascal 2008-11-21 09:14:28 Re: Apache et postgresql