sarins / hudson-eclipse

Automatically exported from code.google.com/p/hudson-eclipse
0 stars 0 forks source link

Support http basic auth #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I enter our url into the Hudson base url field and click 'Check URL', I 
get the error "White spaces are required between publicId and systemId". The 
url - https://xxx/hudson/ - works in all 3 browsers I've tried. 

We're running Hudson 1.276. And we're using a self-signed certificate.

Original issue reported on code.google.com by devonca...@gmail.com on 24 May 2009 at 2:56

GoogleCodeExporter commented 8 years ago
I'm running Eclipse 3.4.1. I saw this problem in v1.0.5 and 1.0.7 of the hudson 
plugin. 
I'm running Windows 7.

Original comment by devonca...@gmail.com on 24 May 2009 at 2:57

GoogleCodeExporter commented 8 years ago
Please attach the contents of /hudson/api/xml

Original comment by jre...@gmail.com on 24 May 2009 at 3:12

GoogleCodeExporter commented 8 years ago
It seems like valid xml. It starts with:

<hudson><description>Hudson instance on 
Linux03</description><job><name>BuildCommon</name><url>

and continues. Unfortuanally I can't post the whole file - it contains too many 
internal URLs and product names. But it seems well-formed. The tags are all 
balanced. 
It doesn't make use of any DOCTYPE declaration, and doesn't reference the 
publicId or 
systemId fields.

I notice that the file doesn't start with <?xml version="1.0" 
encoding="UTF-8"?>. 
Should it? Is hudson (or are we) creating poorly formed xml?

Googling for "White spaces are required between publicId and systemId" gets a 
lot of 
hits. Some blame bad xml, some seems to indicate that changing parser options 
or 
versions can fix the issue.

Original comment by devonca...@gmail.com on 24 May 2009 at 8:39

GoogleCodeExporter commented 8 years ago
We upgraded to 1.303 of Hudson - we still have the same problem.

I looked into the issue a bit more. It looks like the problem occurs when we 
have 
http authentication turned on. The plugin tries to check the hudson URL and 
parses 
the response as xml. What the server sends back however is an auth request. 
Entering 
in values for the username / password don't effect this.

----

GET /hudson/api/xml HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: hudson.xxx.com

HTTP/1.1 401 Authorization Required
Date: Thu, 28 May 2009 17:24:54 GMT
WWW-Authenticate: Basic realm="Build System Access"
Content-Length: 491
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.3 (CentOS) Server at hudson.xxx.com Port 80</address>
</body></html>

Original comment by devonca...@gmail.com on 28 May 2009 at 5:40

GoogleCodeExporter commented 8 years ago
This actually happens because HTTP Basic Auth is not supported in the plugin. 
This
will be added soon.

Original comment by jre...@gmail.com on 3 Jun 2009 at 2:07

GoogleCodeExporter commented 8 years ago
Added support and handling of basic auth in HudsonClient in svn.

Original comment by jre...@gmail.com on 1 Oct 2009 at 8:18

GoogleCodeExporter commented 8 years ago
Issue 41 has been merged into this issue.

Original comment by jre...@gmail.com on 1 Oct 2009 at 8:19