简体   繁体   中英

Using Ruby to access LDAP DIT

We use ACLs to grant access to svn repositories. The users/groups are stored in LDAP (openLDAP 2.4 (LDAP3). Does anyone know or used libraries/package (gems) I can use. Basically, I will traverse LDAP DIT and update my svn file based on that.

  1. Connect to ldaps://xxxxxxxxxxx:636
  2. Traverse DIT (subtree based on 'ou')
  3. Read attributes
  4. Write svn ACL file.

That's the high-level overview of what I would need to do. So, my question is regarding ldap package/library that I could use. I have heard of Net::LDAP. I'm very new to Ruby, so, I'm learning it as I go along.

Also, please correct me if I am mistaken. We are using ldaps:// that means when I connect to ldap server, the server will send a certificate. Do I need to do anything special to handle the certificate? Thank you

I have used Ruby/LDAP before, things worked fine with me. There is a code example that comes with the gem. Also have a look at the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM