ldap_auth.ini 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [httpd_global_handlers]
  2. _session = {ldap_auth, handle_session_req}
  3. [httpd]
  4. authentication_handlers = {ldap_auth, handle_admin_role}
  5. [ldap_auth]
  6. ; NOTE: for all of the following configurations, if the key is suffixed in "DN", ldap_auth
  7. ; will expect you to provide a real LDAP Distinguished Name.
  8. ; If you use handle_admin_role to assign your system admins, specify the authentication handlers it should
  9. ; query here. See SystemAdminRoleName for more details.
  10. AuthenticationHandlers = {couch_httpd_auth, cookie_authentication_handler}, {ldap_auth, handle_basic_auth_req}
  11. ; Enable SSL to the LDAP server.
  12. UseSsl = false
  13. ; The LDAP servers to use for searches and authentication, separated by commas. These will be tried in-order.
  14. LdapServers = first.ldap.example.com, second.ldap.example.com, third.ldap.example.com
  15. ; The DN to narrow the scope of searches for users and groups.
  16. BaseDN = DC=example,DC=com
  17. ; ldap_auth will use this user DN and password to search for users trying to authenticate.
  18. ; if you have anonymous LDAP queries enabled (not recommended) you may simply provide the
  19. ; `anon` CN and a blank password.
  20. SearchUserDN = CN=ldapsearch,CN=Users,DC=example,DC=com
  21. SearchUserPassword = ldapsearch_password_here
  22. ; On ActiveDirectory, you might choose from:
  23. ; - sAMAccountName, e.g. jsmith
  24. ; - userPrincipalName, e.g. jsmith@example.com
  25. ; NOTE: if you use userPrincipalName, be sure to URL-encode the username when using basic auth.
  26. ; e.g. http://jsmith%40example.com:password@example.com:5984
  27. UserDNMapAttr = sAMAccountName
  28. ; The LDAP attribute of the group to use as the role name.
  29. GroupDNMapAttr = name
  30. ; The role to grant system administrative privileges to.
  31. ; If you include {ldap_auth, handle_admin_role} in your authentication_handlers, it will
  32. ; grant the system admin role to anyone who has this role assigned. BE CAREFUL.
  33. SystemAdminRoleName = admin