Setting up Apache to use SASLAUTHD
Using SASLAUTHD is a way to protect web pages using Kerberos authentication.
Packages Required
- apache2
- libapache2-mod-authn-sasl
- libsasl2-2
- libsasl2-modules-gssapi-mit
- sasl2-bin
/etc/default/sasl
Set the authentication mechanism to "kerberos5".
MECHANISMS="kerberos5"
Add the www-data user to the sasl group
adduser www-data sasl
Configure Apache
Enable the authn_sasl module.
a2enmod authn_sasl
Update the Apache site configuration to protect either a directory or a location.
<Directory /var/www/html>
Options MultiViews Includes
AllowOverride None
Order allow,deny
allow from all
AuthType Basic
AuthName "LDAP Protected Data"
AuthBasicProvider sasl
AuthBasicAuthoritative On
AuthSaslPwcheckMethod saslauthd
Require valid-user
</Directory>