Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A02FC476CFD for ; Tue, 28 Jan 2003 20:52:02 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id BE0A3476ACB for ; Tue, 28 Jan 2003 19:07:25 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 9419043A6A1; Tue, 28 Jan 2003 19:07:25 -0500 (EST) From: jerry.nospam@theashergroup.com (Jerry Asher) X-Newsgroups: comp.databases.postgresql.admin Subject: pg_hba, access control for a webserver, superuser, and joe user Date: 28 Jan 2003 15:39:03 -0800 Organization: http://groups.google.com/ Lines: 43 Message-ID: <836fa09a.0301281539.5bd3b38f@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-admin@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/324 X-Sequence-Number: 7166 I am running a system with three types of users: A) Joe User, who may have a pg database I don't care if Joe User, once logged in to the system has to type a password or not to get access to his db local sameuser md5 or local all ident sameuser or ? B) Superuser (postgres) who will need access to all dbs, w/o typing any password other than that of the postgres' pg user. I think I can do this through the use of a line in pg_hba.conf local all md5 admins where admins contains the name of the superuser. C) Web Server, which will run under one username, but will at times be required to access the databases of many users. This webserver's db mechanism, relies on passwords being stored, in the clear, in flat files. I would like to avoid that. I believe I can avoid that in a reasonably secure mode if I use the ident mechanism and manage an ident map in pg_ident.conf But permute as I might, I have not been able to piece all of this together. I can accomplish two out of three of these, but the whole solution eludes me. Does the order of statements in pg_hba.conf matter? Is there a priority and a fallback of sorts? Try this first mechanism and if that fails, try the next mechanism? What do most people do in this circumstance? Or, what should my pg_hba.conf file look like? Thanks, Jerry Asher jerry.nospam@theashergroup.com (remove the .nospam to send mail)