<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Hello,</font></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">I am upgrading from 3.8.7 (<span id="misspell-0" class="mark">apache</span>2 + mod_<span id="misspell-1" class="mark">perl</span>) to 4.0.4 (<span id="misspell-2" class="mark">apache</span>2 + mod_<span id="misspell-3" class="mark">fastcgi</span>) and I notice a strange behaviour of RT-<span id="misspell-4" class="mark">Authen</span>-<span id="misspell-5" class="mark">ExternalAuth</span> -0.09.</span><br></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">The authentication works fine, however, the <span id="misspell-6" class="mark">login</span> page gets redirected straight
away here:</span><br></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; "><br></span></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">http://rt.address.com/NoAuth/Login.html?next=xxxxxx&results=<span id="misspell-7" class="mark">xxxxxxx</span></span><br></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">With the error message: "You are not an <span id="misspell-8" class="mark">authorized</span> user".</span></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">That is, this is what I see instead of the normal <span id="misspell-9" class="mark">login</span> page.</span></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">This is what the log
says:</span><br></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">[Thu Dec 15 13:20:08 2011] [debug]: Attempting to use external <span id="misspell-10" class="mark">auth</span> service: AD (/opt/rt/local/<span id="misspell-11" class="mark">plugins</span>/RT-<span id="misspell-12" class="mark">Authen</span>-<span id="misspell-13" class="mark">ExternalAuth</span>/lib/RT/<span id="misspell-14" class="mark">Authen</span>/<span id="misspell-15" class="mark">ExternalAuth</span>.pm:64)</span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">[Thu Dec 15 13:20:08 2011] [debug]: <span id="misspell-16" class="mark">SSO</span> Failed and no user to test with. <span id="misspell-17" class="mark">Nexting</span> (/opt/rt/local/<span id="misspell-18" class="mark">plugins</span>/RT-<span id="misspell-19" class="mark">Authen</span>-<span id="misspell-20"
class="mark">ExternalAuth</span>/lib/RT/<span id="misspell-21" class="mark">Authen</span>/<span id="misspell-22" class="mark">ExternalAuth</span>.pm:92)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">[Thu Dec 15 13:20:08 2011] [debug]: <span id="misspell-23" class="mark">Autohandler</span> called <span id="misspell-24" class="mark">ExternalAuth</span>. Response: (0, No User) (/opt/rt/local/<span id="misspell-25" class="mark">plugins</span>/RT-<span id="misspell-26" class="mark">Authen</span>-<span id="misspell-27" class="mark">ExternalAuth</span>/<span id="misspell-28" class="mark">html</span>/Elements/<span id="misspell-29" class="mark">DoAuth</span>:10)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">[Thu Dec 15 13:20:08 2011] [debug]: Attempting to use external <span id="misspell-30" class="mark">auth</span> service: AD (/opt/rt/local/<span id="misspell-31"
class="mark">plugins</span>/RT-<span id="misspell-32" class="mark">Authen</span>-<span id="misspell-33" class="mark">ExternalAuth</span>/lib/RT/<span id="misspell-34" class="mark">Authen</span>/<span id="misspell-35" class="mark">ExternalAuth</span>.pm:64)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">[Thu Dec 15 13:20:08 2011] [debug]: <span id="misspell-36" class="mark">SSO</span> Failed and no user to test with. <span id="misspell-37" class="mark">Nexting</span> (/opt/rt/local/<span id="misspell-38" class="mark">plugins</span>/RT-<span id="misspell-39" class="mark">Authen</span>-<span id="misspell-40" class="mark">ExternalAuth</span>/lib/RT/<span id="misspell-41" class="mark">Authen</span>/<span id="misspell-42" class="mark">ExternalAuth</span>.pm:92)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">[Thu Dec 15 13:20:08 2011] [debug]: <span id="misspell-43"
class="mark">Autohandler</span> called <span id="misspell-44" class="mark">ExternalAuth</span>. Response: (0, No User) (/opt/rt/local/<span id="misspell-45" class="mark">plugins</span>/RT-<span id="misspell-46" class="mark">Authen</span>-<span id="misspell-47" class="mark">ExternalAuth</span>/<span id="misspell-48" class="mark">html</span>/Elements/<span id="misspell-49" class="mark">DoAuth</span>:10)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Is this to be expected? Or am I missing something? Because in the old version there was no redirection and no error messages.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">I dug a little bit and found a "fix", but it seems a bit heavy handed (if not plain wrong). </font></div><div><font class="Apple-style-span"
face="arial, helvetica, sans-serif" size="2">It involves <span id="misspell-50" class="mark">modifiying</span> .../html/Callbacks/ExternalAuth/autohandler/Session from this:</font></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; "><%<span id="misspell-51" class="mark">init</span>></span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">$m->comp('/Elements/<span id="misspell-52" class="mark">DoAuth</span>',%<span id="misspell-53" class="mark">ARGS</span>);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">......</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">to this:</span><br></div><div><font class="Apple-style-span" face="arial,
helvetica, sans-serif" size="2"><%<span id="misspell-54" class="mark">init</span>></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">if($<span id="misspell-55" class="mark">ARGS</span>{'user'} || $m->request_comp->path <span id="misspell-56" class="mark">ne</span> '/index.<span id="misspell-57" class="mark">html</span>'){</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> $m->comp('/Elements/<span id="misspell-58" class="mark">DoAuth</span>',%<span id="misspell-59" class="mark">ARGS</span>);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">}</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">....</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span"
face="arial, helvetica, sans-serif" size="2">That is, try to authenticate me only if I provided an <span id="misspell-60" class="mark">username</span> or if I am trying to access something else than the <span id="misspell-61" class="mark">login</span> page(well..).</font></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">Here's the relevant part of RT_<span id="misspell-62" class="mark">SiteConfig</span>:</span><br></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; ">Set($<span id="misspell-63" class="mark">WebExternalAuth</span> , '1');</span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-64" class="mark">WebFallbackToInternalAuth</span> , '1');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-65"
class="mark">WebExternalAuto</span> , '1');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-66" class="mark">ExternalAuthPriority</span>, [ 'AD' ]);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-67" class="mark">ExternalInfoPriority</span>, [ 'AD' ]);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-68" class="mark">AutoCreateNonExternalUsers</span>, 1);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Set($<span id="misspell-69" class="mark">ExternalSettings</span>, { 'AD' => {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> 'type'
=> '<span id="misspell-70" class="mark">ldap</span>',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> ...</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">});</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">And <span id="misspell-71" class="mark">httpd</span>.<span id="misspell-72" class="mark">conf</span>:</font></div><div><span class="Apple-style-span" style="font-size: 13px; font-family: arial, helvetica, sans-serif; "><<span
id="misspell-73" class="mark">VirtualHost</span> *:80></span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-74" class="mark">ServerName</span> xxx</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-75" class="mark">KeepAlive</span> On</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-76" class="mark">AddDefaultCharset</span> <span id="misspell-77" class="mark">UTF</span>-8</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-78" class="mark">LogLevel</span> debug</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span
id="misspell-79" class="mark">LogFormat</span> "%h %l %u %t \"%r\" %>s %b \"%{<span id="misspell-80" class="mark">Referer</span>}i\" \"%{User-agent}i\" %{X-Forwarded-For}i " combined</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-81" class="mark">ErrorLog</span> /opt/rt/var/log/error_log</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-82" class="mark">CustomLog</span> /opt/rt/var/log/access_log common <span id="misspell-83" class="mark">env</span>=!<span id="misspell-84" class="mark">dontlog</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> Alias /<span
id="misspell-85" class="mark">NoAuth</span>/images/ /opt/rt/share/<span id="misspell-86" class="mark">html</span>/<span id="misspell-87" class="mark">NoAuth</span>/images/</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-88" class="mark">ScriptAlias</span> / /opt/rt/<span id="misspell-89" class="mark">sbin</span>/rt-server.<span id="misspell-90" class="mark">fcgi</span>/</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-91" class="mark">DocumentRoot</span> /opt/rt/share/<span id="misspell-92" class="mark">html</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <Location
/></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> Order allow,deny</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> Allow from all</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> Options +<span id="misspell-93" class="mark">ExecCGI</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-94" class="mark">AddHandler</span> <span id="misspell-95" class="mark">fastcgi</span>-script <span id="misspell-96" class="mark">fcgi</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> </Location></font></div><div><font class="Apple-style-span"
face="arial, helvetica, sans-serif" size="2"> <Location /<span id="misspell-97" class="mark">NoAuth</span>/images></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span id="misspell-98" class="mark">SetHandler</span> default-handler</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> </Location></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"></<span id="misspell-99" class="mark">VirtualHost</span>></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Thanks,</font></div><div><span class="Apple-style-span" style="font-size: 13px;
font-family: arial, helvetica, sans-serif; ">Iulian</span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><br></div></div></div></body></html>