Reverse proxy/ADFS/REMOTE_USER
Jason Gauthier
jgauthier at lastar.com
Mon Dec 16 13:28:32 EST 2013
>And it never will, you can't do that. You can send a header, provided you prevent all access to the back-end by anything but the proxy. That's it.
>REMOTE_USER is not a header.
>>I fought with this for a while thinking it was apache, and finally
>>broke down and tested this with Apache¹s basic authentication.
>>REMOTE_USER was sent to the backend.
>No, it wasn't. That isn't physically possible in HTTP. REMOTE_USER is something established locally on a web server, it never crosses a proxy boundary.
>>I can tweak about 3 lines in Apache to back and forth between basic and
>>shib.
>>I am using ADFS as my IDP, and Shib is acting as an SDP in this case.
>>I¹m not sure where the issues is, and this setup is not a strength, so
>>I am not sure where to even begin.
>I would start by figuring out what it's actually doing that mistakenly looks like forwarding REMOTE_USER. Once you establish what it's doing, it can be determined >whether there is something to emulate.
AH! Thanks! Along with your clarity and the previous shib documentation I read, I believe I understand what is happening.
My backend application, seemingly, (according to phpinfo()) is using REMOTE_USER. But it must not be.
When I reference "REMOTE_USER" directly (.$_SERVER["PHP_REMOTE_USER"]) it is blank. This is what I now expect based on what you indicated with REMOTE_USER being strictly a local server variable.
However, when using basic authentication, something else is being passed that somehow satisfied the applications login checks. I checked the code (yay for open source), and determined that it is using PHP_AUTH_USER or REDIRECT_REMOTE_USER to satisfy its login condition as well.
I thought this would be an easy Apache win by using a RequestHeader and setting REDIRECT_REMOTE_USER based on REMOTE_USER.
This should satisfy the backend, but the new header is blank as well.
Is there anything specific I need to do in shib in this regard?
This may be in the documents I have been pouring over, but if so, I am not seeing what I am looking for.
More information about the users
mailing list