500 error w/ mod_auth_kerb and mod_authnz_ldap
Saxon, Will <Will.Saxon <at> viterahealthcare.com>
2012-11-27 22:50:12 GMT
Hello,
I'm trying to set up an LDAP group-controlled, Kerberos-authenticated web service, with the KRB5 and LDAP
requests targeting Active Directory. The environment I'm working with is CentOS 6.3, mod_auth_kerb 5.4
and the authnz_ldap module shipping with Apache 2.2.15.
The configuration I'm working with is pretty standard and similar to what I've seen in the archives on this list:
<Directory /var/www/git>
Options +ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex gitweb.cgi
AuthType Kerberos
KrbAuthoritative On
KrbAuthRealms EXAMPLE.COM
KrbMethodNegotiate On
KrbMethodK5Passwd On
AuthzLDAPAuthoritative On
AuthLDAPBindDN "CN=LDAP,OU=Service Accounts,DC=example,DC=com"
AuthLDAPBindPassword SuperDuperSecret
AuthName "Please Login"
AuthLDAPURL "ldap://example.com:389/DC=example,DC=com?userPrincipalName?sub?(|(objectClass=user)(objectClass=group))"
require ldap-group CN=gitAdmins,OU=Groups,DC=example,DC=com
</Directory>
If a user authenticates successfully and is a member of gitAdmins, pages load fine. The problem I'm having
is that when a user is NOT in the gitAdmins group, instead of getting a 401 error or an authentication
prompt, I get a 500 configuration error. I'm mailing here because the error logs show entries like this:
[error] [client 192.168.0.10] gss_display_name() failed: A required input parameter could not be read:
An invalid name was supplied (, Unknown error)
I've attached a .txt file with the scrubbed apache error logs from a failed page load.
I've tried changing the above to have different authoritative settings for krb and ldap without success.
If I have AuthzLDAPAuthoritative set to 'off' and stick a 'require valid-user' in the config, I get the
expected behavior. If I instead stick a 'require user fakeUser' in the config, I get the 500 error again.
Is this something I'm configuring incorrectly? Is this even a mod_auth_kerb issue?
Thanks for any assistance.
-Will
--
Will Saxon
Systems Administrator III
13545 Progress Blvd., Alachua, FL 32615
877-932-6301 Main
386-418-7341 Direct
viterahealthcare.com
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1278): [client 192.168.0.10] Acquiring creds for HTTP <at> gerrit
[debug] src/mod_auth_kerb.c(1691): [client 192.168.0.10] Verifying client data using KRB5 GSS-API
[debug] src/mod_auth_kerb.c(1707): [client 192.168.0.10] Client didn't delegate us their credential
[debug] src/mod_auth_kerb.c(1726): [client 192.168.0.10] GSS-API token of length 163 bytes will be
sent back
[debug] mod_authnz_ldap.c(709): [client 192.168.0.10] ldap authorize: Creating LDAP req structure
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for member:
CN=Test User,CN=Users,DC=example,DC=com (CN=Gitweb-test,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for
uniquemember: CN=Test User,CN=Users,DC=example,DC=com (CN=Gitweb-test,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(839): [9612] auth_ldap authorise: require group: testing for group
membership in "CN=gitAdmins,OU=Groups,DC=example,DC=com"
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for member:
CN=Test User,CN=Users,DC=example,DC=com (CN=gitAdmins,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(861): [9612] auth_ldap authorise: require group
"CN=gitAdmins,OU=Groups,DC=example,DC=com": authorisation failed [Comparison false (adding to
cache)][Compare False]
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for
uniquemember: CN=Test User,CN=Users,DC=example,DC=com (CN=gitAdmins,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(861): [9612] auth_ldap authorise: require group
"CN=gitAdmins,OU=Groups,DC=example,DC=com": authorisation failed [Comparison no such attribute
(adding to cache)][No such attribute]
[debug] mod_authnz_ldap.c(997): [9612] auth_ldap authorise: authorisation denied
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1278): [client 192.168.0.10] Acquiring creds for HTTP <at> gerrit
[debug] src/mod_auth_kerb.c(1691): [client 192.168.0.10] Verifying client data using KRB5 GSS-API
[debug] src/mod_auth_kerb.c(1707): [client 192.168.0.10] Client didn't delegate us their credential
[debug] src/mod_auth_kerb.c(1726): [client 192.168.0.10] GSS-API token of length 163 bytes will be
sent back
[debug] mod_authnz_ldap.c(709): [client 192.168.0.10] ldap authorize: Creating LDAP req structure
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for member:
CN=Test User,CN=Users,DC=example,DC=com (CN=Gitweb-test,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for
uniquemember: CN=Test User,CN=Users,DC=example,DC=com (CN=Gitweb-test,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(839): [9612] auth_ldap authorise: require group: testing for group
membership in "CN=gitAdmins,OU=Groups,DC=example,DC=com"
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for member:
CN=Test User,CN=Users,DC=example,DC=com (CN=gitAdmins,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(861): [9612] auth_ldap authorise: require group
"CN=gitAdmins,OU=Groups,DC=example,DC=com": authorisation failed [Comparison false
(cached)][Compare False]
[debug] mod_authnz_ldap.c(845): [9612] auth_ldap authorise: require group: testing for
uniquemember: CN=Test User,CN=Users,DC=example,DC=com (CN=gitAdmins,OU=Groups,DC=example,DC=com)
[debug] mod_authnz_ldap.c(861): [9612] auth_ldap authorise: require group
"CN=gitAdmins,OU=Groups,DC=example,DC=com": authorisation failed [Comparison no such attribute
(cached)][No such attribute]
[debug] mod_authnz_ldap.c(997): [9612] auth_ldap authorise: authorisation denied
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1278): [client 192.168.0.10] Acquiring creds for HTTP <at> gerrit
[debug] src/mod_auth_kerb.c(1691): [client 192.168.0.10] Verifying client data using KRB5 GSS-API
[debug] src/mod_auth_kerb.c(1707): [client 192.168.0.10] Client didn't delegate us their credential
[debug] src/mod_auth_kerb.c(1726): [client 192.168.0.10] GSS-API token of length 92 bytes will be sent back
[debug] src/mod_auth_kerb.c(1138): [client 192.168.0.10] GSS-API major_status:01020000, minor_status:00000000
[error] [client 192.168.0.10] gss_display_name() failed: A required input parameter could not be read:
An invalid name was supplied (, Unknown error)
[debug] src/mod_auth_kerb.c(1939): [client 192.168.0.10] kerb_authenticate_user entered with user
(NULL) and auth_type Kerberos
[debug] src/mod_auth_kerb.c(1278): [client 192.168.0.10] Acquiring creds for HTTP <at> gerrit
[debug] src/mod_auth_kerb.c(1691): [client 192.168.0.10] Verifying client data using KRB5 GSS-API
[debug] src/mod_auth_kerb.c(1707): [client 192.168.0.10] Client didn't delegate us their credential
[debug] src/mod_auth_kerb.c(1726): [client 192.168.0.10] GSS-API token of length 92 bytes will be sent back
[debug] src/mod_auth_kerb.c(1138): [client 192.168.0.10] GSS-API major_status:01020000, minor_status:00000000
[error] [client 192.168.0.10] gss_display_name() failed: A required input parameter could not be read:
An invalid name was supplied (, Unknown error)
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
_______________________________________________
modauthkerb-help mailing list
modauthkerb-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/modauthkerb-help