Active Directory / IE Auto Authentication

Has anyone been able to get some sort of Active Directory auto login
functionality working in a rails app? Doesn’t IE make available some
kind of ldap token that I could grab?


You’re thinking about Kerberos.

If you’re using Apache as a web server then you can use something like to authenticate the user and pass
the username through to as a variable.

On Dec 19, 8:14 am, “[email protected][email protected]

I don’t want apache handling authentication for me, my rails app is
handling authentication. What I want is if the user is logged into
the domain and using IE, be able to grab their active directory
username. And if they aren’t using IE, my rails app will present them
with a login form.


On Dec 18, 1:41 pm, “[email protected]

Yes. What you’re talking about is Integrated Windows Authentication
(i.e. SPNEGO). This is basically Internet Explorer passing Kerberos or
NTLM tokens if the web server supports it or falling back to HTTP
Basic auth otherwise.

This means that either your rails app needs to be able to talk SPNEGO
itself (which would be complicated to implement) or you have to rely
on the web server for authentication. Once the web server has done the
authentication you can read the username in your rails app through a
HTTP environment variable.

I know thats not precisely what you want, but that is what is


On Dec 19, 8:54 am, “[email protected][email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs