
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
UCB::LDAP is a wrapper module around Net::LDAP intended to simplify searching the UC Berkeley LDAP directory: http://directory.berkeley.edu
If you are blissfully ignorant of LDAP, you should familiarize yourself with some of the basics. Here is a great online resource: http://www.zytrax.com/books/ldap
The RDoc for the ruby-net-ldap Gem (http://rubyfurnace.com/docs/ruby-net-ldap-0.16.1/classes/Net/LDAP.html) also has a good introduction to LDAP.
Version 3 and higher of this gem support changes made to LDAP in 2017 as described here. This involved a substantial reduction of data that had been available in older versions.
To upgrade, point your Gemfile to the latest version of ucb-ldap, run your test suite and look for deprecation warnings. All of the methods that wrapped deprecated LDAP attributes are still in place, but they will emit warnings and will be remove in version 4.
Most of the Person
attributes are still in place, but the following classes have been deprecated completely:
Address
JobAppointment
Namespace
Service
StudentTerm
If you need access to any data that used to be in these modules, check with other campus resources (e.g. HCM)
Search the directory specifying tree base and filter, getting back generic UCB::LDAP::Entry
instances:
entries = UCB::LDAP::Entry.search(:base => "ou=people,dc=berkeley,dc=edu", :filter => {:uid => 123})
entries.class #=> Array
entries[0].class #=> UCB::LDAP::Entry
entries[0].uid #=> '123'
entries[0].givenname #=> 'John'
entries[0].sn #=> 'Doe'
See UCB::LDAP::Entry
for more information.
Search the Person tree getting back UCB::LDAP::Person instances:
person = UCB::LDAP::Person.find_by_uid("123")
person.firstname #=> "John"
person.affiliations #=> ['EMPLOYEE-TYPE-STAFF']
person.employee? #=> true
person.employee_staff? #=> true
person.employee_academic? #=> false
person.student? #=> false
See UCB::LDAP::Person
for more information.
Search the Org Unit tree getting back UCB::LDAP::Org
instances:
dept = UCB::LDAP::Org.org_by_ou('jkasd')
dept.deptid #=> "JKASD"
dept.name #=> "Administrative Systems Dept"
See UCB::LDAP::Org
for more information.
If you want access the directory anonymously, no credentials are required. If you want to access via a privileged bind, authenticate before querying:
p = UCB::LDAP::Person.find_by_uid("123")
p.non_public_attr #=> NoMethodError
UCB::LDAP.authenticate("mybind", "mypassword")
p = UCB::LDAP::Person.find_by_uid("123")
p.non_public_attr #=> "some value"
FAQs
Unknown package
We found that ucb_ldap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.