ccs-calendarserver icon indicating copy to clipboard operation
ccs-calendarserver copied to clipboard

[LDAP] uid mapping not taken into account

Open Senso opened this issue 7 years ago • 0 comments

I have LDAP setup and can bind to it. I also have the following in my plist.conf:

        <key>mapping</key>
        <dict>
          <key>uid</key>
          <array>
            <string>mail</string>
          </array>

Our company LDAP is made in such a way that our uids are not descriptive enough and we require everybody to use their email address as their username everywhere.

Yet, every time I try to log in with my email address, I get an error like this: [caldav-0] [txweb2.dav.resource#info] Could not find the principal resource for user id: [email protected]

And in my OpenLDAP logs, on the server: conn=2952 op=2 SRCH base="<snip>" scope=2 deref=0 filter="([email protected])"

No matter how I change the config, it still always try to bind using uid=. Right now I got a workaround by doing an ugly hack:

.develop/virtualenv/src/twextpy/twext/who/ldap/_service.py
677a678
+                         filteredQuery = filteredQuery.replace('uid=', 'mail=')

is it possible that uid is NOT supposed to by mapped to anything else? In that case, I'll have to stay with code tweaks to make it work.

Senso avatar Jun 02 '17 05:06 Senso