Re: django and LDAP support

2006-08-16 Thread Jason F. McBrayer
"Gary Wilson" <[EMAIL PROTECTED]> writes: > Scott Paul Robertson wrote: >> I'll start on this tomorrow. Out of curiosity how common is this sort of >> setup? I've only seen a handful of LDAP implementations, and this is new >> to me. > Not sure how common it is, as this is the only ldap setup I

Re: django and LDAP support

2006-08-14 Thread Scott Paul Robertson
On Mon, Aug 14, 2006 at 12:51:47PM -0600, Scott Paul Robertson wrote: > Anyhow, let me know if you have any thoughts, and I'll have the patch in > tonight. > Patch is in place. I'm aware of a trailing sentence in the doc string and a typo with get_user() in the doc string as well, but won't

Re: django and LDAP support

2006-08-14 Thread Scott Paul Robertson
On Sat, Aug 12, 2006 at 10:11:53PM -0700, Gary Wilson wrote: > You can remove the l.unbind_s() on line 77. :) Thanks again. > > It would also be great if the authenticate() method wasn't tied to the > contrib.auth.models.User model. I, for one, use my own custom user > model. Maybe extracting

Re: django and LDAP support

2006-08-12 Thread Gary Wilson
Scott Paul Robertson wrote: > Let me know if there's anything else, > Scott You can remove the l.unbind_s() on line 77. It would also be great if the authenticate() method wasn't tied to the contrib.auth.models.User model. I, for one, use my own custom user model. Maybe extracting the parts

Re: django and LDAP support

2006-08-12 Thread Scott Paul Robertson
On Sat, Aug 12, 2006 at 10:09:28AM +0200, [EMAIL PROTECTED] wrote: > for sure I understand now why you need a second search on update_user() and > with the defaults for mk_pre_auth_bind those two searches should be the same. > > A security question about get_ldap_user() > > def

Re: django and LDAP support

2006-08-12 Thread dummy
Hi Scott, for sure I understand now why you need a second search on update_user() and with the defaults for mk_pre_auth_bind those two searches should be the same. A security question about get_ldap_user() def get_ldap_user(l, username): """ Helper method, makes a user

Re: django and LDAP support

2006-08-11 Thread Scott Paul Robertson
On Fri, Aug 11, 2006 at 07:46:19PM +0200, [EMAIL PROTECTED] wrote: > I came back to your LDAPSupport. The pre_auth_bind is a little bit tricky > evan with mk_pre_auth_bind, but I got it (after a while :) > Ok, I've done some cleaning with mk_pre_auth_bind. It should be a lot clearer how to use

Re: django and LDAP support

2006-08-11 Thread dummy
Hi Scott, I came back to your LDAPSupport. The pre_auth_bind is a little bit tricky evan with mk_pre_auth_bind, but I got it (after a while :) And there seems a problem with pre_auth_bind() and update_user(): You let construct somebody a pre_auth_bind() which search for the dn of a user, but

Re: django and LDAP support

2006-08-11 Thread Scott Paul Robertson
Ok, one last change to make it more 'pythonic'. Just a slight change to make using the pre-auth bind function easier. I think this finishes out the patch. If there are any other ideas or suggestions, please let me know. Scott (http://code.djangoproject.com/ticket/2507/) -- Scott Paul Robertson

Re: django and LDAP support

2006-08-10 Thread Scott Paul Robertson
On Thu, Aug 10, 2006 at 12:41:21PM -0600, Scott Paul Robertson wrote: > 2. An option that is a function that will be called to generate a bind > string for the user. This gives a lot of flexibility in allowing for a > large variety of pre-bind methods to occur, and gives a lot of > flexibility.

Re: django and LDAP support

2006-08-10 Thread Scott Paul Robertson
On Wed, Aug 09, 2006 at 10:22:24PM -0600, Scott Paul Robertson wrote: > > Also, in the ldap setup I deal with, you must bind to the server using > > a service account before attempting a bind with the user-supplied > > credentials. The process goes something like > > > > 1. Retrieve the username

Re: django and LDAP support

2006-08-09 Thread Matthew Flanagan
On 10/08/06, Scott Paul Robertson <[EMAIL PROTECTED]> wrote: > On Wed, Aug 09, 2006 at 08:00:31PM -0700, Gary Wilson wrote: > > > Scathing comments are encouraged. > > > > line 68 of patch: > > if not username and password is not Null: # we need a user/pass > > Should be None

Re: django and LDAP support

2006-08-09 Thread Gary Wilson
Scott Paul Robertson wrote: > > Also, in the ldap setup I deal with, you must bind to the server using > > a service account before attempting a bind with the user-supplied > > credentials. The process goes something like > > > > 1. Retrieve the username and password from the user. > > 2. Bind

Re: django and LDAP support

2006-08-09 Thread Scott Paul Robertson
On Wed, Aug 09, 2006 at 08:00:31PM -0700, Gary Wilson wrote: > > Scathing comments are encouraged. > > line 68 of patch: > if not username and password is not Null: # we need a user/pass > Should be None d'oh! Figures I'd mistype something like that. > And how about

Re: django and LDAP support

2006-08-09 Thread Gary Wilson
Scott Paul Robertson wrote: > On Tue, Aug 01, 2006 at 12:08:25PM -0700, Scott Paul Robertson wrote: > > I'm actually doing LDAP auth with something I wrote myself, which I feel > > is a little more general than the mentioned code (not that I'm > > opinionated or anything). I'll be posting it in a

Re: django and LDAP support

2006-08-09 Thread Scott Paul Robertson
On Tue, Aug 01, 2006 at 12:08:25PM -0700, Scott Paul Robertson wrote: > I'm actually doing LDAP auth with something I wrote myself, which I feel > is a little more general than the mentioned code (not that I'm > opinionated or anything). I'll be posting it in a day or so once it's > cleaned up a

Re: django and LDAP support

2006-08-01 Thread Scott Paul Robertson
On Tue, Aug 01, 2006 at 07:58:10PM +0200, [EMAIL PROTECTED] wrote: > I read a lot about django's auth system and the AUTHENTICATION_BACKENDS > middelware. I also googled the following resources for LDAP support in django: > > http://code.djangoproject.com/wiki/MultipleAuthBac

django and LDAP support

2006-08-01 Thread dummy
Hi all, I read a lot about django's auth system and the AUTHENTICATION_BACKENDS middelware. I also googled the following resources for LDAP support in django: http://code.djangoproject.com/wiki/MultipleAuthBackends http://www.jrandolph.com/blog/?p=22 http://www.carthage.edu/webdev/?p=12