Access control

Jeffrey Cunningham jcunningham at medea.sea.boeing.com
Wed Feb 28 20:05:26 GMT 2007


Vincent Ladeuil wrote:
 >>>>>>
 >     Jeff> Authorization: Basic xxxxxxxxxxxxxxx
 >
 > <cough> always obfuscate that header or any other mentioning 
Authorization.
 >

No worries, its a temporary username/password for debugging - none of 
this is exposed to the outside world anyway.


 >     Jeff> User-Agent: bzr/0.14.0 (pycurl)
 >     Jeff> Host: medea.sea.boeing.com
 >     Jeff> Accept: */*
 >     Jeff> Proxy-Connection: Keep-Alive
 >     Jeff> Cache-control: max-age=0
 >     Jeff> Pragma: no-cache
 >     Jeff> Connection: Keep-Alive
 >
 >     Jeff> < HTTP/1.1 400 Bad Request
 >     Jeff> < Cache-Control: no-cache
 >     Jeff> < Pragma: no-cache
 >     Jeff> < Content-Type: text/html
 >     Jeff> * HTTP/1.1 proxy connection set close!
 >     Jeff> < Proxy-Connection: close
 >     Jeff> < Connection: close
 >     Jeff> < Content-Length: 6822
 >     Jeff> * Closing connection #0
 >     Jeff> bzr: ERROR: Invalid http response for
 >     Jeff> 
http://jeff:password@medea.sea.boeing.com/~jcunningham/docs/.bzr/branch-format:
 >     Jeff> Unable to handle http code 400: expected 200 or 404 for full
 >     Jeff> response.
 >     Jeff> j
 >
 > The proxy refuses the request ! Not the final host. That explain
 > why the apache logs are empty.
 >
 > What proxy are you using ? I thought we solve your proxy problems
 > already >-/ Or was it with another proxy ?
 >
 > The proxy mentioned in the other thread was
 > http://nw-proxy.boeing.com:31060 and here it's
 > www-blv-proxy.boeing.com port 31060, some port but different
 > name...

I was obsfucating the proxy in the earlier post, then realized there was 
no good reason to (instinct, I guess). The latter proxy is the correct 
one and it hasn't changed.

And bzr works fine if I turn off all forms of authentication.


 >
 > And can you redo the test with urllib (which will be more verbose) ?
 >
 >      Vincent
 >

Here you go: (and thanks for all your help!)

-Jeff

jcunningham at medea ~/junk $ bzr branch 
http+urllib://jeff:password@medea.sea.boeing.com/~jcunningham/docs
Will unbind ftp_open for 'http://www-blv-proxy.boeing.com:31060'
Will unbind http_open for 'http://www-blv-proxy.boeing.com:31060'
Will bind http_request for 'http://www-blv-proxy.boeing.com:31060'
set_proxy http_request for 'http://www-blv-proxy.boeing.com:31060'
set_proxy: proxy set to 'http'://'www-blv-proxy.boeing.com:31060'
connect: (www-blv-proxy.boeing.com, 31060)
send: 'GET 
http://medea.sea.boeing.com/~jcunningham/docs/.bzr/branch-format 
HTTP/1.1\r\nAccept-Encoding: identity\r\nConnection: 
Keep-Alive\r\nAccept: */*\r\nUser-agent: bzr/0.14.0 (urllib)\r\nHost: 
medea.sea.boeing.com\r\nPragma: no-cache\r\nCache-control: 
max-age=0\r\n\r\n'
Request sent: [<bzrlib.transport.http._urllib2_wrappers.Request instance 
at 0xb7c64fec>]
reply: 'HTTP/1.1 401 Authorization Required\r\n'
header: Connection: Keep-Alive
header: Date: Wed, 28 Feb 2007 19:53:46 GMT
header: Server: Apache
header: WWW-Authenticate: Basic realm="sarat"
header: Content-Length: 471
header: Content-Type: text/html; charset=iso-8859-1
header: Cache-Control: proxy-revalidate
header: Proxy-support: Session-based-authentication
For status: [401], will ready body, length:  [471]
Consumed body: [<!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 Server at medea.sea.boeing.com Port 80</address>
</body></html>
]
Receives response: <bzrlib.transport.http._urllib2_wrappers.Response 
instance at 0xb77e70cc>
   For: 
'GET'('http://medea.sea.boeing.com/~jcunningham/docs/.bzr/branch-format')
Create addinfourl: <addinfourl at -1216450420 whose fp = 
<socket._fileobject object at 0xb7bd7bc4>>
   For: 
'GET'('http://medea.sea.boeing.com/~jcunningham/docs/.bzr/branch-format')
bzr: ERROR: Invalid http response for 
http://medea.sea.boeing.com/~jcunningham/docs/.bzr/branch-format: Unable 
to handle http code 401: Authorization Required





More information about the bazaar mailing list