<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for kahfei</title>
	<atom:link href="http://www.kahfei.com/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://www.kahfei.com</link>
	<description>freshly brewed ideas</description>
	<lastBuildDate>Mon, 09 Aug 2010 13:54:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on remote_user in rails application by kahfei</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-1085</link>
		<dc:creator>kahfei</dc:creator>
		<pubDate>Mon, 09 Aug 2010 13:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-1085</guid>
		<description>Hi Kevin, thanks for dropping by, and your advice...really appreciate it. 
Ya, that is what I understand from various discussions and articles on the net that if mongrels are proxied behind apache, we wouldn&#039;t be able to get &#039;HTTP_REMOTE_USER&#039;.

Basically, it is an intranet application, and the capturing of username is not for any user authentication or authorization purpose, solely to fill up the creator field in the record, and the user base don&#039;t really have a lot of administrator rights on their computer (running Windows), so what they could do with it is pretty limited. 

But I fully agree that it is not a secure way of handling this. Will look further on your post and the apache docs, or I might just let the user fill in a free text field for that information, just to save the hustle. :-).

Thanks again.</description>
		<content:encoded><![CDATA[<p>Hi Kevin, thanks for dropping by, and your advice&#8230;really appreciate it.<br />
Ya, that is what I understand from various discussions and articles on the net that if mongrels are proxied behind apache, we wouldn&#8217;t be able to get &#8216;HTTP_REMOTE_USER&#8217;.</p>
<p>Basically, it is an intranet application, and the capturing of username is not for any user authentication or authorization purpose, solely to fill up the creator field in the record, and the user base don&#8217;t really have a lot of administrator rights on their computer (running Windows), so what they could do with it is pretty limited. </p>
<p>But I fully agree that it is not a secure way of handling this. Will look further on your post and the apache docs, or I might just let the user fill in a free text field for that information, just to save the hustle. <img src='http://www.kahfei.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on remote_user in rails application by Kevin</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-1052</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Fri, 06 Aug 2010 22:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-1052</guid>
		<description>If you&#039;re going to access it in Rails, you need request.env[&#039;HTTP_REMOTE_USER&#039;] (note: &#039;request.env&#039;, &#039;HTTP_&#039; and uppercase). But that doesn&#039;t work if your mongrels are proxied behind Apache (or nginx or lightty or whatever).

In any case, it sounds like what you&#039;re trying to do is grab the user&#039;s *desktop* username, which isn&#039;t really possible (you might be able to do AD-integrated HTTP BASIC authentication, but then you&#039;re tied to Windows and IE). It&#039;s also _totally_ insecure to trust what someone&#039;s browser says is their username—I could make my browser tell you my username is &#039;admin&#039; and get full access without authentication. Even if it&#039;s for an &quot;intranet&quot; app, if that app is on an Internet-accessible web server, you&#039;re vulnerable.

What I do for our intranet site is HTTP BASIC auth thru Apache, which then proxies the username as I described in my post (which you referenced—http://kbullock.ringworld.org/2010/06/05/apache-rails-and-remote_user/). You might check out the Apache docs on setting up authentication (http://httpd.apache.org/docs/2.2/howto/auth.html). In addition, in order to duplicate my setup, you need to have &quot;AllowOverride all&quot; set on your virtualhost or directory in the Apache config, so that the .htaccess file in your RAILS_ROOT/public/ folder gets used.

Hope that&#039;s helpful.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re going to access it in Rails, you need request.env['HTTP_REMOTE_USER'] (note: &#8216;request.env&#8217;, &#8216;HTTP_&#8217; and uppercase). But that doesn&#8217;t work if your mongrels are proxied behind Apache (or nginx or lightty or whatever).</p>
<p>In any case, it sounds like what you&#8217;re trying to do is grab the user&#8217;s *desktop* username, which isn&#8217;t really possible (you might be able to do AD-integrated HTTP BASIC authentication, but then you&#8217;re tied to Windows and IE). It&#8217;s also _totally_ insecure to trust what someone&#8217;s browser says is their username—I could make my browser tell you my username is &#8216;admin&#8217; and get full access without authentication. Even if it&#8217;s for an &#8220;intranet&#8221; app, if that app is on an Internet-accessible web server, you&#8217;re vulnerable.</p>
<p>What I do for our intranet site is HTTP BASIC auth thru Apache, which then proxies the username as I described in my post (which you referenced—http://kbullock.ringworld.org/2010/06/05/apache-rails-and-remote_user/). You might check out the Apache docs on setting up authentication (<a href="http://httpd.apache.org/docs/2.2/howto/auth.html" rel="nofollow">http://httpd.apache.org/docs/2.2/howto/auth.html</a>). In addition, in order to duplicate my setup, you need to have &#8220;AllowOverride all&#8221; set on your virtualhost or directory in the Apache config, so that the .htaccess file in your RAILS_ROOT/public/ folder gets used.</p>
<p>Hope that&#8217;s helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on remote_user in rails application by kahfei</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-1000</link>
		<dc:creator>kahfei</dc:creator>
		<pubDate>Tue, 03 Aug 2010 21:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-1000</guid>
		<description>Hi Anton,
Hmmm...seems it didn&#039;t really show up any information about the user name on the client side, all the info from ENV.inspect are from the server...</description>
		<content:encoded><![CDATA[<p>Hi Anton,<br />
Hmmm&#8230;seems it didn&#8217;t really show up any information about the user name on the client side, all the info from ENV.inspect are from the server&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on map and each by kahfei</title>
		<link>http://www.kahfei.com/?p=131&#038;cpage=1#comment-968</link>
		<dc:creator>kahfei</dc:creator>
		<pubDate>Sun, 01 Aug 2010 04:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=131#comment-968</guid>
		<description>Deswing, sure, if my post did bring any help in anyway, you are free to quote it :-).</description>
		<content:encoded><![CDATA[<p>Deswing, sure, if my post did bring any help in anyway, you are free to quote it <img src='http://www.kahfei.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on remote_user in rails application by Anton</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-959</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Sat, 31 Jul 2010 19:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-959</guid>
		<description>Try this:

script/console(rails console in rails 3)
puts ENV.inspect</description>
		<content:encoded><![CDATA[<p>Try this:</p>
<p>script/console(rails console in rails 3)<br />
puts ENV.inspect</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on remote_user in rails application by kahfei</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-937</link>
		<dc:creator>kahfei</dc:creator>
		<pubDate>Fri, 30 Jul 2010 00:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-937</guid>
		<description>Hi Anton,

Thanks for the advise.
Tried that, but didn&#039;t work though.
Are there any prerequisite for that to work?</description>
		<content:encoded><![CDATA[<p>Hi Anton,</p>
<p>Thanks for the advise.<br />
Tried that, but didn&#8217;t work though.<br />
Are there any prerequisite for that to work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on remote_user in rails application by Anton</title>
		<link>http://www.kahfei.com/?p=153&#038;cpage=1#comment-925</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Thu, 29 Jul 2010 20:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=153#comment-925</guid>
		<description>Hi!
May be ENV[&#039;LOGNAME&#039;] you need?</description>
		<content:encoded><![CDATA[<p>Hi!<br />
May be ENV['LOGNAME'] you need?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on map and each by Deswing666</title>
		<link>http://www.kahfei.com/?p=131&#038;cpage=1#comment-922</link>
		<dc:creator>Deswing666</dc:creator>
		<pubDate>Thu, 29 Jul 2010 12:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=131#comment-922</guid>
		<description>it was very interesting to read www.kahfei.com
I want to quote your post in my blog. It can?
And you et an account on Twitter?</description>
		<content:encoded><![CDATA[<p>it was very interesting to read <a href="http://www.kahfei.com" rel="nofollow">http://www.kahfei.com</a><br />
I want to quote your post in my blog. It can?<br />
And you et an account on Twitter?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on thin on windows by kahfei</title>
		<link>http://www.kahfei.com/?p=149&#038;cpage=1#comment-919</link>
		<dc:creator>kahfei</dc:creator>
		<pubDate>Thu, 29 Jul 2010 01:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=149#comment-919</guid>
		<description>Hi Luis,

I am running ruby 1.8.7 as well. 
But I installed MinGW and MSYS separately and not knowing about Devkit at all at that time. Guess I might have messed up the part to point MSYS correctly to MinGW.

Installing thin with Devkit work like a charm! Thanks for the really helpful advise, Luis. :-)</description>
		<content:encoded><![CDATA[<p>Hi Luis,</p>
<p>I am running ruby 1.8.7 as well.<br />
But I installed MinGW and MSYS separately and not knowing about Devkit at all at that time. Guess I might have messed up the part to point MSYS correctly to MinGW.</p>
<p>Installing thin with Devkit work like a charm! Thanks for the really helpful advise, Luis. <img src='http://www.kahfei.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on thin on windows by Luis Lavena</title>
		<link>http://www.kahfei.com/?p=149&#038;cpage=1#comment-915</link>
		<dc:creator>Luis Lavena</dc:creator>
		<pubDate>Wed, 28 Jul 2010 22:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.kahfei.com/?p=149#comment-915</guid>
		<description>Can I ask you what version of Ruby are you using?

Installing it with RubyInstaller and the DevKit is pretty straight forward:

C:\Users\Luis&gt;ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]

C:\Users\Luis&gt;gem install thin
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed rack-1.2.1
Successfully installed eventmachine-0.12.10
Successfully installed daemons-1.1.0
Successfully installed thin-1.2.7-x86-mingw32
4 gems installed

You can find installation instructions for the DevKit here:

http://wiki.github.com/oneclick/rubyinstaller/development-kit

Along with others tutorials about installation here:

http://wiki.github.com/oneclick/rubyinstaller/tutorials

HTH.</description>
		<content:encoded><![CDATA[<p>Can I ask you what version of Ruby are you using?</p>
<p>Installing it with RubyInstaller and the DevKit is pretty straight forward:</p>
<p>C:\Users\Luis&gt;ruby -v<br />
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]</p>
<p>C:\Users\Luis&gt;gem install thin<br />
Temporarily enhancing PATH to include DevKit&#8230;<br />
Building native extensions.  This could take a while&#8230;<br />
Successfully installed rack-1.2.1<br />
Successfully installed eventmachine-0.12.10<br />
Successfully installed daemons-1.1.0<br />
Successfully installed thin-1.2.7-x86-mingw32<br />
4 gems installed</p>
<p>You can find installation instructions for the DevKit here:</p>
<p><a href="http://wiki.github.com/oneclick/rubyinstaller/development-kit" rel="nofollow">http://wiki.github.com/oneclick/rubyinstaller/development-kit</a></p>
<p>Along with others tutorials about installation here:</p>
<p><a href="http://wiki.github.com/oneclick/rubyinstaller/tutorials" rel="nofollow">http://wiki.github.com/oneclick/rubyinstaller/tutorials</a></p>
<p>HTH.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
