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 9DD72D1B544 for ; Tue, 11 Nov 2003 18:49:57 +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 02653-02 for ; Tue, 11 Nov 2003 14:49:27 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 241B1D1B53B for ; Tue, 11 Nov 2003 14:49:25 -0400 (AST) Received: (qmail 12139 invoked by uid 500); 11 Nov 2003 18:47:52 -0000 Date: Tue, 11 Nov 2003 12:47:52 -0600 From: Bruno Wolff III To: Daniel Struck Cc: Robert Treat , pgsql-php@postgresql.org Subject: Re: client authentication towards postgresql in php? Message-ID: <20031111184752.GA11772@wolff.to> Mail-Followup-To: Daniel Struck , Robert Treat , pgsql-php@postgresql.org References: <20031109165228.45503144.struck.d@retrovirology.lu> <1068557456.10942.14684.camel@camel> <20031111145425.716dbf1a.struck.d@retrovirology.lu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031111145425.716dbf1a.struck.d@retrovirology.lu> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/33 X-Sequence-Number: 2426 On Tue, Nov 11, 2003 at 14:54:25 +0100, Daniel Struck wrote: > > The problem is, I don't have a password available in php. > The users are authenticated with x509 certificats and a private key, not a password. The private key is stored on a smartcard and never leaves it, the smartcard itself handles the authentication with apache. > > Problem now is, I want to authenticate the user with postgresql, to be able to log what the user is doing in postgresql itself. > But I don't have a password to authenticate the user. > Thought about using a Kerberos ticket in postgresql, but don't know how to setup this. If you trust the host the php/web server runs on you may be able to use trust authentication. If you don't trust all of the users on that host then you can use ident authentication, though if the db server and php/web server aren't the same host using identd may slow things down too much.