Let's just assume that I don't know much about Kerberos - just the basics.
I have...
How do I use this information in a PHP script so that I don't need to log in to the website if the visitor has a kerberos ticket like that? I don't want Apache to handle the authentication. I need to find out which user is accessing the site via PHP.
Is that possible? If so: How?
What I have found out so far: I have to "enable" the domain in Firefox.
However that's about it...
mod_auth_kerb will handle for you actual authentication. After that, it will set REMOTE_USER and KRB5CCNAME environmental variables. Note that there are few caveats:
For your case I'd recommend to look at excellent how to by Tom McLaughlin: http://blogs.freebsdish.org/tmclaugh/2010/07/15/mod_auth_kerb-ad-and-ldap-authorization/
I'm not sure if this will help, but it looks like Apache will send PHP the username information with the modauthkerb package if you use the KrbSaveCredentials
parameter. You should get two global variables in php:
$_SERVER['REMOTE_USER']
$_SERVER['KRB5CCNAME']
http://archives.postgresql.org/pgsql-admin/2004-08/msg00144.php looks like they have got this working.
That way if you can see what the user is, it really isn't a requirement that php actually does the authentication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With