Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

CAS & LDAP Documentation #2

Open
mnquintana opened this issue Jul 1, 2014 · 0 comments
Open

CAS & LDAP Documentation #2

mnquintana opened this issue Jul 1, 2014 · 0 comments

Comments

@mnquintana
Copy link

Moved here from YaleSTC/reservations#496

See comments on that issue for more info.

Original issue text from @caseywatts:


We'd like to create some documentation for how to integrate Yale's CAS login and LDAP into a Ruby on Rails application.

Instructions

We should create a short gist (or two) in the YaleSTC organization that explains how to integrate Yale's LDAP into a Ruby on Rails application. We should also investigate what attributes Yale's LDAP has and define what they are to us, like how "uid" is their name for "netid". Maybe this could be easily formatted in a table in a .md file in this gist.

I should note that this will only work on servers running on Yale's campus. So this would work on either your machine or a Yale server, but not on Heroku or anything external like that. This is how Yale has the service configured.

Once we create our own documentation, we should share it back to the rubycas and net-ldap projects as an example (maybe as a pull request to edit the README with a link to our gist?).

Resources

Here's the gem's page (not particularly helpful)
https://github.com/ruby-ldap/ruby-net-ldap

Here's a relevant short script that uses LDAP:
https://github.com/YaleSTC/csv-to-ldap/blob/master/netid_to_email.rb

Bay Gross (HackYale, former STC employee) did a great job and made this gist two years ago. We could fork this to YaleSTC's organization and update/organize/format/document it more, or we can make our own and just include a line in the gist's readme referencing his good example.
https://gist.github.com/baygross/2054898

Here's some relevant code in Reservations (I probably didn't link to 100% of what's needed, but this should be a good starting point)
https://github.com/YaleSTC/reservations/blob/6265ef15738a8c2c202efd7e410e5c0d9c4e754a/Gemfile#L16
https://github.com/YaleSTC/reservations/blob/6265ef15738a8c2c202efd7e410e5c0d9c4e754a/app/models/user.rb#L1
https://github.com/YaleSTC/reservations/blob/6265ef15738a8c2c202efd7e410e5c0d9c4e754a/app/models/user.rb#L100
https://github.com/YaleSTC/reservations/blob/6265ef15738a8c2c202efd7e410e5c0d9c4e754a/app/controllers/users_controller.rb#L48

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant