Merge ~cjwatson/launchpad-buildd:librarian-macaroons into launchpad-buildd:master
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 107aeec724037de874fe9d6be68f8f067bfc350a |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad-buildd:librarian-macaroons |
Merge into: | launchpad-buildd:master |
Diff against target: |
82 lines (+31/-4) 3 files modified
debian/changelog (+2/-0) lpbuildd/builder.py (+6/-4) lpbuildd/tests/test_buildd.py (+23/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jürgen Gmach | Approve | ||
Review via email: mp+430026@code.launchpad.net |
Commit message
Fix handling of librarian macaroons
Description of the change
https:/
Firstly, these macaroons are sent with an empty username, so we need to send authentication if either the username or password is non-empty rather than only if the username is non-empty.
Secondly, the librarian just sends 404 on authorization failures to avoid revealing information, so we have to tell `urllib.request` to send authentication credentials up-front (which is faster anyway) rather than waiting for a 401.