Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

[LDAP] uid mapping not taken into account #485

Open
Senso opened this issue Jun 2, 2017 · 0 comments
Open

[LDAP] uid mapping not taken into account #485

Senso opened this issue Jun 2, 2017 · 0 comments

Comments

@Senso
Copy link

Senso commented Jun 2, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant