You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Set explicit User-Agent string when accessing S3 #1353
Using a distinctive UA string containing the registry version + go version would help debugging (distinguish registry queries from other systems accessing the bucket).
That UA string should be set only for the registry, and not for distribution as a library.
Activity
stevvooe commentedon Jan 14, 2016
@dmp42 So, this should be set in the S3 library?
BrianBland commentedon Jan 14, 2016
Yeah, I'm trying to see if there's any extensible way to modify the S3 client through the goamz library that would enable a change like this, would have to modify the http Client/Transport found here: https://github.com/AdRoll/goamz/blob/master/s3/s3.go#L1165
BrianBland commentedon Jan 14, 2016
Read over the v4 auth documentation and only the
Host,Content-Typeand anyx-amz-*headers need to be signed, so changing other headers at the final transport wouldn't break signatures. I'd suggest adding something akin to our client RequestModifier, or at least HeaderModifier (https://github.com/docker/distribution/blob/master/registry/client/transport/transport.go#L11), but interestingly enough the official http.RoundTripper docs suggest that RoundTrip should not modify the request (https://golang.org/pkg/net/http/#RoundTripper)stevvooe commentedon Jan 19, 2016
@BrianBland The only way to fix this would probably to refactor goamz to allow injection of an
http.Client.RichardScothern commentedon Jan 20, 2016
+1. Do it!
On Tue, Jan 19, 2016 at 3:56 PM, Stephen Day [email protected]
wrote:
RichardScothern commentedon Apr 4, 2016
Implemented.