Active DIrectory


#1

I am building a application for my university and I would like to make
this
application authenticate agains a Active Directory server. I would like
to
know if there is an already built solution for this somewhere online ?

Thanks


#2

On Thu, 2006-06-08 at 20:06 -0400, Nicolas K. wrote:

I am building a application for my university and I would like to make
this application authenticate agains a Active Directory server. I
would like to know if there is an already built solution for this
somewhere online ?


I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

Craig


#3

Craig W. wrote:

I haven’t authenticated against Active Directory but I have used

I guess that could work. Can you send me some code samples ?

Thanks.

Nic


#4

On Thu, 2006-06-08 at 22:38 -0400, Nicolas K. wrote:


I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

I guess that could work. Can you send me some code samples ?


http://wiki.rubyonrails.org/rails/pages/LDAPFunctions

http://ruby-ldap.sourceforge.net/

Craig


#5

On 6/8/06, Craig W. removed_email_address@domain.invalid wrote:

On Thu, 2006-06-08 at 20:06 -0400, Nicolas K. wrote:

I am building a application for my university and I would like to make
this application authenticate agains a Active Directory server. I
would like to know if there is an already built solution for this
somewhere online ?
I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

Also make sure you check out Net::LDAP for Ruby
(http://rubyforge.org/projects/net-ldap). Although it’s relatively
new, it’s pure Ruby and requires no additional libraries or
compilation. Additionally, the developer (Francis C.) is very
responsive.

-austin


#6

I’ve also started a project to deliver ActiveDirectory-specific
functionality to Ruby. It’s on RubyForge (http://rubyforge.org/frs/?
group_id=1580) and as a gem (gem install activedirectory). It
requires Ruby::LDAP, but I’m looking at Net::LDAP as mentioned here
by Austin Z. and will likely make it an option if it works out
well enough.

It’s pretty well documented, just rdoc it or view the docs through
gem_server.

Justin


#7

On 6/8/06, Nicolas K. removed_email_address@domain.invalid wrote:

I am building a application for my university and I would like to make this
application authenticate agains a Active Directory server. I would like to
know if there is an already built solution for this somewhere online ?

I’ve put together a fairly simple plugin that does it [1], which I use
on one of my sites. It requires Ruby::LDAP. Here’s an example:

require ‘simple_ldap_authenticator’
SimpleLdapAuthenticator.servers = %w’dc1.domain.com dc2.domain.com
SimpleLdapAuthenticator.use_ssl = true
SimpleLdapAuthenticator.login_format = ‘removed_email_address@domain.invalid’
SimpleLdapAuthenticator.logger = RAILS_DEFAULT_LOGGER

class LoginController < ApplicationController
def login
return redirect_to(:action=>‘try_again’) unless
SimpleLdapAuthenticator.valid?(params[:username], params[:password])
session[:username] = params[:username]
end
end

[1] http://wiki.rubyonrails.org/rails/pages/Simple+LDAP+Authenticator


#8

Justin Mecham wrote:

Justin
Cool. I’m also looking at Net::LDAP. But I will surely look into that
gem.