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

CAS & LDAP Documentation #2

Open
@mnquintana

Description

@mnquintana

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions