vendredi 6 novembre 2015

Simulate Siteminder with apache httpd server using modidy header and simple authentication

By using a reverse proxy in apache, you can enrich the header like Siteminder would do

Here below, the following directive will add the REMOTE_UID header filled with the credential you have used for the Basic authentication


<Location /myapp>
ProxyPass  ajp://localhost:8019/myapp
ProxyPassReverse https://myappsrv/myapp
AuthType Basic
AuthName "My App Authentication"
AuthUserFile /etc/httpd/conf/auth-conf
Require valid-user
RewriteEngine On
RewriteCond %{REMOTE_USER} (.*)
RewriteRule . - [E=RU:%1]
RequestHeader add REMOTE_UID %{RU}e env=RU

</Location>