kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
739 stars 253 forks source link

Two DC's in one config #198

Open reddare opened 6 years ago

reddare commented 6 years ago

Hi!

Cannot get to work with pair of DC's

Make as in readme:

  ldap_server AD1 {                                                                     
    url ldaps://<AD1 SERVER INFO HERE>?sAMAccountName?sub?(objectClass=person);
    binddn "binddn_user";                                                            
    binddn_passwd 'bind_passwd';                                                           
    group_attribute uniquemember;                                                         
    group_attribute_is_dn on;                                                             
    require valid_user;                                                         
    satisfy any;                                                                
  }                                                                             

  ldap_server AD2 {                                                           
    url ldaps://<AD2 SERVER INFO HERE>?sAMAccountName?sub?(objectClass=person);
    binddn "binddn_user";                                                  
    binddn_passwd 'bind_passwd';                                                 
    group_attribute uniquemember;                                               
    group_attribute_is_dn on;                                                   
    require valid_user;                                                         
    satisfy any;                                                                
  }
server {
  ...
  auth_ldap "Internal Content";
  auth_ldap_servers AD1;
  auth_ldap_servers AD2;
  ...
}

But if first DC is offline, login form did not load. Separately it works fine, tested with only AD1 and only with AD2.

jason-kane commented 5 years ago

satisfy any; ?