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 E336DD1B535 for ; Thu, 13 Nov 2003 22:15:48 +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 38931-09 for ; Thu, 13 Nov 2003 18:15:20 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id AD40DD1B558 for ; Thu, 13 Nov 2003 18:15:17 -0400 (AST) Received: (qmail 24387 invoked by uid 500); 13 Nov 2003 22:13:51 -0000 Date: Thu, 13 Nov 2003 16:13:51 -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: <20031113221351.GA23638@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> <20031111184752.GA11772@wolff.to> <20031112112603.1eb5d786.struck.d@retrovirology.lu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031112112603.1eb5d786.struck.d@retrovirology.lu> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/40 X-Sequence-Number: 2433 On Wed, Nov 12, 2003 at 11:26:03 +0100, Daniel Struck wrote: > On Tue, 11 Nov 2003 12:47:52 -0600 > Bruno Wolff III wrote: > > > 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. > > The web application, which will make the connection to the database, is normally running under the user apache, so I don't think I could use the ident method? Sure you can. If you trust the apache user, you can use ident authentication to allow it to connect as any of the valid users. It may be in your case that you can't trust the apache user, but we don't know enough about your setup to be able to tell that.