Unix Technical Forum

Using LDAP for authorization

This is a discussion on Using LDAP for authorization within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi! I want to pull authorization information from LDAP for my PostgreSQL database. I use kerberos for authentication, so ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:39 AM
Magnus Hagander
 
Posts: n/a
Default Using LDAP for authorization

Hi!

I want to pull authorization information from LDAP for my PostgreSQL
database. I use kerberos for authentication, so I do *not* want to use
LDAP for authentication. I want to pull group membership from LDAP and
match it to the kerberos-provisded usernames. Preferrably the users
should be auto-created if needed, but the groups are created by the
admin (users shuold only be autocreated if they are members of these
groups, of course).

I see two ways of doing this:
1) Have an external process that syncs database users and groups to the
LDAP directory. I have no need for "instant updates" (if a new user is
added, it's Ok if it takes an hour or so before he can log in to the
database). Does somebody know of a tool that does this already?

2) Somehow have this functionality in the backend authorization code -
"native support for LDAP groups". Those who have digged around those
parts of the code, is this something that seems reasonable to do? Is it
something we'd want in the backend at all?


//Magnus


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:39 AM
Stephen Frost
 
Posts: n/a
Default Re: Using LDAP for authorization

* Magnus Hagander (mha@sollentuna.net) wrote:
> I want to pull authorization information from LDAP for my PostgreSQL
> database. I use kerberos for authentication, so I do *not* want to use
> LDAP for authentication. I want to pull group membership from LDAP and
> match it to the kerberos-provisded usernames. Preferrably the users
> should be auto-created if needed, but the groups are created by the
> admin (users shuold only be autocreated if they are members of these
> groups, of course).


Kind of a neat idea, but...

> I see two ways of doing this:
> 1) Have an external process that syncs database users and groups to the
> LDAP directory. I have no need for "instant updates" (if a new user is
> added, it's Ok if it takes an hour or so before he can log in to the
> database). Does somebody know of a tool that does this already?


I don't know of a tool that does it already but it doesn't sound too
difficult to do, honestly.

> 2) Somehow have this functionality in the backend authorization code -
> "native support for LDAP groups". Those who have digged around those
> parts of the code, is this something that seems reasonable to do? Is it
> something we'd want in the backend at all?


The user/group system is having something of an overhaul at the moment.
Basically I'm working on implementing roles. I think the problem at the
moment is that Postgres has no system in place for checking user or
group information externally/dynamically during operation really.
There's some support in the authentication code for checking external
sources (Kerberos, PAM, etc) for users. Once you're connected and
authenticated though, all of the user information, group information,
access controls, etc, are done using Postgres' 'system cache' and the
system tables/indexes. Changing that would require quite a bit of
effort...

Stephen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCdjwlrzgMPqB3kigRAkG7AJ0XFnFqUTkCKGDZwnlbnv NjGEhhygCdFpGl
UgJUqDa0uQPTQb5dPefeqGQ=
=ayrw
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com