X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 27305D1B51A for ; Thu, 13 Nov 2003 13:34:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 32142-05 for ; Thu, 13 Nov 2003 09:33:35 -0400 (AST) Received: from arktis.luxadmin.org (arktis.luxadmin.org [195.206.105.1]) by svr1.postgresql.org (Postfix) with ESMTP id BAA3FD1B515 for ; Thu, 13 Nov 2003 09:33:31 -0400 (AST) Received: from samara.atlantis.local (luxadmin.org [195.206.105.1]) by arktis.luxadmin.org (Postfix) with SMTP id 220C7160631; Thu, 13 Nov 2003 14:33:18 +0100 (CET) Date: Wed, 12 Nov 2003 16:29:57 +0100 From: Daniel Struck (by way of Daniel Struck ) To: Mariusz Pekala Cc: pgsql-php@postgresql.org Message-Id: <20031112162957.34737701.struck.d@retrovirology.lu> 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> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Resent-Date: Thu, 13 Nov 2003 14:33:04 +0100 Resent-From: Daniel Struck Subject: Re: client authentication towards postgresql in php? Resent-Message-Id: <20031113143304.1b30c81f.struck.d@retrovirology.lu> Resent-To: Mariusz Pekala , pgsql-php@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/37 X-Sequence-Number: 2430 > If you want only the logging ability, you may try to handle authenticatio= n=20 > inside the database. I mean:=20 > - - connect to PG database as one user (apache) > - - make every PHP script create a temporary table with username > just after establishing the connection:=20 > 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.=20 > 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 --=20 Retrovirology Laboratory Luxembourg Centre Hospitalier de Luxembourg 4, rue E. Barbl=E9 L-1210 Luxembourg phone: +352-44116105 fax: +352-44116113 web: http://www.retrovirology.lu e-mail: struck.d@retrovirology.lu