On Thu, Jul 22, 2010 at 4:28 PM, Olemis Lang <[email protected]> wrote:
> On Wed, Jul 21, 2010 at 3:57 PM, Olemis Lang <[email protected]> wrote:
>> Few minutes ago I installed HudsonTrac plugin and configured
>> everything like mentioned in its wiki page . On accessing the timeline
>> view Trac displays the following error message
>>
>> {{{
>> Hudson Builds event provider (HudsonTracPlugin) failed:
>> IOError: Error getting build info from
>> 'http://host/hudson/job/jobname/api/xml?xpath=/*/build[timestamp>=1277096399000][timestamp<=1279774799000]&depth=1&exclude=//action|//artifact|//changeSet|//culprit&wrapper=builds':
>> HTTPError: HTTP Error 404: Not Found. This most likely means you
>> configured a wrong job_url, username, or password.
>>
>> }}}
>>
>> The Hudson part: when I get that page using the browser the page is
>> loaded (hah ! I was logged in and browser remembered my credentials
>> somehow , isn't it ? ) but if I access that page using a browser
>> before logging in to the site I get back HTTP 404 Not Found . The same
>> happens for every password-protected page in Hudson site.
>>
>> Q:
>>  - IMHO on accessing password-protected sections of
>>    Hudson site it should return Forbidden , isn't it ?
>>
>
> This is the root cause . Hudson is returning 404 rather than 403 on
> accessing forbidden pages .
> Should it be fixed ?
>

I noticed that the plugin employs HudsonToggleKeep trick documented in
the wiki [1]_ . I tried to go straight right through it (i.e. hacky
workaround using HTTPOpenHandlerBasicAuthNoChallenge as the only
handler) and requests work using the interpreter from the command
line. However , when same request is performed by the plugin the
following error is raised

{{{
Trac Error

Hudson Builds event provider (HudsonTracPlugin) failed:
IOError: Error getting build info from
'http://host/hudson/job/jobname/api/xml?xpath=/*/build[timestamp>=1277269199000][timestamp<=1279947599000]&depth=1&exclude=//action|//artifact|//changeSet|//culprit&wrapper=builds':
HTTPError: HTTP Error 401: Authorization Required. This most likely
means you configured a wrong job_url, username, or password.
}}}

Notice it's a 401 this time ... I tried using basic auth + digest auth
as well without success

I also noticed that on login there's a call (POST) to
http://host/hudson/j_acegi_security_check ... Could this be the root
cause of the problem ?

... any particular suggestion to make it work ?

.. [1] Simple python example for auth toggling by dealing with 403
that Hudson returns to request authorization
        (http://wiki.hudson-ci.org/display/HUDSON/Remote+access+API)

-- 
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to