OverviewActive Authentication is a modified version of acts_as_authentication designed to authenticate users against Active Directory and automatically adds them to the database.
InstallationInstallation is similar to acts_as_authenticated, first you install the plugin:
./script/plugin install http://activeauthentication.googlecode.com/svn/trunk/activeauthenticationNext generate your model and migrate the database:
./script/generate authenticated user account
rake db:migrateNow include the authenticated system in your application.rb file:
include AuthenticatedSystemAdd a filter to any controller you want to protect:
before_filter :login_requiredAnd finally, modify config/active_directory.yml to match your environment.
TroubleshootingIf you are experiencing problems such as
MissingSourceFile (no such file to load -- ldap):
.//app/controllers/account_controller.rb:2You may need to install the ruby ldap libraries. On Ubuntu that can be accomplished with the following command:
sudo apt-get install libldap-ruby1.8FedoraFor those of you using Fedora, Geoffrey Gouez has the following advice (Thanks Geoffrey!):
For fedora 7 (and maybe core 5 and 6), using activeauthentication throws missing file exception.
This files are include in previous version of openssl rpm and are replaced by .so.6
For resolve problem, just links files in /lib directory like this :
ln /lib/libcrypto.so.6 /lib/libcrypto.so.5
ln /lib/libssl.so.6 /lib/libssl.so.5