Score:0

How to Intercept and cache LDAP Search and Bind requests

cn flag

I have a production web server running Django. Currently every request made requires an LDAP Bind and Search request. I can use the django-auth-ldap plugin to enable LDAP Search caching. However, my problem is that I am in an environment that sometimes loses connection to the main AD server(s). When this happens LDAP Bind will fail. I was wondering if there is a good option for caching both LDAP Binding and Searching requests. I looked into Squid to solve this problem but I'm unsure if it is possible.

  1. Has anyone solved the problem of caching Searches and Bind requests to an LDAP server?
  2. Is there a reason why most LDAP caches do not cache Binds?

Note: Switching authentication to OAuth or a Token based system is currently not an option.

Score:0
tm flag

Usually some kind of "surrogate credentials" come into play. Your application has to handle this. Like setting a cookie or recording the IP address of the connection and not issuing LDAP request when it sees one of those...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.