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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Berin Loritsch
2006-Oct-16 12:42 UTC
Re: Rails equivalent of IIS'' request.ServerVariables?
Cayce Balara 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. > > Any ideas? >Server variables are just a derivative of Environment variables. Those are accessible through Ruby, and hence Rails. -- *Berin Loritsch* Owner *Work:* 571-215-7708 *Email:* bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org <mailto:bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org> *IM:* bloritsch-5k/Kb+RhvWVAfugRpC6u6w@public.gmane.org (MSN) *http://www.linkedin.com/in/bloritsch * * * *D-Haven* <http://d-haven.org> 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/> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
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 Loritsch wrote:> Cayce Balara 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 Loritsch* > Owner > > *Work:* 571-215-7708 > *Email:* bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org <mailto:bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org> > *IM:* bloritsch-5k/Kb+RhvWVAfugRpC6u6w@public.gmane.org (MSN) > *http://www.linkedin.com/in/bloritsch > * > * * *D-Haven* <http://d-haven.org> > 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/>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Steve Koppelman
2006-Oct-16 16:45 UTC
Re: Rails equivalent of IIS'' request.ServerVariables?
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 Balara 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 Loritsch wrote: >> Cayce Balara 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 Loritsch* >> Owner >> >> *Work:* 571-215-7708 >> *Email:* bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org <mailto:bloritsch-5k/Kb+RhvWVBDgjK7y7TUQ@public.gmane.org> >> *IM:* bloritsch-5k/Kb+RhvWVAfugRpC6u6w@public.gmane.org (MSN) >> *http://www.linkedin.com/in/bloritsch >> * >> * * *D-Haven* <http://d-haven.org> >> 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/>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Cayce Balara 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) %> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---