Last active
August 29, 2015 14:05
-
-
Save caspian311/edb437ac8c1ef8a031ae to your computer and use it in GitHub Desktop.
pass along an HTTP header containing the logged-in username for authenticated requests to backend reverse proxied services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LoadModule auth_kerb_module modules/mod_auth_kerb.so | |
| LoadModule rewrite_module modules/mod_rewrite.so | |
| <Location /services> | |
| AuthType Kerberos | |
| AuthName "Kerberos Login" | |
| KrbMethodNegotiate On | |
| KrbMethodK5Passwd On | |
| KrbAuthRealms <DOMAIN-NAME> | |
| Krb5KeyTab /etc/krb5.keytab | |
| require valid-user | |
| KrbVerifyKDC off | |
| RewriteEngine On | |
| RewriteCond %{LA-U:REMOTE_USER} (.+) | |
| RewriteRule . - [E=RU:%1,NS] | |
| RequestHeader set X-Remote-User "%{RU}e" env=RU | |
| </Location> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LoadModule proxy_module modules/mod_proxy.so | |
| ProxyRequests Off | |
| ProxyPass /services/ http://<remove-server>/services/ | |
| <Location /services> | |
| ProxyPassReverse /services | |
| </Location> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment