1

Fronting tomcat with Apache Ldap authentication .

I can see through TCP DUMP that my http header sending remote_user:..RICHARD to tomcat.

I have tried Both mod_AJP and mod_HTTP

but can't print the remote_user, through my Restful java spring webservices. Yes, Tomcatauthentication="false" in server.xml.

Why I can't print REMOTE_USER Please Help.

Dan
  • 111
  • 3
  • How are you using `mod-rewrite`? – MrWhite Dec 05 '16 at 22:54
  • This is how I am using `mod-rewrite`: `RewriteEngine On RewriteCond %{LA-U:REMOTE_USER} (.+) RewriteRule .* - [E=RU:%1] RequestHeader set REMOTE_USER %{RU}e` In Apache access_logs I'm able to see the user name printing. But don't know how to capture it in java code. used getHeader(remote-user) and getRemoteUser(). @w3dk – Dan Dec 06 '16 at 16:28
  • Yes, that's the sort of thing I would have suggested (apart from the `RequestHeader` part. HTTP headers are usually of the form `Remote-User`. Is the `%{RU}e` expanded?). This is presumably directly in your server config, as opposed to `` section or `.htaccess` file? Have you tried accessing the _environment variable_ (`RU`) in your Java code? – MrWhite Dec 06 '16 at 18:07

0 Answers0