REMOTE_USER not coming in http headr.

Peter Schober peter.schober at univie.ac.at
Thu Nov 28 15:37:45 EST 2013


* H Sheth <h.sheth at tcs.com> [2013-11-28 20:51]:
> My application is being protected by Spring 2 framework. I have configured 
> Pre Auth filter of spring to retrieve  REMOTE_USER attribute from the HTTP 
> header. But I am not able to get this attribute from the  header. 

REMOTE_USER is not a HTTP header.

> Please let me know how to use Shibboleth IDP and Shibboleth SP for
> Authentication in my application.

By following the documentation:
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPJavaInstall

TL;DR: Don't use HTTP headers (or it won't be called REMOTE_USER nor
be available as request.getRemoteUser() in Java), use AJP from httpd
to the Servlet container, including the minimal required setup in
shibboleth2.xml
Or, alternatively, make up your own HTTP request header (it won't be
called REMOTE_USER as HTTP header name restritions apply) and learn
enough httpd to put the internal variable known as REMOTE_USER in
CGI-land into a HTTP request header (e.g. using mod_rewrite).
Or just STFW, https://www.google.com/search?q=httpd+proxy+remote_user

> Further how can I get attribute from the Shibboleth SP.

By following the documentation:
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess
Java example: request.getAttribute("Shib-Identity-Provider")
If you insist on using HTTP request headers instead, use the Java API
for accessing HTTP request headers (also mentioned in the docs above).
-peter


More information about the users mailing list