README.md in devise_ldap_authenticatable-0.4.2 vs README.md in devise_ldap_authenticatable-0.4.3

- old
+ new

@@ -5,19 +5,23 @@ If you are building applications for use within your organization which require authentication and you want to use LDAP, this plugin is for you. For a screencast with an example application, please visit: [http://random-rails.blogspot.com/2010/07/ldap-authentication-with-devise.html](http://random-rails.blogspot.com/2010/07/ldap-authentication-with-devise.html) +**_Please Note_** + +If you are using rails 2.x then use 0.1.x series of gem, and see the rails2 branch README for instructions. + Requirements ------------ - An LDAP server (tested on OpenLDAP) -- Rails 3.0.0.beta4 +- Rails 3.0.0.rc These gems are dependencies of the gem: -- Devise 1.1.rc2 +- Devise 1.1.1 - net-ldap 0.1.1 Installation ------------ @@ -25,16 +29,16 @@ This will *only* work for Rails 3 applications. In the Gemfile for your application: - gem "devise", "1.1.rc2" - gem "devise_ldap_authenticatable", "0.4.2" + gem "devise", "1.1.1" + gem "devise_ldap_authenticatable", "0.4.3" To get the latest version, pull directly from github instead of the gem: - gem "devise_ldap_authenticatable", :git => "git://github.com/cschiewek/devise_ldap_authenticatable.git", :branch => "rails3" + gem "devise_ldap_authenticatable", :git => "git://github.com/cschiewek/devise_ldap_authenticatable.git" Setup ----- @@ -99,10 +103,39 @@ * Mac OSX 10.6 * OpenLDAP 2.4.11 * REE 1.8.7 (2010.02) -All unit and functional tests are part of a sample rails application under test/rails_app and requires a working LDAP sever. There are config files and setup instructions under test/ldap +All unit and functional tests are part of a sample rails application under test/rails_app and requires a working LDAP sever. + +Build / Start Instructions for Test LDAP Server +----------------------------------------------- + +Make sure that directories test/ldap/openldap-data and test/ldap/openldap-data/run exist. + + 1. To start the server, run `./run_server.sh` + 2. Add the basic structure: `ldapadd -x -h localhost -p 3389 -x -D "cn=admin,dc=test,dc=com" -w secret -f base.ldif` + * this creates the users / passwords: + * cn=admin,dc=test,com / secret + * cn=example.user@test.com,ou=people,dc=test,dc=com / secret + 3. You should now be able to run the tests in test/rails_app by running: `rake` + + _For a LDAP server running SSL_ + + 1. To start the server, run: `./run_server.sh --ssl` + 2. Add the basic structure: `ldapadd -x -H ldaps://localhost:3389 -x -D "cn=admin,dc=test,dc=com" -w secret -f base.ldif` + * this creates the users / passwords: + * cn=admin,dc=test,com / secret + * cn=example.user@test.com,ou=people,dc=test,dc=com / secret + 3. You should now be able to run the tests in test/rails_app by running: `LDAP_SSL=true rake` + +**_Please Note_** + +In your system LDAP config file (on OSX it's /etc/openldap/ldap.conf) make sure you have the following setting: + + TLS_REQCERT never + +This will allow requests to go to the test LDAP server without being signed by a trusted root (it uses a self-signed cert) References ---------- * [Original Plugin](http://github.com/cschiewek/devise_ldap_authenticatable)