We are using Apache for LDAP Authentication for webservices defined in tomcat. Using AJP Connector for proxypass, proxyserverpass. The problem we are facing is that we are unable to retrieve User Information in tomcat application. Even though we have an attribute has been set to false like this
tomcatAuthentication = false . The way we are trying to retrieve via webservice is by a login webservice which is supposed to retrieve the user information using
HttpServletRequest.getRemoteUser() but I don't see any user name getting returned by this webservice which mean AJP isn't working for us I believe.
Please let me know if I can answer more specific question.
How to troubleshoot ?
Adding Configuration we have on our Apache server for the LDAP authentication as requested by
Unbeliever in the comment:
<Directory "/var/lib/apache-tomcat-8.0.33/app/foo/"> #<Directory "/foo"> AuthType Basic AuthName "AD Apache Login" AuthBasicProvider ldap #AuthzLDAPAuthoritative on AuthLDAPURL "ldap://ad.one.example.com:3268/dc=one,dc=example,dc=com?sAMAccountName?sub?(objectClass=*)" AuthLDAPBindDN "firstname.lastname@example.org" AuthLDAPBindPassword "123456" Require valid-user Options FollowSymLinks Options -MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Servername one.example.com #ProxyPreserveHost On ProxyPass "/app/foo" "ajp://one.example.com:8009/" ProxyPassReverse "/app/foo" "ajp://one.example.com:8009/" #Servername localhost ErrorLog /var/log/httpd/ajp.error.log CustomLog /var/log/httpd/ajp.log combined </VirtualHost>