Modify ↓
Opened 9 years ago
Closed 7 years ago
#13095 closed defect (fixed)
DirectoryAuth - broken ldap connections
| Reported by: | Martin Kofahl | Owned by: | bebbo |
|---|---|---|---|
| Priority: | normal | Component: | DirectoryAuthPlugin |
| Severity: | major | Keywords: | patch |
| Cc: | Alexey | Trac Release: | 1.0 |
Description
In particular cases (currently unknown -- firewall setup, broken server software, maybe even libldap), an existing ldap connection resp. the connection object gets invalid.
After successful authentication, permissions are revoked after some time (depending on cache_timeout):
Dispatching <RequestWithSession "GET '/admin'"> Retrieving session for ID u'username' Checking permission called with: action(TRAC_ADMIN), username(username), resource(<Resource u'admin:general/basics'>), perm(<trac.perm.PermissionCache object at 0x7fbaf32e4a50>) _dir_search: searching ou=users,dc=example,dc=com for (&(uid=username)(objectClass=person))(6e115com0601a78ac47ca2600bf695142) _bind_dir: attempting general bind to ldaps://ldap.example.com:636 as cn=Trac Authentication,cn=Technical DNs,cn=config _bind_dir: Bound to ldaps://ldap.example.com:636 correctly. _dir_search: starting LDAP search of ldaps://ldap.example.com:636 ou=users,dc=example,dc=com using (&(uid=username)(objectClass=person)) for ['uid'] _ldap_search: ldap query with page size 1000 _ldap_search: serverControls: [] _ldap_search: result = [] _dir_search: dir miss.
Adding a trace_file in auth.py, libldap only reports SERVER_DOWN.
Although the DirectoryAuthPlugin makes use of the ReconnectLDAPObject, bind_s is the only call benefit from it. All other methods are call asynchronous, not handling SERVER_DOWN exceptions.
Attachments (1)
Change History (6)
Changed 9 years ago by
| Attachment: | directoryauthplugin_reconnect.patch added |
|---|
comment:1 Changed 9 years ago by
As a workaround, the new setting dir_reconnect can be set to True making Trac to always reconnect the ldap server.
comment:2 Changed 8 years ago by
| Cc: | Alexey added |
|---|
comment:3 Changed 8 years ago by
| Keywords: | patch added |
|---|
comment:5 Changed 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note: See
TracTickets for help on using
tickets.



configuration dir_reconnect = False|True