Does anyone have a methodology for accessing the Windows Network ID of
the logged in user from within a Rails application?
My company has an IIS/asp framework for its intranet. All those pages
make use of the ServerVariables data embedded in the Request object to
access the user name of the logged-in network user, as in:
Request.ServerVariables(“LOGON_USER”)
Apparently ServerVariables is something that IIS wraps into the Request
object. I need something equivalent in Rails, or I’ll never be able to
get traction with RoR here.
Any ideas?
Thanks.
c.
Cayce B. wrote:
object. I need something equivalent in Rails, or I’ll never be able to
get traction with RoR here.
Any ideas?
Server variables are just a derivative of Environment variables. Those
are accessible through Ruby, and hence Rails.
–
Berin L.
Owner
Work: 571-215-7708
Email: [email protected] mailto:[email protected]
IM: [email protected] (MSN)
*http://www.linkedin.com/in/bloritsch
*
20044 Great Falls Forest Dr.
http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en
Great Falls, VA 22066
USA
See who we know in common http://www.linkedin.com/e/wwk/5678360/ Want
a signature like this? http://www.linkedin.com/e/sig/5678360/
Not sure I understand what you mean. The ServerVariables collection is
added into the request object by IIS. IIS is somehow able to determine
who the logged in user making the browser request is, and adds that into
the header request.
My rails application is on a Linux box. What environment variable do I
access to determine who the logged in user making the browser request
is?
thanks.
c.
Berin L. wrote:
Cayce B. wrote:
object. I need something equivalent in Rails, or I’ll never be able to
get traction with RoR here.
Any ideas?
Server variables are just a derivative of Environment variables. Those
are accessible through Ruby, and hence Rails.
–
Berin L.
Owner
Work: 571-215-7708
Email: [email protected] mailto:[email protected]
IM: [email protected] (MSN)
*http://www.linkedin.com/in/bloritsch
*
20044 Great Falls Forest Dr.
http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en
Great Falls, VA 22066
USA
See who we know in common http://www.linkedin.com/e/wwk/5678360/ Want
a signature like this? http://www.linkedin.com/e/sig/5678360/
Cayce B. wrote:
Does anyone have a methodology for accessing the Windows Network ID of
the logged in user from within a Rails application?
My company has an IIS/asp framework for its intranet. All those pages
make use of the ServerVariables data embedded in the Request object to
access the user name of the logged-in network user, as in:
Request.ServerVariables(“LOGON_USER”)
Apparently ServerVariables is something that IIS wraps into the Request
object. I need something equivalent in Rails, or I’ll never be able to
get traction with RoR here.
Not sure if this is what you need, but the request method has a lot of
information in it. Maybe it’ll be useful to you.
In a view:
<%= debug(request) %>
Your company’s IIS servers are most likely using Windows authentication.
There are Apache modules for doing the same thing. Look for
mod_auth_ntlm or whatever it’s called, and/or mod_auth_sspi or google
apache and “active directory” for starters.
I’m not an IIS person, so I don’t know whether IIS can pick up usernames
passively, but that alone would seem to be very lax security. Most
likely the app is logging people in (even if doing so invisibly).
If making users log in separately to your apps is a concern even once
you’re logging them in using a domain or AD, one way to go would be to
deploy your apps with Mongrel and proxy them through one of the
authorized IIS servers, letting IIS handle the authentication, but in
this case you’d be running the app itself with no security, so locking
down access to ir from everything but the authorized IIS server would be
mighty important.
Cayce B. wrote:
Not sure I understand what you mean. The ServerVariables collection is
added into the request object by IIS. IIS is somehow able to determine
who the logged in user making the browser request is, and adds that into
the header request.
My rails application is on a Linux box. What environment variable do I
access to determine who the logged in user making the browser request
is?
thanks.
c.
Berin L. wrote:
Cayce B. wrote:
object. I need something equivalent in Rails, or I’ll never be able to
get traction with RoR here.
Any ideas?
Server variables are just a derivative of Environment variables. Those
are accessible through Ruby, and hence Rails.
–
Berin L.
Owner
Work: 571-215-7708
Email: [email protected] mailto:[email protected]
IM: [email protected] (MSN)
*http://www.linkedin.com/in/bloritsch
*
20044 Great Falls Forest Dr.
http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en
Great Falls, VA 22066
USA
See who we know in common http://www.linkedin.com/e/wwk/5678360/ Want
a signature like this? http://www.linkedin.com/e/sig/5678360/