Ubuntu – Switch to Kerberos Authentication with Apache2 on Ubuntu (LDAP or AD)

apache-2.4kerberosUbuntu

I'm considering to switch my intranet apps to Kerberos authentication.(currently NTLM but modules required are not maintained anymore and will in not work anymore once the web server is updated to newest release (Ubuntu)).

I'm completely new to this plus I'm not directly in my corporations IT department. It's a huge corporation and dealing with IT is a PITA. So my question also revolves around the fact if I need IT do something for me to make this work.

I can see on my company laptop using klist I have 3 tickets:

krbtgt/MYCOMPANY.COM@MYCOMPANY.COM

ldap/ldap.mycompany.com@MYCOMPANY.COM

and last one is for my laptop (eg. server = my laptop)

I alos already have a generic ldap user for querying ldap for authorization.

My question is if I can configure my web server to reuse the existing ldap ticket for authentication? And if yes how I would do that?

Best Answer

You cannot share LDAP/... ticket to authenticate in httpd. Neither you can share keytab file, even within the same host, as it has to provide credentials for HTTP/... principal. There is an option in httpd's mod_auth_kerb (named KrbServiceName) to "rename" principal used, but I haven't tried and I doubt it can work, as the clients will try to use standard names.

There are many howtos on how to configure Apache httpd with AD + Kerberos-based single sign-on. Start from reading mod_auth_kerb manual. Things to remember include: reverse DNS entries matching forward DNS, time synchronization, default realm name in /etc/krb5.conf file, KVNO in ktpass command. In case of problems, try (temporarily!) set KrbVerifyKDC off and LogLevel debug in Apache config.

Related Topic