Apache reverse proxy with ldap authentication

compiled frankenconfig from several articles that give me some questions. What I'm trying to do is create a reverse proxy for splunk, which adds authentication to our ldap directory and wraps the http splunk page in ssl.

This configuration works correctly:

NameVirtualHost *:80

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/
</VirtualHost>

This configuration shows the auth method, which I hope to use, however, it throws a server error after authorization is complete:

NameVirtualHost *:80

<VirtualHost *:80>
    <Proxy *>
        Order deny,allow
        Deny from All
        AuthName "Authorisation"
        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative on
        AuthLDAPUrl "ldaps://10.0.0.66:636/cn=users,cn=accounts,dc=example,dc=net?uid"
        Require ldap-group cn=ipausers,cn=groups,cn=accounts,dc=example,dc=net
        Satisfy any
    </Proxy>
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/
</VirtualHost>

Environment:

  • Linux splunk.test.example.net 2.6.32-431.5.1.el6.x86_64 # 1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64 x86_64 x86_64 GNU / Linux
  • HTTPD-2.2.15-30.el6.centos.x86_64
  • mod_ssl-2.2.15-30.el6.centos.x86_64
  • OpenSSL-1.0.1e-16.el6_5.4.x86_64

Any help would be greatly appreciated.

+4

Source: https://habr.com/ru/post/1535456/


All Articles