Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 97287650E8C for ; Sun, 29 Jun 2008 12:58:12 -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 11813-07 for ; Sun, 29 Jun 2008 12:58:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from svr2.hagander.net (svr2.hagander.net [88.198.128.226]) by postgresql.org (Postfix) with ESMTP id 1B066650DBC for ; Sun, 29 Jun 2008 12:58:06 -0300 (ADT) Received: from dynamic.hagander.net ([127.0.0.1]) (encrypted and authenticated) by svr2.hagander.net (Postfix) with ESMTP id D8B7DDCC517; Sun, 29 Jun 2008 17:58:04 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mha-laptop.hagander.net (Postfix) with ESMTP id 6CD99124149; Sun, 29 Jun 2008 17:58:04 +0200 (CEST) Message-ID: <4867B10C.40705@hagander.net> Date: Sun, 29 Jun 2008 17:58:04 +0200 From: Magnus Hagander User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Taha Ozket CC: pgsql-general@postgresql.org Subject: Re: LDAP Authentication References: <6e4906da0806290644q40ab3253p27b83488861f66d2@mail.gmail.com> In-Reply-To: <6e4906da0806290644q40ab3253p27b83488861f66d2@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/990 X-Sequence-Number: 134519 Taha Ozket wrote: > Hi, > > I have a ldap group, "pgsql-developers". I have an user (user1) member > of this group; > > group > dn: cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x > objectClass: groupOfUniqueNames > objectClass: top > cn: SVN Committers > uniqueMember: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x > > user > dn: uid=user1,ou=Users,o=Dep,dc=x,dc=x,dc=x > objectClass: person > objectClass: top > objectClass: uidObject > cn:: Denem1 > sn:: Deneme2 > uid: user1 > userPassword:: e01ENX10WnhudnhscVIxZ1pIa0wzWm5ET3VnPT0= > > I added this line to pg_hba.conf [1] > > host all all 172.20.0.0/16 ldap > "ldap://localhost/basedn;cn=;,cn=pgsql-developers,ou=Groups,o=Dep,dc=x,dc=x,dc=x" > > But now postgresql requires my user1 must be define under > cn=pgsql-developers,ou=Groups.. But I want to give login permission to > pgsql-developers members. > > How can I change this line for give login permission to > pgsql-developers members? This is not something you currently can do. We can only do LDAP authentication, not authorization. There's no way to restrict it to a particular group. One way to accomplish what you're trying to do is to have a script that synchronizes the members of the group to PostgreSQL accounts (account name and role membership only), and still use LDAP for authentication. It doesn't work in every case, but it does work in most. //Magnus