I have this in my Apache conf file:
<IfModule headers_module>
SetEnv ntPrincipal "user@domain.com"
SetEnv legalGivenNames "Me"
SetEnv legalFamilyName "LastName"
SetEnv email "user@domain.com"
SetEnv partyId "123456"
SetEnv lang "eng"
#Set Env activeDirectoryGroup "Domain\GroupA"
</IfModule>
This enables the following in PHP $_SERVER['ntPrincipal']
.
The reason for this is to fake similar headers in our local development environments that are automatically injected (via Shibboleth) in our dev/test/prod environments. This works fine for Apache/PHP.
The problem, my local environment now has to proxy to Jetty (unrelated independent app) and forward those same headers.
Here is my Apache configuration:
ProxyPass /daisy/ http://127.0.0.1:8888/
ProxyPassReverse /daisy/ http://127.0.0.1:8888/
ProxyHTMLURLMap http://127.0.0.1 /daisy/
<Location /daisy/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap http://127.0.0.1:8888 /daisy/
ProxyHTMLURLMap / /daisy/
ProxyHTMLURLMap /daisy/ /daisy/
RequestHeader unset Accept-Encoding
</Location>
Update 1
Enumeration<String> headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String headerName = headerNames.nextElement();
System.out.println(headerName);
Enumeration<String> headers = request.getHeaders(headerName);
while (headers.hasMoreElements()) {
String headerValue = headers.nextElement();
System.out.println(headerValue);
}
}
This piece of code lists all headers sent to Jetty. In this case, the headers available in PHP aren't available on Jetty.