Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E6ED66502C7 for ; Wed, 13 Aug 2008 11:58:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48027-01-6 for ; Wed, 13 Aug 2008 11:58:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by postgresql.org (Postfix) with ESMTP id 0ED66650301 for ; Wed, 13 Aug 2008 11:57:41 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so8245yxb.73 for ; Wed, 13 Aug 2008 07:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=3ZLET7+b0rZKSUyvwplYvpNHjELJN08Rquoq453QF6o=; b=AR8jp9i21klIuJIs/ksno5PrP300OuLaAziF1qt9QRA7zTtv31VWoIBPbfSXy43pbx IV6kvu/e0Y1spfEIJGkA3wHqhTiEXj+yYNH6STQPsVNNt8luw8oDjZntiuMZGNsTH9eM UNke3yeGd+V9NT7Ey3DBKK+Y7+VYdbx0OQHWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LjVxOSQxgPPKCORDNCYvNnWVSS2r7QIp2lBbk5V96ZEr1BfMd+fGs5P99gv3RFkr57 kDSgo8puXfzPEgqt3uuI1v1hKkdwoxdxFS1swbn1dMQiv8a/w1XZQXvO3sOyCivsR2Eg 4XPmyoFgdL3ANMZakJXqpaZGN9tplgrhdNyrw= Received: by 10.142.170.6 with SMTP id s6mr3344738wfe.228.1218639459924; Wed, 13 Aug 2008 07:57:39 -0700 (PDT) Received: by 10.142.165.13 with HTTP; Wed, 13 Aug 2008 07:57:39 -0700 (PDT) Message-ID: Date: Wed, 13 Aug 2008 08:57:39 -0600 From: "Scott Marlowe" To: "Thomas Jacob" Subject: Re: Best practice running a shared DB hosting server Cc: pgsql-admin@postgresql.org In-Reply-To: <1218635097.28547.28.camel@enterprise.ims-firmen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1218635097.28547.28.camel@enterprise.ims-firmen.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/51 X-Sequence-Number: 29896 On Wed, Aug 13, 2008 at 7:44 AM, Thomas Jacob wrote: > Hello List, > > I was wondering if there is something like > a best practice document for running > PostgreSQL (probably 8.3.3) securely in a shared > Web+DB hosting environment, where different > people without any administrative relationship > between them may run their databases on > the same server. Well, databases are designed to be accessed by people you trust to not do really stupid things that can affect the other users. I'd set up a db per user with pg_hba.conf set to only allow them to log into the db of their own name. > I am particularly interested in the > role, permission and schema layout. Each user = a new database. Let them do what they want to in there. > Also I'm worried about the amount of information > available to ordinary DB users. For instance, > without revoking access to pg_catalog from > PUBLIC all users can see the usernames, > database names etc. of all other users. But > revoking the right from pg_catalog doesn't > seem to be an option, as this breaks > several features of the psql utility and probably > other things. Hiding such things would only be security via obscurity and would accomplish exactly nothing.. Actually keeping people from logging into another user's database is much more important. that you can do with pg_hba.conf.