Skip to content

blob/gcsblob: Support unauthenticated credentials for public buckets #2965

@evankanderson

Description

@evankanderson

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions