Skip to content

Instantly share code, notes, and snippets.

@gmambro
Last active February 5, 2016 16:57
Show Gist options
  • Save gmambro/f0d59ea510416a37cfbd to your computer and use it in GitHub Desktop.
Save gmambro/f0d59ea510416a37cfbd to your computer and use it in GitHub Desktop.
Configuration for kerberos authentication and ldap authorization with Apache
<Location /login>
Order deny,allow
AuthType Kerberos
AuthName "Trac"
KrbAuthoritative On
KrbVerifyKDC Off
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbAuthRealms CONTOSO.COM
Krb5KeyTab /etc/httpd/httpd.keytab
# displayName and mail attributes can be used in the application via env vars
# e.g. https://trac-hacks.org/wiki/ApacheUserInfoPlugin
AuthLDAPURL "ldap://contoso.com/DC=contoso,DC=com?userPrincipalName,displayName,mail?sub?(objectClass=user)"
AuthLDAPBindDn "trac_bind@contoso.com"
AuthLDAPBindPassword "supersecret"
AuthLDAPBindAuthoritative off
Require ldap-group CN=TracUsers,CN=Groups,DC=contoso,DC=com
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment