pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Struck <struck.d@retrovirology.lu>
From: (by way of Daniel Struck <struck.d@retrovirology.lu>
To: Mariusz Pekala <skoot@qi.pl>
Cc: pgsql-php@postgresql.org
Subject: Re: client authentication towards postgresql in php?
Date: Wed, 12 Nov 2003 16:29:57 +0100
Message-ID: <20031112162957.34737701.struck.d@retrovirology.lu> (raw)
In-Reply-To: <200311121456.23177.skoot@qi.pl>
References: <20031109165228.45503144.struck.d@retrovirology.lu>
	<1068557456.10942.14684.camel@camel>
	<20031111145425.716dbf1a.struck.d@retrovirology.lu>
	<200311121456.23177.skoot@qi.pl>

> If you want only the logging ability, you may try to handle authentication 
> inside the database. I mean: 
> - - connect to PG database as one user (apache)
> - - make every PHP script create a temporary table with username
>   just after establishing the connection: 
>   CREATE TEMPORARY TABLE logged_user (username varchar);
>   INSERT INTO logged_user VALUES ('username');
> - - prepare triggers that log every modification to every table you're
>   interested in. The trigger procedure(s) should get the data from that
>   temporary table and use it to store who's doing the modifications. 
>   If the table does not exists, fire an exception inside the trigger
>   procedure. This will ensure that only logged users will success with
>   modifications.

thanks for this nice workaround :-), I will use it if i can't integrate the apache module "mod_kct" in my setup.
(mod_kct, http://www.citi.umich.edu/projects/kerb_pki/)

Daniel


-- 
Retrovirology Laboratory Luxembourg
Centre Hospitalier de Luxembourg
4, rue E. Barblé
L-1210 Luxembourg

phone: +352-44116105
fax:   +352-44116113
web: http://www.retrovirology.lu
e-mail: struck.d@retrovirology.lu



view thread (9+ messages)  latest in thread

Message-ID: <20031112162957.34737701.struck.d@retrovirology.lu>
Permalink:  ../20031112162957.34737701.struck.d@retrovirology.lu/
Also on:    postgresql.org/message-id/20031112162957.34737701.struck.d@retrovirology.lu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: struck.d@retrovirology.lu, skoot@qi.pl
  Subject: Re: client authentication towards postgresql in php?
  In-Reply-To: <20031112162957.34737701.struck.d@retrovirology.lu>
  References: <20031109165228.45503144.struck.d@retrovirology.lu> <1068557456.10942.14684.camel@camel> <20031111145425.716dbf1a.struck.d@retrovirology.lu> <200311121456.23177.skoot@qi.pl> <20031112162957.34737701.struck.d@retrovirology.lu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox