Forum: Ruby on Rails Re: Rails and Windows Active Directory Authentication?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mike (Guest)
on 2006-02-21 22:16
(Received via mailing list)
>         <removed_email_address@domain.invalid>
> For MS AD authentication I am currently using:
>             return false if password.to_s.size == 0
>
>         #   sqlserver_adapter.rb -- ActiveRecord adapter for Microsoft
> SQL Server
>         #
>         #   Author: Joey G. <removed_email_address@domain.invalid>
>         #   Date:   10/14/2004
>         #
>         #   Modifications: DeLynn B. <removed_email_address@domain.invalid>
>         #   Date: 3/22/2005
>
>
>
Thank you very much for this start. Are you storing any objects (aside
from
user & pass) in AD that you are retrieving into the session hash?

Again, many thanks!
unknown (Guest)
on 2006-02-22 00:22
(Received via mailing list)
> > For MS AD authentication I am currently using:
> >   * Installed ruby-ldap
> >   * Installed login_generator gem and let the generator build its basic
> setup
> >   * Modified the generated user model:
>
> Thank you very much for this start. Are you storing any objects (aside from
> user & pass) in AD that you are retrieving into the session hash?

At present, I'm just using AD for an authentication yes/no.  I will soon
need
some authorization, but have not yet decided how I want to proceed.  I
want to
look at Ezra Z.'s acl_system plugin and perhaps hook that in
with
LDAP to map AD groups to application roles.

I explored ActiveLDAP for a time, but it has more features than I needed
and
I didn't want to mess around at the time with getting access to the
schema so
it could be "Active".
William G. (Guest)
on 2006-02-23 21:23
(Received via mailing list)
Here's a strange bug:

Mac OS X 10.4.5
OpenLDAP - provided my MAC OS X
Ruby-LDAP 0.9.3
Rails 1.0.0

Compiled and loaded Ruby-LDAP.  Wrote a test script, and instantly
talking to a Windows
Active Directory server.

Fire up the Rails console:

wilig$ script/console
Loading development environment.
 >> require 'ldap'
=> true
 >> require 'ldap/control'
=> true
 >> LDAP::Conn.new('windowads', 396)
(irb):3: [BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Abort trap
wilig$


Freaking odd.  What in initializer.rb is doing me so wrong?

Thanks for any insight.

-wilig
Jonathan Y. (Guest)
on 2006-02-23 21:50
(Received via mailing list)
I'm also getting this Abor trap message when using script/console.

It works just fine using straight irb and it is also working fine
when running through webrick.

It sure is weird. Not sure what is so different about script/console
than the other methods.


darktower$ ./script/console
Loading development environment.
 >> require 'ldap'
=> true
 >> require 'ldap/control'
=> true
 >> conn = LDAP::Conn.new('10.10.10.100', 389)
(irb):3: [BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0]

Abort trap
darktower$


-Jonathan
William G. (Guest)
on 2006-02-23 22:15
(Received via mailing list)
It also fails under Lighttpd, library load path problem?

-wilig
Jonathan Y. (Guest)
on 2006-02-23 22:33
(Received via mailing list)
It's working for me under lighttpd.

-Jonathan
This topic is locked and can not be replied to.