pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: Taha Ozket <tahaozket@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: LDAP Authentication
Date: Sun, 29 Jun 2008 17:58:04 +0200
Message-ID: <4867B10C.40705@hagander.net> (raw)
In-Reply-To: <6e4906da0806290644q40ab3253p27b83488861f66d2@mail.gmail.com>
References: <6e4906da0806290644q40ab3253p27b83488861f66d2@mail.gmail.com>

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



view thread (30+ messages)  latest in thread

Message-ID: <4867B10C.40705@hagander.net>
Permalink:  ../4867B10C.40705@hagander.net/
Also on:    postgresql.org/message-id/4867B10C.40705@hagander.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: magnus@hagander.net, tahaozket@gmail.com
  Subject: Re: LDAP Authentication
  In-Reply-To: <4867B10C.40705@hagander.net>
  References: <6e4906da0806290644q40ab3253p27b83488861f66d2@mail.gmail.com> <4867B10C.40705@hagander.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox