Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

CAS & LDAP Documentation #496

Closed
caseywatts opened this issue Mar 23, 2014 · 5 comments
Closed

CAS & LDAP Documentation #496

caseywatts opened this issue Mar 23, 2014 · 5 comments

Comments

@caseywatts
Copy link
Collaborator

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)

#ldap integration

require 'net/ldap'

def self.search_ldap(login)

if params[:possible_netid]

@caseywatts
Copy link
Collaborator Author

We have this too I just found!
https://github.com/YaleSTC/wiki/wiki/Using-CAS

@caseywatts
Copy link
Collaborator Author

A new question arises:
Can something on a server outside of Yale somehow access LDAP via an API key or something? Lori is investigating!

@caseywatts
Copy link
Collaborator Author

@mnquintana
Copy link
Contributor

This is definitely a good idea but it should be filed probably in the YaleSTC/wiki repo, since this isn't Reservations-specific.

@mnquintana
Copy link
Contributor

Moved to YaleSTC/wiki#2

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

2 participants