<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>The Ignition Project: Praise Google!</title>
    <link>http://www.ignition-project.com/articles/2009/04/01/praise-google</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Open Source Collaboration Solutions</description>
    <item>
      <title>Praise Google!</title>
      <description>&lt;p&gt;After literally hours of scouring the web trying to find a solution to a SIMPLE problem, I finally came across it.&lt;/p&gt;

&lt;p&gt;What&amp;#8217;s the problem you ask? Well, I have a Mongrel application server running a Rails application. We&amp;#8217;re authenticating to this application using &lt;code&gt;mod_auth_sspi&lt;/code&gt; in Apache. This is fine, but it doesn&amp;#8217;t permit the application to know who is on the other end (and we can&amp;#8217;t rely on the &lt;code&gt;Authorization&lt;/code&gt; header). So finally, I googled the right thing, and came up with &lt;a href="http://blog.craz8.com/pages/authenticate-as-remote-user-plugin"&gt;this post on CRAZ8&lt;/a&gt; that they implemented as a plugin. Here&amp;#8217;s the bit I care about:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule .* - [E=RU:%1]
RequestHeader add REMOTE_USER %{RU}e&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To quote CRAZ8:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;Here&#8217;s what this Rewrite-fu does:&lt;/p&gt;
    
    &lt;p&gt;Line 2: Use lookahead access to get REMOTE_USER set by authentication module
    Line 3: Transfer the results of line 2 into an environment variable called RU
    Line 4: Set a Request header to the environment variable from line 3.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
      <pubDate>Wed, 01 Apr 2009 10:04:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:387d5b38-493c-475d-835a-2da6052714e4</guid>
      <author>Keith Gable</author>
      <link>http://www.ignition-project.com/articles/2009/04/01/praise-google</link>
      <category>Hacks</category>
      <category>apache</category>
      <category>rails</category>
    </item>
  </channel>
</rss>

