From: "miles.sterrett@..." Date: 2008-06-17T02:29:09+09:00 Subject: Re: How to Authenticate against the Windows NT Domain via Ruby On Jun 16, 10:19 am, ChessMess wrote: > We are running a Rails application on Linux RedHat with a requirement > to validate users against a Windows NT Domain (single sign-on > scenario). Some sites use LDAP, others do not. Is there any Ruby > libraries or code samples that make this an easy thing to do? Anyone > have any recommendations on ways to get this implemented? > > Thanks! In our Apache config: # Require authentication via LDAP AuthzLDAPAuthoritative off AuthType Basic AuthName "Restricted Area" AuthBasicProvider ldap AuthLDAPBindDN webapp@domain.local AuthLDAPBindPassword cr@zypa55w0rd AuthLDAPURL ldaps://server.domain.local:3269/dc=domain,dc=local?sAMAccountName?sub?(objectClass=*) require valid-user ... which is within a definition. You'll want to replace some things (such as 'server' and 'domain') with things specific to your configuration. You can then retrieve the user name via request.env['HTTP_REMOTE_USER'] in your Rails application.