1

I've successfully configured mod_proxy_ajp from my httpd to Tomcat, with httpd performing the SSL and basic authentication. I need the remote user in my tomcat application, so I thought using AJP would population the headers so HttpServletRequest.getRemoteUser() would give me the username, but it is 'null'. However HttpServletRequest.getRemoteHost() is populated correctly.

What do I need to do to get the remote user from httpd basic authentication in my tomcat servlet?

dacracot
  • 469
  • 2
  • 13
  • 28
  • 1
    Found the answer... [Forward REMOTE_USER to tomcat via AJP][1] [1]: http://stackoverflow.com/questions/13749065/forward-remote-user-to-tomcat-via-ajp-e-g-for-shibboleth – dacracot Aug 19 '15 at 18:43

1 Answers1

1

Found the answer on StackOverflow... Forward REMOTE_USER to tomcat via AJP

Bottom line is you must add tomcatAuthentication="false" to your AJP connector.

The default...

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 

...becomes...

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" tomcatAuthentication="false" /> 
dacracot
  • 469
  • 2
  • 13
  • 28