{"id":51,"date":"2009-02-23T20:24:59","date_gmt":"2009-02-23T18:24:59","guid":{"rendered":"http:\/\/new.cs-ware.de\/?p=51"},"modified":"2013-05-02T00:33:47","modified_gmt":"2013-05-01T22:33:47","slug":"apache-httpd-ldap-auth-canonicalize-username","status":"publish","type":"post","link":"https:\/\/www.cs-ware.de\/blog\/archives\/51","title":{"rendered":"Apache httpd ldap-auth: canonicalize usernames"},"content":{"rendered":"<p>I created a <a href=\"\/blog\/wp-content\/uploads\/2009\/02\/apache-ldap-username.patch\">patch<\/a> for Apache httpd for ldap-authentication (reported <a href=\"https:\/\/issues.apache.org\/bugzilla\/show_bug.cgi?id=46646\">upstream as bug #646646<\/a>). In my scenario I used<\/p>\n<p><code>AuthLDAPRemoteUserAttribute uid<br \/>\nAuthLDAPGroupAttribute memberUid<br \/>\nAuthLDAPGroupAttributeIsDN Off<br \/>\nAuthBasicProvider ldap<\/p>\n<p>require ldap-group cn=Domain Admins,ou=Group, dc=DOMAIN,dc=de<\/code><\/p>\n<p>We always used lowercased usernames in memberUid. Some users tended to enter their usernames with a leading uppercase char. Password authentication worked, however, memberUid (from posixGroup, which is also used by samba domain groups) is case sensitive &#8211; so group authorization failed.<\/p>\n<p>In order to fix this issue I created a patch for Apache httpd which allows to configure that the username Apache httpd uses is replaced by the &#8220;AuthLDAPRemoteUserAttribute&#8221;-field value of the ldap-result. This also helps to canonicalize usernames (in logs and REQUEST_USER environ variable) in the way that always the same casing and also for (ldap-)aliases the same username is used.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I created a patch for Apache httpd for ldap-authentication (reported upstream as bug #646646). In my scenario I used AuthLDAPRemoteUserAttribute uid AuthLDAPGroupAttribute memberUid AuthLDAPGroupAttributeIsDN Off AuthBasicProvider ldap require ldap-group cn=Domain Admins,ou=Group, dc=DOMAIN,dc=de We always used lowercased usernames in memberUid. Some users tended to enter their usernames with a leading uppercase char. Password authentication worked, however, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2],"tags":[10],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-linux","category-patches","tag-apache-httpd"],"_links":{"self":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":12,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/posts\/51\/revisions\/123"}],"wp:attachment":[{"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cs-ware.de\/blog\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}