Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 227F72E006D for ; Wed, 4 Jun 2008 13:03:28 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96028-07 for ; Wed, 4 Jun 2008 13:03:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from easy2.in-chemnitz.de (easy2.in-chemnitz.de [88.198.17.232]) by developer.postgresql.org (Postfix) with ESMTP id 8A0902E0037 for ; Wed, 4 Jun 2008 13:03:17 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by easy2.in-chemnitz.de (Postfix) with ESMTP id 758DA470021 for ; Wed, 4 Jun 2008 18:03:16 +0200 (CEST) Received: from easy2.in-chemnitz.de ([127.0.0.1]) by localhost (easy.in-chemnitz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DioZmLCHq8II for ; Wed, 4 Jun 2008 18:03:16 +0200 (CEST) Received: by easy2.in-chemnitz.de (Postfix, from userid 1013) id 63C62470013; Wed, 4 Jun 2008 18:03:16 +0200 (CEST) Date: Wed, 4 Jun 2008 18:03:16 +0200 From: Tino Schwarze To: pgsql-admin@postgresql.org Subject: Re: Postgres security issue - protecting datafiles Message-ID: <20080604160316.GH23526@easy2.in-chemnitz.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/31 X-Sequence-Number: 29369 On Mon, Jun 02, 2008 at 03:16:54PM -0700, zferentz@gmail.com wrote: > I'd like to use postgres to store my secret data in a way that only > me (the DBA, owner of the table) can access the talbe while the root > (system administrator) who installed and maintains the server - will > not be able to see the data. > > Now, I think that "db authentication" is simply not enough , because > the administrator can copy the data files to his own machine (where he > is the owner of the database). > > Is there a way to protect the data files, so even the "malicious > administrator" cannot see the data ? I suppose, you need to look into SELinux. That might give you the infrastructure for such purposes, together with an encrypted file system for DB space. That's not something you can do via an application. As you already noticed, anybody with access to the physical table data will be able to copy it. Of course, you could encrypt the data stored in the table, but then: where's the key for decryption? Tino. -- "What we resist, persists." (Zen saying) www.craniosacralzentrum.de www.forteego.de