Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2833)

Issue 14011044: Wire up authenticating httpstorage

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by axw
Modified:
10 years, 6 months ago
Reviewers:
axw1, thumper, mp+187964
Visibility:
Public.

Description

Wire up authenticating httpstorage There are two things happening here: - httpstorage authentication changes - wiring up to null provider/localstorage worker. The httpstorage authentication mechanism has changed to use an auth key (randomly generated as part of the boilerplate), rather than client certificates. This gives us more options for using the storage, since now you don't need the client to share the CA key. Also, when serving HTTPS, HTTP is *also* provided, but only for non-modifying operations. This allows wget et al. to fetch files from the storage without bypassing certificate validation. The HTTP interface disallows modifying operations if there is an HTTPS interface backing it. To get an HTTPS URL, a HEAD request may be performed on the HTTP interface. https://code.launchpad.net/~axwalk/juju-core/null-provider-storage-auth/+merge/187964 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Wire up authenticating httpstorage #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+506 lines, -97 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/httpstorage/backend.go View 6 chunks +55 lines, -19 lines 2 comments Download
M environs/httpstorage/backend_test.go View 3 chunks +9 lines, -7 lines 0 comments Download
M environs/httpstorage/storage.go View 5 chunks +55 lines, -26 lines 0 comments Download
M environs/httpstorage/storage_test.go View 5 chunks +35 lines, -14 lines 0 comments Download
M environs/manual/bootstrap.go View 2 chunks +3 lines, -6 lines 0 comments Download
M provider/null/config.go View 2 chunks +6 lines, -0 lines 0 comments Download
M provider/null/config_test.go View 1 chunk +4 lines, -3 lines 0 comments Download
M provider/null/environ.go View 1 5 chunks +49 lines, -0 lines 2 comments Download
M provider/null/provider.go View 1 1 chunk +9 lines, -2 lines 0 comments Download
M worker/localstorage/config.go View 2 chunks +112 lines, -0 lines 0 comments Download
A worker/localstorage/config_test.go View 1 chunk +132 lines, -0 lines 0 comments Download
M worker/localstorage/worker.go View 2 chunks +35 lines, -20 lines 0 comments Download

Messages

Total messages: 4
axw
Please take a look.
10 years, 7 months ago (2013-09-27 02:50:33 UTC) #1
axw
Please take a look.
10 years, 7 months ago (2013-09-27 02:59:53 UTC) #2
thumper
LGTM, few comments https://codereview.appspot.com/14011044/diff/4001/environs/httpstorage/backend.go File environs/httpstorage/backend.go (right): https://codereview.appspot.com/14011044/diff/4001/environs/httpstorage/backend.go#newcode78 environs/httpstorage/backend.go:78: http.Error(w, "method HEAD is not supported", ...
10 years, 6 months ago (2013-10-02 05:07:25 UTC) #3
axw1
10 years, 6 months ago (2013-10-02 05:47:24 UTC) #4
https://codereview.appspot.com/14011044/diff/4001/environs/httpstorage/backen...
File environs/httpstorage/backend.go (right):

https://codereview.appspot.com/14011044/diff/4001/environs/httpstorage/backen...
environs/httpstorage/backend.go:78: http.Error(w, "method HEAD is not
supported", http.StatusMethodNotAllowed)
On 2013/10/02 05:07:25, thumper wrote:
> shouldn't we return here?  So as not to change the header to 200 OK?

It doesn't actually change in practice, as the first header wins. But this was
an oversight and I've fixed it. I added a test while I was at it. Thanks.

https://codereview.appspot.com/14011044/diff/4001/provider/null/environ.go
File provider/null/environ.go (right):

https://codereview.appspot.com/14011044/diff/4001/provider/null/environ.go#ne...
provider/null/environ.go:150: return
httpstorage.Client(e.envConfig().storageAddr())
On 2013/10/02 05:07:25, thumper wrote:
> If this is an error condition, shouldn't we log an error (which the users now
> see) and return nil rather than http storage?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b