-
Notifications
You must be signed in to change notification settings - Fork 823
Description
Is your feature request related to a problem? Please describe.
I'm attempting to write a tool to fetch public GCS objects (from the gs://knative-release
bucket) for nightly automation. Given that the buckets are public, I'd prefer not to supply any GCS credentials (and the API explorer seems to indicate that they are not required).
Describe the solution you'd like
Provide an option / additional URLOpener
and scheme for anonymous GCS usage. This could be a global method gcsblob.RequireCredentials(boolean)
or a separate module or gs-noauth://
URL scheme.
Describe alternatives you've considered
Re-registering the gs://
handler in the DefaultURlMux
with a custom opener with my own gcp.HTTPClient
.
Additional context
I'm happy to provide a patch with whichever pattern is of interest. (My thought would be the RequireCredentials
path would be cleanest, and would hook the lazyCredsOpener
, rather than requiring re-registering the prefix.)