View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18992Feature requestsPluginspublic2023-07-28 16:09
Reporterlmctv Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary18992: AuthLDAP plugin: allow reusing the bind-checked connection for ldap entry reading
Description

In some environments, bind-dn user can only search/read the naming attributes, while all the other ones are reserved for the entry itself "self", or privileged entries.

Since such configuration option is needed in my environment, I'm already using the implementation I'm going to propose via a GH pull request.

TagsNo tags attached.
Bug heat6
Story point estimate0
Users affected %0

Users monitoring this issue

DenisChenu

Activities

DenisChenu

DenisChenu

2023-07-28 11:27

developer   ~76334

Something i don't understand : with or without boundconnection : connection is done by same user, no ?

Test connection is done by bind user, and you still use this connection. no ?

Else : in your system : why not use Simple bind ?

lmctv

lmctv

2023-07-28 14:32

reporter   ~76345

  1. No, if you look at the original version of AuthLDAP's _createNewUser, when $ldapmode is set to 'searchandbind', the connection is bound to the binddn (admin) user or to the anonymous one (lines 244 and 247). In our case, there is a need for the search to be done by the entry itself, to get at its attributes.

  2. We use 'searchandbind' instead of 'simplebind' since there entries stad within different search bases.

DenisChenu

DenisChenu

2023-07-28 15:30

developer   ~76347

Hi

when $ldapmode is set to 'searchandbind', the connection is bound to the binddn (admin) user or to the anonymous one

Yes, i confirm

In our case, there is a need for the search to be done by the entry itself,

Ok, but i don't understand where LDAP->user was set in your current PR. Seems to be adlin (use same logic thath Auth part)

lmctv

lmctv

2023-07-28 16:09

reporter   ~76348

In my PR, if ldapreadonboundconn is set, I skip the ldap_close($ldapconn); at (original) line 558, just after the check for succesful bind, and pass the already bound to the user connection to $this->_createNewUser at (original) line 572; therefore, the search at (original) line 266 takes place on the connection bound to the correct user.

Issue History

Date Modified Username Field Change
2023-07-27 18:14 lmctv New Issue
2023-07-28 11:22 DenisChenu Issue Monitored: DenisChenu
2023-07-28 11:22 DenisChenu Bug heat 0 => 2
2023-07-28 11:27 DenisChenu Note Added: 76334
2023-07-28 11:27 DenisChenu Bug heat 2 => 4
2023-07-28 14:32 lmctv Note Added: 76345
2023-07-28 14:32 lmctv Bug heat 4 => 6
2023-07-28 15:30 DenisChenu Note Added: 76347
2023-07-28 16:09 lmctv Note Added: 76348