To put this in context, for my app I only want kerberos to validate the user and then pass on the username to the app. It's a git deploy frontend, and I like blaming people.
You'll find a lot of stuff about doing a complicated rewrite so that REMOTE_USER actually evaluates before a reverse proxy. I couldn't get any of this stuff to work - not only that but it's a horrible solution anyway requiring about three lines of rewrite - and I'll be honest, I'm not up together on my apache rewrites anyway.
So the following is the solution I ended up with. It simply makes Apache forward on the REMOTE_USER variable, created by your auth module, to whatever you're reverse proxying - in my case a Sinatra app. It actually appears as REMOTE_USER as opposed to the specified REMOTE-USER as well. I neither know why nor care.
Excuse the formatting.
<Virtualhost *:443>
SSLEngine on
SSLCipherSuite ...
HA HA SSL BUSINESS
...
ServerName yer-mum.com
ProxyPassInterpolateEnv On
ProxyPass / http://localhost:4567/
RequestHeader set REMOTE-USER %{REMOTE_USER}s
<Location />
AuthType Kerberos
AuthName "AD Login"
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbAuthRealms MUMS.COM
Krb5KeyTab /etc/krb5.keytab
Require valid-user
</Location>
</Virtualhost *:443>
I feel compelled to note that I approve of this writing style. The post in no way helps me solve the issue I was searching about, but it entertained me anyway. :)
ReplyDeleteAlso, the OpenID thing below doesn't seem to work with arbitrary URLs, like the OpenID provider on my blog.
Heh, cheers dude. I have no idea about the OpenID thing, this is a pretty basic blogger instance and I really can't be assed to muck about with it because I'm lazy.
Delete