Rev 2463: http authentication and other integrated fixes in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Apr 26 11:41:54 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2463
revision-id: pqm at pqm.ubuntu.com-20070426104148-4l5wq2zemlzv0shg
parent: pqm at pqm.ubuntu.com-20070426083414-8xgtmyk47txgquaw
parent: v.ladeuil+lp at free.fr-20070426090738-3n4pmuhuwqxr05fj
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-04-26 11:41:48 +0100
message:
http authentication and other integrated fixes
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/bzrdir.py bzrdir.py-20061122024551-ol0l0o0oofsu9b3t-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/smart/vfs.py vfs.py-20061108095550-gunadhxmzkdjfeek-2
bzrlib/tests/HTTPTestUtil.py HTTPTestUtil.py-20050914180604-247d3aafb7a43343
bzrlib/tests/HttpServer.py httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/tests/test_urlutils.py test_urlutils.py-20060502192900-46b1f9579987cf9c
bzrlib/tests/test_wsgi.py test_wsgi.py-20061005091552-rz8pva0olkxv0sd8-1
bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
bzrlib/urlutils.py urlutils.py-20060502195429-e8a161ecf8fac004
------------------------------------------------------------
revno: 2420.1.22
merged: v.ladeuil+lp at free.fr-20070426090738-3n4pmuhuwqxr05fj
parent: v.ladeuil+lp at free.fr-20070426090146-jbwl0muvk76wlw6c
parent: pqm at pqm.ubuntu.com-20070426083414-8xgtmyk47txgquaw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-26 11:07:38 +0200
message:
Merge bzr.dev, resolving trivila conflicts in bzrlib/smart/repository.py
------------------------------------------------------------
revno: 2420.1.21
merged: v.ladeuil+lp at free.fr-20070426090146-jbwl0muvk76wlw6c
parent: v.ladeuil+lp at free.fr-20070426072124-bty9pn2i122u1zpx
parent: andrew.bennetts at canonical.com-20070426081540-36glj2kouoldc866
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-26 11:01:46 +0200
message:
Merge spiv modifications
------------------------------------------------------------
revno: 2420.1.20.1.2
merged: andrew.bennetts at canonical.com-20070426081540-36glj2kouoldc866
parent: andrew.bennetts at canonical.com-20070426075456-5edsg5a2zo7iiimv
parent: mbp at sourcefrog.net-20070426074805-va53nylsxqt7ur7u
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-26 18:15:40 +1000
message:
Merge tarball branch that's already with PQM, resolving conflicts.
------------------------------------------------------------
revno: 2420.1.20.1.1
merged: andrew.bennetts at canonical.com-20070426075456-5edsg5a2zo7iiimv
parent: v.ladeuil+lp at free.fr-20070426072124-bty9pn2i122u1zpx
parent: andrew.bennetts at canonical.com-20070426064512-kcdvlg2u3dzi2l4s
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-26 17:54:56 +1000
message:
Merge smart server changes that are already with PQM, and fix conflict and formatting nit in NEWS.
------------------------------------------------------------
revno: 2432.2.6.1.7
merged: andrew.bennetts at canonical.com-20070426064512-kcdvlg2u3dzi2l4s
parent: andrew.bennetts at canonical.com-20070426061436-blwwa9pez8gkkgh5
parent: andrew.bennetts at canonical.com-20070426064415-69n3ie22q8l2t44f
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Thu 2007-04-26 16:45:12 +1000
message:
Merge in smart-transport-subpaths.
------------------------------------------------------------
revno: 2208.4.5
merged: andrew.bennetts at canonical.com-20070426064415-69n3ie22q8l2t44f
parent: andrew.bennetts at canonical.com-20070426061907-ipn74twdz1gmz52i
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-transport-subpaths
timestamp: Thu 2007-04-26 16:44:15 +1000
message:
Add NEWS entry about bzr+http change.
------------------------------------------------------------
revno: 2208.4.4
merged: andrew.bennetts at canonical.com-20070426061907-ipn74twdz1gmz52i
parent: andrew.bennetts at canonical.com-20070104052612-uflmazssfnud41y8
parent: pqm at pqm.ubuntu.com-20070426054238-v6k5ge3z766vaafk
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-transport-subpaths
timestamp: Thu 2007-04-26 16:19:07 +1000
message:
Merge bzr.dev.
------------------------------------------------------------
revno: 2208.4.3
merged: andrew.bennetts at canonical.com-20070104052612-uflmazssfnud41y8
parent: andrew.bennetts at canonical.com-20061222060424-psweqla98ig12mra
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-transport-subpaths
timestamp: Thu 2007-01-04 16:26:12 +1100
message:
Let SmartHTTPTransport.clone('..') continue to POST to the cloned URL (unlike clone('child')).
------------------------------------------------------------
revno: 2208.4.2
merged: andrew.bennetts at canonical.com-20061222060424-psweqla98ig12mra
parent: andrew.bennetts at canonical.com-20061222055608-t1cfil9ws1l95k0f
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: bzr
timestamp: Fri 2006-12-22 17:04:24 +1100
message:
Always POST to the same .bzr/smart URL for a given branch, even when accessing files in subdirectories.
------------------------------------------------------------
revno: 2208.4.1
merged: andrew.bennetts at canonical.com-20061222055608-t1cfil9ws1l95k0f
parent: pqm at pqm.ubuntu.com-20061221043820-0b56b176269f173a
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: bzr
timestamp: Fri 2006-12-22 16:56:08 +1100
message:
normalize_url should normalise escaping of unreserved characters, like '~'.
------------------------------------------------------------
revno: 2432.2.6.1.6
merged: andrew.bennetts at canonical.com-20070426061436-blwwa9pez8gkkgh5
parent: andrew.bennetts at canonical.com-20070426060131-zaumabdzwl8nrlux
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Thu 2007-04-26 16:14:36 +1000
message:
Fix a couple of test failures introduced by the previous merge.
------------------------------------------------------------
revno: 2432.2.6.1.5
merged: andrew.bennetts at canonical.com-20070426060131-zaumabdzwl8nrlux
parent: andrew.bennetts at canonical.com-20070426054956-eipakzwjs76a14wq
parent: robertc at lifelesswks.robertcollins.net-20070424130122-0a33444e2abe6a8f
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Thu 2007-04-26 16:01:31 +1000
message:
Merge Robert's status prefix changes to protocol 2.
------------------------------------------------------------
revno: 2432.2.2.1.7
merged: robertc at lifelesswks.robertcollins.net-20070424130122-0a33444e2abe6a8f
parent: robertc at lifelesswks.robertcollins.net-20070424125050-8b4f1cf3f5b017bb
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 23:01:22 +1000
message:
NEWS.
------------------------------------------------------------
revno: 2432.2.2.1.6
merged: robertc at lifelesswks.robertcollins.net-20070424125050-8b4f1cf3f5b017bb
parent: robertc at lifelesswks.robertcollins.net-20070424122009-8bb4dede6a298d93
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 22:50:50 +1000
message:
Include success/failure feedback in SmartProtocolTwo responses to allow robust handling in the future.
------------------------------------------------------------
revno: 2432.2.2.1.5
merged: robertc at lifelesswks.robertcollins.net-20070424122009-8bb4dede6a298d93
parent: robertc at lifelesswks.robertcollins.net-20070424120730-ff71254d94206e30
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 22:20:09 +1000
message:
Make using SuccessfulSmartServerResponse and FailedSmartServerResponse mandatory rather than optional in smart server logic.
------------------------------------------------------------
revno: 2432.2.2.1.4
merged: robertc at lifelesswks.robertcollins.net-20070424120730-ff71254d94206e30
parent: robertc at lifelesswks.robertcollins.net-20070424113214-5660f78098933edb
parent: andrew.bennetts at canonical.com-20070424090150-9buzrpi8lt6qv0tg
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 22:07:30 +1000
message:
Merge hpss-protocol2.
------------------------------------------------------------
revno: 2432.2.2.1.3
merged: robertc at lifelesswks.robertcollins.net-20070424113214-5660f78098933edb
parent: robertc at lifelesswks.robertcollins.net-20070424105216-8a68b2533da78717
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 21:32:14 +1000
message:
Refactor the HPSS Response code to take SmartServerResponse rather than args and body.
------------------------------------------------------------
revno: 2432.2.2.1.2
merged: robertc at lifelesswks.robertcollins.net-20070424105216-8a68b2533da78717
parent: robertc at lifelesswks.robertcollins.net-20070424104022-308ab78a663c23f7
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 20:52:16 +1000
message:
Add FailedSmartServerResponse.
------------------------------------------------------------
revno: 2432.2.2.1.1
merged: robertc at lifelesswks.robertcollins.net-20070424104022-308ab78a663c23f7
parent: andrew.bennetts at canonical.com-20070424072048-tgbochqfr1n33bcy
committer: Robert Collins <robertc at lifelesswks.robertcollins.net>
branch nick: hpss-protocol2-wire-prefix
timestamp: Tue 2007-04-24 20:40:22 +1000
message:
Add SuccessfulSmartServerResponse.
------------------------------------------------------------
revno: 2432.2.6.1.4
merged: andrew.bennetts at canonical.com-20070426054956-eipakzwjs76a14wq
parent: andrew.bennetts at canonical.com-20070425055650-8mlo7rmtj65za5ql
parent: pqm at pqm.ubuntu.com-20070426054238-v6k5ge3z766vaafk
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Thu 2007-04-26 15:49:56 +1000
message:
Merge from bzr.dev.
------------------------------------------------------------
revno: 2432.2.6.1.3
merged: andrew.bennetts at canonical.com-20070425055650-8mlo7rmtj65za5ql
parent: andrew.bennetts at canonical.com-20070424181238-ujjudjjjn2jbqrj6
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Wed 2007-04-25 15:56:50 +1000
message:
Update comment according to Martin's suggestion.
------------------------------------------------------------
revno: 2432.2.6.1.2
merged: andrew.bennetts at canonical.com-20070424181238-ujjudjjjn2jbqrj6
parent: andrew.bennetts at canonical.com-20070424102546-am5s92urrlfk9zjb
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Wed 2007-04-25 04:12:38 +1000
message:
Add test, and tidy implementation.
------------------------------------------------------------
revno: 2432.2.6.1.1
merged: andrew.bennetts at canonical.com-20070424102546-am5s92urrlfk9zjb
parent: andrew.bennetts at canonical.com-20070424090150-9buzrpi8lt6qv0tg
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss-vfs-fallback
timestamp: Tue 2007-04-24 20:25:46 +1000
message:
Try a version 1 hello probe to determine if we can use RemoteBzrDir on a particular transport, allowing smooth interoperation with older servers.
------------------------------------------------------------
revno: 2420.1.20
merged: v.ladeuil+lp at free.fr-20070426072124-bty9pn2i122u1zpx
parent: v.ladeuil+lp at free.fr-20070424100523-3odqlqm2nnoc8gdu
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-26 09:21:24 +0200
message:
Fix test failure on pqm.
* bzrlib/tests/test_http.py:
(TestAuth.setUp): Overrides sys.stdout, TestUIFactory will not do
it for us and the tests fail on pqm otherwise.
(TestAuth.test_prompt_for_password): No need to provide stdout
parameter anymore.
------------------------------------------------------------
revno: 2420.1.19
merged: v.ladeuil+lp at free.fr-20070424100523-3odqlqm2nnoc8gdu
parent: v.ladeuil+lp at free.fr-20070424095159-pnxwqfn1og3bqg5e
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Tue 2007-04-24 12:05:23 +0200
message:
Cosmetic changes.
------------------------------------------------------------
revno: 2420.1.18
merged: v.ladeuil+lp at free.fr-20070424095159-pnxwqfn1og3bqg5e
parent: v.ladeuil+lp at free.fr-20070424094954-k60h58nkwrf09l94
parent: pqm at pqm.ubuntu.com-20070424054249-bpkw4wwywqjt2nel
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Tue 2007-04-24 11:51:59 +0200
message:
merge bzr.dev at 2450
------------------------------------------------------------
revno: 2420.1.17
merged: v.ladeuil+lp at free.fr-20070424094954-k60h58nkwrf09l94
parent: v.ladeuil+lp at free.fr-20070422163204-7iksk91jy9091nex
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Tue 2007-04-24 11:49:54 +0200
message:
Update NEWS.
------------------------------------------------------------
revno: 2420.1.16
merged: v.ladeuil+lp at free.fr-20070422163204-7iksk91jy9091nex
parent: v.ladeuil+lp at free.fr-20070422110259-dx0e5do9dzzf0qjt
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sun 2007-04-22 18:32:04 +0200
message:
Handle nonce changes. Fix a nasty bug breaking the auth parameters sharing.
* bzrlib/tests/HTTPTestUtil.py:
(DigestAuthServer.digest_authorized): Check the nonce validity.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib._perform): Always update auth parameters
after a request processing, they could change at any moment.
* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.update_auth): New method to track auth
modifications that should be lead to new authentications.
(AbstractAuthHandler.auth_required): Do not copy the auth
parameters but track the changes instead (copying breaks the auth
parameters sharing between cloned transports). Do not restrict the
auth 'identity' to be (user, realm, password) only.
(AbstractAuthHandler.auth_match): Document the auth parameter
update policy that MUST be respected to avoid retrying to
authenticate with wrong parameters, endlessly.
(AbstractAuthHandler.auth_successful): Not used anymore, but kept
in place if we ever want to handle the 'Authorization-Info' header.
------------------------------------------------------------
revno: 2420.1.15
merged: v.ladeuil+lp at free.fr-20070422110259-dx0e5do9dzzf0qjt
parent: v.ladeuil+lp at free.fr-20070422100132-98l662vmscalaiin
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sun 2007-04-22 13:02:59 +0200
message:
Check digest robustness.
* bzrlib/tests/test_http.py:
(TestDigestAuth.test_changing_nonce): New robustness digest test.
------------------------------------------------------------
revno: 2420.1.14
merged: v.ladeuil+lp at free.fr-20070422100132-98l662vmscalaiin
parent: v.ladeuil+lp at free.fr-20070421213132-6ffsjiv1bf6tnfhq
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sun 2007-04-22 12:01:32 +0200
message:
Tested against squid-2.6.5 with digest authentication.
* bzrlib/transport/http/_urllib2_wrappers.py:
(DigestAuthHandler.build_auth_header): Only the request path
should appear in the uri. nc value should not be quoted for
squid (the devil is in the details...). Well, some cleaning
helped. Don't put algorithm in the header if none was specified by
the server.
------------------------------------------------------------
revno: 2420.1.13
merged: v.ladeuil+lp at free.fr-20070421213132-6ffsjiv1bf6tnfhq
parent: v.ladeuil+lp at free.fr-20070421212934-y3gyvd9pgs19sr7u
parent: pqm at pqm.ubuntu.com-20070421151139-5wau2ukbpx5z1hv2
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sat 2007-04-21 23:31:32 +0200
message:
Merge bzr.dev
------------------------------------------------------------
revno: 2420.1.12
merged: v.ladeuil+lp at free.fr-20070421212934-y3gyvd9pgs19sr7u
parent: v.ladeuil+lp at free.fr-20070421203906-hta5jt0nmauyl9qy
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sat 2007-04-21 23:29:34 +0200
message:
Cometic changes.
------------------------------------------------------------
revno: 2420.1.11
merged: v.ladeuil+lp at free.fr-20070421203906-hta5jt0nmauyl9qy
parent: v.ladeuil+lp at free.fr-20070421113113-b0br4norqbtlx1o2
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sat 2007-04-21 22:39:06 +0200
message:
Implement digest authentication. Test suite passes. Tested against apache-2.x.
* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.auth_required): Do not attempt to
authenticate if we don't have a user. Rework the detection of
already tried authentications. Avoid building the auth header two
times, save the auth info at the right places.
(AbstractAuthHandler.build_auth_header): Add a request parameter
for digest needs.
(BasicAuthHandler.auth_match): Simplify.
(get_digest_algorithm_impls, DigestAuthHandler): Implements client
digest authentication. MD5 and SHA algorithms are supported. Only
'auth' qop is suppoted.
(HTTPBasicAuthHandler, ProxyBasicAuthHandler): Renamed HTTPHandler
and ProxyAuthHandler respectively.
(HTTPBasicAuthHandler, ProxyBasicAuthHandler,
HTTPDigestAuthHandler, ProxyDigestAuthHandler): New classes
implementing the combinations between (http, proxy) and (basic,
digest).
(Opener.__init__): No more handlers in comment ! One TODO less !
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): self.base is not suitable for an
auth uri, it can contain decorators.
* bzrlib/tests/test_http.py:
(TestAuth.test_no_user): New test to check the behavior with no
user when authentication is required.
* bzrlib/tests/HTTPTestUtil.py:
(DigestAuthRequestHandler.authorized): Delegate most of the work
to the server that control the needed persistent infos.
(AuthServer): Define an auth_relam attribute.
(DigestAuthServer): Implement a first version of digest
authentication. Only the MD5 algorithm and the 'auth' qop are
supported so far.
(HTTPAuthServer.init_http_auth): New method to simplify
the [http|proxy], [basic|digest] server combinations writing.
------------------------------------------------------------
revno: 2420.1.10
merged: v.ladeuil+lp at free.fr-20070421113113-b0br4norqbtlx1o2
parent: v.ladeuil+lp at free.fr-20070421092630-ty7a90wrx4v2x5k8
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sat 2007-04-21 13:31:13 +0200
message:
Doc fixes.
------------------------------------------------------------
revno: 2420.1.9
merged: v.ladeuil+lp at free.fr-20070421092630-ty7a90wrx4v2x5k8
parent: v.ladeuil+lp at free.fr-20070420113620-lawri7ftno7lbycw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Sat 2007-04-21 11:26:30 +0200
message:
Refactor proxy and auth test classes. Tests failing for digest auth.
* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.auth_required,
AbstractAuthHandler.auth_successful): Add response parameter as an
authentication scheme may need additional info provided only
there.
* bzrlib/tests/test_http.py:
(TestAuth, TestHTTPAuth, TestProxyAuth, TestHTTPBasicAuth,
TestHTTPProxyBasicAuth): Refactoring.
(TestHTTPDigestAuth, TestHTTPProxyDigestAuth): New classes for
digest authentication tests.
* bzrlib/tests/HttpServer.py:
(TestingHTTPRequestHandler.translate_path): Handles request
proxying based on a server attribute.
(HttpServer): Add proxy_requests attribute.
* bzrlib/tests/HTTPTestUtil.py:
(ProxyServer): Replaces FakeProxyRequestHandler now that
HttpServer handles proxying based on a server attribute.
(AuthRequestHandler, BasicAuthRequestHandler, AuthServer,
HTTPAuthServer, ProxyAuthServer, HTTPBasicAuthServer,
ProxyBasicAuthServer): Refactoring Auth servers and request
handlers.
(HTTPDigestAuthServer, ProxyDigestAuthServer): New classes for
digest authentication.
------------------------------------------------------------
revno: 2420.1.8
merged: v.ladeuil+lp at free.fr-20070420113620-lawri7ftno7lbycw
parent: v.ladeuil+lp at free.fr-20070420112453-smx7l1dfilvozcqp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Fri 2007-04-20 13:36:20 +0200
message:
Interesting typo :-) A mix between capitalize, title and fuzzy may be...
------------------------------------------------------------
revno: 2420.1.7
merged: v.ladeuil+lp at free.fr-20070420112453-smx7l1dfilvozcqp
parent: v.ladeuil+lp at free.fr-20070420065059-oig56fr6u5yxeiob
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Fri 2007-04-20 13:24:53 +0200
message:
Tested against squid-2.6.5 with basic authentication.
* bzrlib/transport/http/_urllib2_wrappers.py:
(ProxyBasicAuthHandler): Add realm in the prompt.
------------------------------------------------------------
revno: 2420.1.6
merged: v.ladeuil+lp at free.fr-20070420065059-oig56fr6u5yxeiob
parent: v.ladeuil+lp at free.fr-20070419172804-m3b5ayyfslh08vrr
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Fri 2007-04-20 08:50:59 +0200
message:
Update NEWS to explain the intent of the modification. Also, use dicts
instead of tuples for auth parameters.
* bzrlib/transport/http/_urllib2_wrappers.py:
Use dicts for auth parameters.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Use dicts for auth parameters.
------------------------------------------------------------
revno: 2420.1.5
merged: v.ladeuil+lp at free.fr-20070419172804-m3b5ayyfslh08vrr
parent: v.ladeuil+lp at free.fr-20070418080816-ovy46d2gv7mzlr86
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Thu 2007-04-19 19:28:04 +0200
message:
Refactor http and proxy authentication. Tests passing. proxy password can be prompted too.
* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.__init__): New auth and proxy_auth attributes: tuples
with all the needed info). Should accept digest auth too.
(extract_authentication_uri): New function. Clearly define how we
define authentication uri for bzr.
(ProxyHandler.set_proxy): As HttpTransport_urllib.__init__,
extract auth info from env variables and leave the auth handlers
do the job.
(AbstractAuthHandler): Better abstraction of authentication,
handles auth errors and preventively set headers once the first
auth is successful.
(AbstractBasicAuthHandler): Specialization for basic scheme
authentication.
(HTTPBasicAuthHandler, ProxyBasicAuthHandler): Simplified, do not
rely on urllib2 anymore.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Use a tuple instead of different
attributes for scheme, user, password as we need two more
attributes (authuri and realm) for each auth (http and
proxy). And, yes, better handling of proxies (including prompting
user for a password).
(HttpTransport_urllib._ask_password): Deleted. _urllib2_wrappers
is handling that now.
* bzrlib/tests/test_http.py:
(TestHTTPBasicAuth.get_user_transport, TestHTTPProxyBasicAuth):
New method to build a different transport when proxying or not.
------------------------------------------------------------
revno: 2420.1.4
merged: v.ladeuil+lp at free.fr-20070418080816-ovy46d2gv7mzlr86
parent: v.ladeuil+lp at free.fr-20070417220718-kce3mj0wn8hi8m02
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Wed 2007-04-18 10:08:16 +0200
message:
Add test checking the number of roundtrips due to 401 or 407 errors.
* bzrlib/tests/test_http.py:
(TestHTTPAuth.test_empty_pass): Verifying the number of
authentication errors allows to count the 40[17] roundtrips.
* bzrlib/tests/HTTPTestUtil.py:
(AbstractBasicAuthRequestHandler.do_GET): Count the authentication
errors.
------------------------------------------------------------
revno: 2420.1.3
merged: v.ladeuil+lp at free.fr-20070417220718-kce3mj0wn8hi8m02
parent: v.ladeuil+lp at free.fr-20070417103339-3kywr38d0p50czrw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Wed 2007-04-18 00:07:18 +0200
message:
Implement http proxy basic authentication.
* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.set_proxy_auth): New method.
(extract_credentials): Moved from
HttpTransport_urllib._extract_auth.
(ProxyHandler.__init__): We need a password_manager for
authentication.
(ProxyHandler.set_proxy): Don't add the auth header, the
ProxyHandlers will do it later.
(ProxyBasicAuthHandler): New class. Handle the http basic
authentication for proxy.
(Opener.__init__): Enable ProxyBasicAuthHandler.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib._extract_auth): Moved to
_urllib2_wrappers.extract_credentials.
* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox.test_empty_pass,
TestHttpProxyWhiteBox.test_user_pass): Deleted. Euivalent tests
exists in TestHTTPProxyBasicAuth now.
* bzrlib/tests/HTTPTestUtil.py:
(BasicAuthRequestHandler): Fix inheritance.
(ProxyBasicAuthRequestHandler): Force the use of
FakeProxyRequestHandler.translate_path. This is a bit ugly :-/
------------------------------------------------------------
revno: 2420.1.2
merged: v.ladeuil+lp at free.fr-20070417103339-3kywr38d0p50czrw
parent: v.ladeuil+lp at free.fr-20070416134120-i8y220zv30spaq0a
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Tue 2007-04-17 12:33:39 +0200
message:
Define tests for http proxy basic authentication. They fail.
* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox._set_and_capture_env_var): Deleted. YAGNI.
(TestProxyHttpServer._set_and_capture_env_var): Deleted. YAGNI
(TestHTTPAuth): Made abstract so it can be reused for proxy.
(TestHTTPAuth.test_prompt_for_password): New class.
(TestHTTPAuth.test_prompt_for_password): New class. Failed tests so
far.
* bzrlib/tests/HTTPTestUtil.py:
(AbstractBasicAuthRequestHandler): Made abstract from
BasicAuthRequestHandler so it can be reused for proxy.
(ProxyBasicAuthRequestHandler): New class.
(ProxyBasicAuthHTTPServer): New class.
------------------------------------------------------------
revno: 2420.1.1
merged: v.ladeuil+lp at free.fr-20070416134120-i8y220zv30spaq0a
parent: pqm at pqm.ubuntu.com-20070416080254-bf3rfk77k5bgfdl7
parent: v.ladeuil+lp at free.fr-20070415155708-frrm29cd9vvvd8do
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.http.auth
timestamp: Mon 2007-04-16 15:41:20 +0200
message:
merge basic auth
------------------------------------------------------------
revno: 2363.4.12
merged: v.ladeuil+lp at free.fr-20070415155708-frrm29cd9vvvd8do
parent: v.ladeuil+lp at free.fr-20070413163858-3v6pox4wls7j9ljb
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Sun 2007-04-15 17:57:08 +0200
message:
Take jam's review comments into account. Fix typos, give better
explanations, add a test, complete another.
* bzrlib/transport/http/_urllib2_wrappers.py:
(HTTPBasicAuthHandler.http_error_401): Better explanation.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): _auth renamed to _auth_scheme.
* bzrlib/tests/test_http.py:
(TestHTTPBasicAuth.test_unknown_user): New test.
* bzrlib/tests/HTTPTestUtil.py:
(BasicAuthHTTPServer): New class. Be explicit about use
requirements: basic authentication is mandatory.
------------------------------------------------------------
revno: 2363.4.11
merged: v.ladeuil+lp at free.fr-20070413163858-3v6pox4wls7j9ljb
parent: v.ladeuil+lp at free.fr-20070413161654-kp4kajrrr23jge2f
parent: pqm at pqm.ubuntu.com-20070413160237-0weampli2rrmzjht
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Fri 2007-04-13 18:38:58 +0200
message:
merge bzr.dev
------------------------------------------------------------
revno: 2363.4.10
merged: v.ladeuil+lp at free.fr-20070413161654-kp4kajrrr23jge2f
parent: v.ladeuil+lp at free.fr-20070413121740-mnwzf1656e31aenj
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Fri 2007-04-13 18:16:54 +0200
message:
Complete tests.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Be more strict on valid users.
(HttpTransport_urllib._ask_password): Delete John's TODO. See ? I
didn't forget ! :-)
* bzrlib/tests/test_ui.py:
Fix some inconsistencies.
* bzrlib/tests/test_http.py:
Add more tests.
(TestHTTPBasicAuth.setUp): Setup a private ui_factory.
------------------------------------------------------------
revno: 2363.4.9
merged: v.ladeuil+lp at free.fr-20070413121740-mnwzf1656e31aenj
parent: v.ladeuil+lp at free.fr-20070413081101-j0keov4vgf493m2d
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Fri 2007-04-13 14:17:40 +0200
message:
Catch first succesful authentification to avoid further 401
roudtrips in hhtp urllib implementation.
* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.__init__): Initialize auth parameters.
(Request.extract_auth): Moved to
HttpTransport_urllib._extract_auth.
(Request.set_auth): New method.
(PasswordManager): Now that the transport handles the auth
parameters, we can use transport.base as the auth uri and work
around the python-2.4 bug.
(HTTPBasicAuthHandler.http_error_401): Capture the auth scheme
when the authentication succeeds.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Extract authentication at
construction time so that we don't have to do it at request build
time. urllib2 will be happier without it.
(HttpTransport_urllib._extract_auth): Moved from
_urllib2_wrappers.Request.extract_auth.
(HttpTransport_urllib._ask_password): Made private and do not
require a 'request' parameter anymore.
(HttpTransport_urllib._perform): The transport is now responsible
for handling the auth parameters and provide them to the
requests. And from there we can avoid the 401 roundtrips
yeaaaaah! (Except the first one of course to determine the auth
scheme).
------------------------------------------------------------
revno: 2363.4.8
merged: v.ladeuil+lp at free.fr-20070413081101-j0keov4vgf493m2d
parent: v.ladeuil+lp at free.fr-20070412160004-zrffqcemqyjb8gvq
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Fri 2007-04-13 10:11:01 +0200
message:
Implement a basic auth HTTP server, rewrite tests accordingly.
* bzrlib/transport/http/_urllib2_wrappers.py:
(PasswordManager.add_password, PasswordManager.find_user_password,
PasswordManager.reduce_uri): Copied from python-2.5 urllib2.py as
a stop gap. A python-2.4 compatible work must be found.
(Opener.preprocess_request): Deleted.
* bzrlib/tests/test_http.py:
(TestHTTPBasicAuth.create_transport_readonly_server): Use the
right auth HTTP server.
(TestHTTPBasicAuth.setUp): Plug the the server.
(TestHTTPBasicAuth.process_request): Deleted.
* bzrlib/tests/HTTPTestUtil.py:
(BasicAuthRequestHandler, AuthHTTPServer): New classes. Implement
basic authentication on HTTP server.
------------------------------------------------------------
revno: 2363.4.7
merged: v.ladeuil+lp at free.fr-20070412160004-zrffqcemqyjb8gvq
parent: v.ladeuil+lp at free.fr-20070412142800-6e1pc8aksxlp7pg4
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Thu 2007-04-12 18:00:04 +0200
message:
Deeper tests, prepare the auth setting that will avoid the
roundtrip with each 401.
* bzrlib/transport/http/_urllib2_wrappers.py:
(Request.__init__): Create the auth field.
(ConnectionHandler.get_key): Deleted.
(HTTPBasicAuthHandler.http_request): Add the authentication
parameter if the request requires it.
* bzrlib/tests/test_http.py:
(TestHTTPBasicAuth.setUp): Create the transport to access the
underlying _urllib2_wrappers opener.
(TestHTTPBasicAuth.process_request): Leave the opener process the
request based on the request.auth field.
------------------------------------------------------------
revno: 2363.4.6
merged: v.ladeuil+lp at free.fr-20070412142800-6e1pc8aksxlp7pg4
parent: v.ladeuil+lp at free.fr-20070412130953-pwgok8w72gxazlel
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Thu 2007-04-12 16:28:00 +0200
message:
Fix tests around stdin emptyness.
* bzrlib/tests/test_ui.py:
Use readline not getline and test '' not None.
------------------------------------------------------------
revno: 2363.4.5
merged: v.ladeuil+lp at free.fr-20070412130953-pwgok8w72gxazlel
parent: v.ladeuil+lp at free.fr-20070411142442-a8eilux70zs8ddg6
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Thu 2007-04-12 15:09:53 +0200
message:
Add white box tests for basic HTTP auth.
* bzrlib/transport/http/_urllib2_wrappers.py:
(HTTPBasicAuthHandler.get_auth, HTTPBasicAuthHandler.set_auth):
New methods.
* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox._proxied_request): Get rid of local imports.
(TestHTTPBasicAuth): New class. Tests basic HTTP auth.
------------------------------------------------------------
revno: 2363.4.4
merged: v.ladeuil+lp at free.fr-20070411142442-a8eilux70zs8ddg6
parent: v.ladeuil+lp at free.fr-20070411141729-cdaswhptaqmz4jrw
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Wed 2007-04-11 16:24:42 +0200
message:
More tidying-up.
* bzrlib/tests/test_ui.py:
Fix some spaceing issues and check more stdin emptiness.
------------------------------------------------------------
revno: 2363.4.3
merged: v.ladeuil+lp at free.fr-20070411141729-cdaswhptaqmz4jrw
parent: v.ladeuil+lp at free.fr-20070410212235-vlcb8g9h421qpnwf
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Wed 2007-04-11 16:17:29 +0200
message:
Tidy-up tests.
* bzrlib/tests/test_ui.py:
Assert that stdin is empty after passwords have been queried.
------------------------------------------------------------
revno: 2363.4.2
merged: v.ladeuil+lp at free.fr-20070410212235-vlcb8g9h421qpnwf
parent: v.ladeuil+lp at free.fr-20070403130039-5yuvjob1hwqjkvsd
parent: pqm at pqm.ubuntu.com-20070410074302-cf6b95587a1058cd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Tue 2007-04-10 23:22:35 +0200
message:
Merge bzr.dev
------------------------------------------------------------
revno: 2363.4.1
merged: v.ladeuil+lp at free.fr-20070403130039-5yuvjob1hwqjkvsd
parent: pqm at pqm.ubuntu.com-20070317015305-7b7562331da9f786
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 72792
timestamp: Tue 2007-04-03 15:00:39 +0200
message:
Partial fix for bug #72292.
* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.ask_password): If a password is already
supplied, pass it to the password manager.
Diff too large for email (2904 lines, the limit is 1000).
More information about the bazaar-commits
mailing list