Menu

#518 LDAP User Attrib

Future_Requests
open
nobody
LDAP (6)
1
2022-03-14
2022-03-03
Anonymous
No

Hi, we have aliases as multivalue CN on LDAP. My ldap_user_attrib is set to singlevalue attribute, like UID. In Debug it's OK, when tries to log with username "Doe" which UID is 12345678, debug sayz "User '12345678' found". But in MRBS database "mrbs_entry" is create_by "doe". When I login using number 12345678, I'm different user for MRBS. Please, can You fix it?

Discussion

  • Anonymous

    Anonymous - 2022-03-10

    Figured out fix for this situation.

    Insert this "$username = $object['user']['username'];" before line 347 contains "$user = parent::getUser($username);" in file \lib\MRBS\Auth\AuthLdap.php.

     
  • Campbell Morrison

    Thanks. I've now committed this fix in 2bfdb8d.

     
  • Anonymous

    Anonymous - 2022-03-10

    Thank you. But let me ask question.

    Your implementation is just one line "$user = parent::getUserFresh($object['user']['username']);". I don't investigate it further, but don't this broke cache, because cache update uses variable $username at the end of function? Or it's not important?

     
  • Campbell Morrison

    You have modified the method getUser() in the MRBS 1.10.0 code. However in the main branch the code has been restructured and I have modified the method getUserFresh() where there is no cache (the caching is still done in getUser()). So I think everything should be OK.

     
  • Campbell Morrison

    Could you test the main branch please just to make sure that the fix works? You can download the code from here. Follow the green Code button and treat it like an upgrade.

     
  • Anonymous

    Anonymous - 2022-03-14

    However in the main branch the code has been restructured

    Oh, i see. I tested main branch and everything looks fine. Thank's a lot.

     
MongoDB Logo MongoDB