Wednesday, December 7, 2016

Checkings perms results in SERVER_DOWN error

I am using Django-auth-ldap as my primary authentication backend.  Since using this package, I have noticed that our LDAP server (actually, an Active Directory Primary Domain Controller) sometimes cannot be reached by Django (or Outlook, for that matter, but that’s a different problem).  Django seems to be trying to connect to the LDAP server whenever we are checking the permissions in the view or template currently being accessed by the user that is already logged in.

 

Now, I do have the standard ModelBackend set up as an alternative if the LDAPBackend authentication  fails.  Based on what I am reading, though, Django will only change backends during the authentication phase.  Am I correct on this?  From what I now understand and what seems to be happening, if checking permissions through the LDAPBackend results in an error, Django will raise that error and not move on to the next backend, ModelBackend.

 

Any ideas around this?

 

Thank you so much for your time.

 

No comments:

Post a Comment