Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C4578632339 for ; Wed, 7 Jan 2009 23:19:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 88643-02 for ; Wed, 7 Jan 2009 23:19:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id C7B57632324 for ; Wed, 7 Jan 2009 23:19:38 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id n083Jc214094; Wed, 7 Jan 2009 22:19:38 -0500 (EST) From: Bruce Momjian Message-Id: <200901080319.n083Jc214094@momjian.us> Subject: Re: ssl-info, enforcing list of common-names In-Reply-To: To: Craig Perras Date: Wed, 7 Jan 2009 22:19:38 -0500 (EST) CC: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" 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: 200901/19 X-Sequence-Number: 31066 Would someone please reply this question. --------------------------------------------------------------------------- Craig Perras wrote: > Hi - > > A couple things. I noticed that these two functions return NULL (or empty > string): > > select ssl_issuer_dn(); > select ssl_client_dn(); > > However, I can get specific fields: > > select '/CN=' || ssl_issuer_field('commonName') > || '/C=' || ssl_issuer_field('countryName') > || '/O=' || ssl_issuer_field('organizationName') > ; > > --returns "/CN=UW Services CA/C=US/O=University of Washington" > > I'm thinking of using an authorization scheme in which I check a list of > valid certificate common-names, and, if the current client has no cert or > is not in the list, they have no access (maybe force a logout). Is this > feasable and/or advisable? I'll only have a single trusted CA. > > Any help is appreciated! > > thanks, > --craig > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +