X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F19B4D1BB17 for ; Tue, 15 Jun 2004 13:22:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62226-06 for ; Tue, 15 Jun 2004 16:22:29 +0000 (GMT) Received: from tom.hrz.tu-chemnitz.de (tom.hrz.tu-chemnitz.de [134.109.132.38]) by svr1.postgresql.org (Postfix) with ESMTP id 32CACD1BAF8 for ; Tue, 15 Jun 2004 13:22:27 -0300 (ADT) Received: from ultra.csn.tu-chemnitz.de ([134.109.116.202] helo=mail.ultra.csn.tu-chemnitz.de) by tom.hrz.tu-chemnitz.de with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BaGhe-0006xF-1z for pgsql-admin@postgresql.org; Tue, 15 Jun 2004 18:22:26 +0200 Received: from kosh.ultra.csn.tu-chemnitz.de ([192.168.5.2]) by mail.ultra.csn.tu-chemnitz.de (8.12.11/8.12.11) with ESMTP id i5FGMMqD025836 for ; Tue, 15 Jun 2004 18:22:22 +0200 Received: from kosh.ultra.csn.tu-chemnitz.de (localhost [127.0.0.1]) by kosh.ultra.csn.tu-chemnitz.de (8.12.11/8.12.10) with ESMTP id i5FGMMCh015172 for ; Tue, 15 Jun 2004 18:22:22 +0200 Received: (from ensc@localhost) by kosh.ultra.csn.tu-chemnitz.de (8.12.11/8.12.10/Submit) id i5FGMMlT015171; Tue, 15 Jun 2004 18:22:22 +0200 To: pgsql-admin@postgresql.org Subject: Truncation of krb5 principals From: Enrico Scholz Date: Tue, 15 Jun 2004 18:22:22 +0200 Message-ID: <87n034dc5d.fsf@kosh.ultra.csn.tu-chemnitz.de> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scan-Signature: c4e529ea06550f8ae756d457c1b9e21b X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/246 X-Sequence-Number: 13906 Hello, I am using krb5 authorization and have a problem with the mangling of krb5 principal names. E.g. on authentication, the principals 'foo/www@XYZ.ORG' and 'foo/mail@ABC.COM' will be both rewritten to the local username 'foo', which is completely unwanted and might be a security problem. In the archives, I read that this happens because '/' and '@' are forbidden characters for usernames. An authname-to-username mapping table was a proposed solutions, but although the discussion[1] was some time ago in 2002, I can not find such a thing in recent postgresql 7.4.2. When the authname -> username table would be too complicated to implement, would it be possible to use something like OpenLDAP's 'sasl-regexp' feature? E.g. in postgresql.conf it could be written | sasl-regexp "([^/]*)/www@XYZ.ORG" "$1_www_XYZ_ORG" | sasl-regexp "([^/]*)/mail@ABC.COM" "$1_mail_ABC_COM" which maps the principals above into valid SQL usernames. Enrico Footnotes: [1] http://groups.google.com/groups?&selm=8149.1021471997%40sss.pgh.pa.us