Modify

Opened 5 years ago

Closed 5 years ago

#5430 closed defect (fixed)

HTTPS with self signed certificate

Reported by: Homes2001 Owned by: roadrunner
Priority: normal Component: HudsonTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I tried to configure this plugin with a feed url like https://..., which uses a self signed certificate and http basic authentication.

When I access the Timeline, I can't see anything (looks just like it looked all the time before)...

Are there any log files where I can find a more detailed description on the problem that is related to the URL I used? I guess that it is related to either https or the self signed certificate that I am using... Is there any option to accept self signed certificates?

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by roadrunner

Try turning on trac's debug logging in trac.ini and see if anything
shows up there. But normally you get an error in the timeline page,
IIRC.

Also, make sure the "Hudson Builds" option in the timeline (near the
top right) is checked.

comment:2 Changed 5 years ago by Homes2001

Thanks for the quick reply.

The checkbox on the top right is checked. Furthermore my trac.log shows the following when accessing the timeline:

2009-06-25 11:56:42,571 Trac[main] DEBUG: Dispatching <Request "GET u'/timeline'">
2009-06-25 11:56:42,575 Trac[session] DEBUG: Retrieving session for ID 'dbiering'
2009-06-25 11:56:42,579 Trac[chrome] DEBUG: Prepare chrome data for request
2009-06-25 11:56:42,771 Trac[api] DEBUG: Updating wiki page index
2009-06-25 11:56:43,283 Trac[main] DEBUG: 2950 unreachable objects found.

I also tried to update the URL to http://localhost:8080/hudson/rssAll (this is the internal instance, while from the outside hudson is available via https://... (apache is configured as proxy)). When using the http://localhost:8080 URL, the plugin seems to be able to retrieve the initial RSS feed, but the RSS feed has links to the URL https://... init, which then causes the plugin to fail... With this configuration, the timeline page shows me an error message:

Trac Error

Hudson Builds event provider (HudsonTracPlugin) failed:
HTTPError: HTTP Error 401: Authorization Required

You may want to see the other kind of events from the Timeline

TracGuide — The Trac User and Administration Guide

When I activate the username and password configuration option (although http://localhost:8080 does not require authentication), the error stays the same.

comment:3 Changed 5 years ago by roadrunner

Thanks for the info. This seems to indicate two things: 1) the feedparser
library must be silently ignoring errors and returning an empty feed instead
(maybe that can be changed); and 2) it looks like the authentication stuff
is not working properly.

Regarding 1), I see I need to check the http status code which feedparser
makes available - I'll check that in as soon as I get around to testing the
fix.

Regarding 2), I don't have a setup to test authentication, so there could
well be bugs there.

comment:4 follow-up: Changed 5 years ago by anonymous

If you want you can provide me a patch or something like that. Then I can test if it works for my configuration and maybe give you some more details....

comment:5 Changed 5 years ago by roadrunner

(In [6100]) Fixed authentication handling. There were two issues:

  1. need to register the auth info for all paths not just the feed, because the descriptions will have different paths
  2. feedparser's authentication handling is broken (there's an over two year old bug report on it at http://code.google.com/p/feedparser/issues/detail?id=40 but the fix there is not correct). So we just open the url ourselves which avoids feedparser's handler and hence the problem.

This really fixes #4113 and hopefully addresses #5430.

comment:6 in reply to: ↑ 4 Changed 5 years ago by roadrunner

  • Status changed from new to assigned

Replying to anonymous:

If you want you can provide me a patch or something like that. Then
I can test if it works for my configuration and maybe give you some
more details....

Thanks for the offer. Please give the latest code a try. It should
both report all errors properly (i.e. show you an error when you try
to view the timeline) as well as actually handle authentication.

comment:7 Changed 5 years ago by Homes2001

  • Resolution set to fixed
  • Status changed from assigned to closed

Hey, the new version seems to work. I can see my builds in the timeline.

Great Job :)

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.