1

I am currently trying to add LDAP support to supplement a file auth system. Unfortunately, I can't just phase out the file system in it's entirety because of when the LDAP server goes down. The current status is that I have a system that works for both LDAP and file login, if the LDAP server is online and responding. But, when the LDAP server goes down, that is when I encounter issues. I can't just have the file validation come before ldap, because then if the username matches but password doesn't, it fails as well. (This is important because passwords are not guaranteed to be the same between LDAP and htpasswd file.)

Here is my current setup:

<Directory /file/path>
  AuthType Basic
  AuthName "Password Required"
  AuthBasicProvider ldap file
  AuthUserFile /file/path/htpasswd
  AuthLDAPURL "ldap://ldap.companyserver.com:389/dc=company, dc=net"
  AuthLDAPBindAuthoritative off
  AuthzLDAPAuthoritative off
  Require valid-user
</Directory>

The ideas I've been looking at for a solution are as follows:

  1. Get it to actually recognize the LDAP timeout
  2. Find a way for basic auth to fall through when username matches but password doesn't

I'm open to any suggestions. I have playing with LDAPConnectionTimeout and could not get that to make a difference.

  • 1
    What about fixing your LDAP server issues so you can get from file auth? – David Aug 02 '12 at 00:37
  • @David: If it was that easy, I would. Right now the issue is that LDAPConnectionTimeout does nothing (as far as I can tell) to help it actually detect the timeout. I can not figure a way to get that to work, so I'm all ears. :) – Chris Dessonville Aug 02 '12 at 04:32
  • Why is it OK if the passwords don't match when the file provider comes second but not when it comes first? – user207421 Aug 12 '12 at 01:04
  • @EJP: That is how it is handled by Apache. I actually want it to not matter and that is really my question. – Chris Dessonville Aug 12 '12 at 03:57

1 Answers1

0

Don't you just need to add Satisfy Any?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
user207421
  • 990
  • 5
  • 16