X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0E0199DD728 for ; Fri, 13 Jan 2006 13:19:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48527-06 for ; Fri, 13 Jan 2006 13:19:39 -0400 (AST) X-Greylist: delayed 01:56:16.093654 by SQLgrey- Received: from mail.digitalfreaks.org (arbitor.digitalfreaks.org [216.151.95.158]) by postgresql.org (Postfix) with ESMTP id 4CF769DD72B for ; Fri, 13 Jan 2006 13:19:35 -0400 (AST) Received: by mail.digitalfreaks.org (Postfix, from userid 1022) id E4B761826B; Fri, 13 Jan 2006 12:19:38 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.digitalfreaks.org (Postfix) with ESMTP id E399A1826A; Fri, 13 Jan 2006 12:19:38 -0500 (EST) Date: Fri, 13 Jan 2006 12:19:38 -0500 (EST) From: "Brian A. Seklecki" X-X-Sender: lavalamp@arbitor.digitalfreaks.org To: Tom Lane cc: pgsql-admin@postgresql.org Subject: Re: PKI/SSL Client/Server Certificate Authentication In-Reply-To: <25602.1137168524@sss.pgh.pa.us> Message-ID: <20060113114049.D38232@arbitor.digitalfreaks.org> References: <20060113095615.S38232@arbitor.digitalfreaks.org> <25602.1137168524@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.096 required=5 tests=[AWL=0.096] X-Spam-Score: 0.096 X-Spam-Level: X-Archive-Number: 200601/162 X-Sequence-Number: 20250 On Fri, 13 Jan 2006, Tom Lane wrote: > "Brian A. Seklecki" writes: >> If a "bad person" were to somehow obtain a copy of the source code with a >> password embedded in the connect string (Steal it from a developer who >> uses Windows, or maybe convince Apache to not interpret PHP before sending >> to the client, something stupid like that), they would still be unable to >> connect without a client certificate. > > So they steal the client certificate file instead of (the file > containing) the password. How exactly is this more secure? You'd have to get a local shell on the server *plus* the password. If a hacker can get a local shell on your web server (not a multi-user environment, obviously), and the Web server isn't in a jail, then they've probably got your database server too, and you might as well pack up and head home. But with OCSP, the CA for the organization can revoke the validity of a Cert at any time by updating the CRL. The password is entirely optional for the user. When you've got a Vhost running multiple Apps talking to the same BD, and the Web servers runs as the "www" or "http" user, you can even plug multiple database user passwords into user ~/www/.pgpass and the username is mapped via the Client X.509 cert. In short, it's a deterrent to hackers and a convenience to admins. But we all know if someone wants in, they'll get in and it won't be some kind of attack a weakness in X.509 PKI, it will be the develpoer on Windows that opens the e-mail with the attachment (or image file!) ~BAS > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > l8* -lava x.25 - minix - bitnet - plan9 - 110 bps - ASR 33 - base8