Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blob/all: add an option to set a blob to be "public" #1108

Closed
kaihendry opened this issue Jan 11, 2019 · 10 comments
Closed

blob/all: add an option to set a blob to be "public" #1108

kaihendry opened this issue Jan 11, 2019 · 10 comments
Labels
enhancement New feature or request
Milestone

Comments

@kaihendry
Copy link

I'm puzzled how I can't find any gocloud.dev for this typical use case, so can I assume there is no abstraction for it yet?

https://stackoverflow.com/questions/54121278/how-to-set-public-read-using-go-cloud-s3blob

@go-cloud-bot
Copy link

go-cloud-bot bot commented Jan 11, 2019

Please edit the title of this issue with the name of the affected package, or "all", followed by a colon, followed by a short summary of the issue. Example: blob/gcsblob: not blobby enough.

@kaihendry kaihendry changed the title How does one set ACLs for a S3 object? blob/s3blob: How does one set ACLs for a S3 object? Jan 11, 2019
@zombiezen zombiezen added the enhancement New feature or request label Jan 11, 2019
@zombiezen
Copy link
Contributor

That's correct, there is no abstraction for it yet. We have not found a portable design to surface ACLs that does not violate the seam between developers and operators that Go Cloud tries to create.

@zombiezen zombiezen added this to the Unplanned milestone Jan 11, 2019
@vangent
Copy link
Contributor

vangent commented Jan 11, 2019

Can you give a bit more context on what you're trying to do? You have an AWS bucket, and you want to make some specific blobs in that bucket public-read?

  • You could set public-read for the whole bucket.
  • You could used SignedURL to create a publicly usable URL for a specific blob.

@vangent
Copy link
Contributor

vangent commented Jan 11, 2019

If making specific blobs in a bucket publicly readable (but not the whole bucket) is common, we might be able to add support for that (without supporting other kinds of ACLs, which is difficult across providers).

@kaihendry
Copy link
Author

I'm making my whole bucket public in my case: https://github.com/kaihendry/picofeed

Nonetheless a signed URL function, could be fun. I mean is there an API telling my the public URL for a Object? That would be useful, since I am always struggling to work that out.

@vangent
Copy link
Contributor

vangent commented Jan 13, 2019

is there an API telling my the public URL for a Object

SignedURL (https://godoc.org/gocloud.dev/blob#Bucket.SignedURL) is different than that; it creates a new limited-time public URL that can be used to view an object that's not inherently public.

@vangent
Copy link
Contributor

vangent commented Jan 13, 2019

I'm going to change this issue to be about adding a new feature to be able to set a specific blob "public"; we'll see what the demand is for this before doing it.

@vangent vangent changed the title blob/s3blob: How does one set ACLs for a S3 object? blob/s3blob: add an option to set a blob to be "public" Jan 13, 2019
@vangent vangent changed the title blob/s3blob: add an option to set a blob to be "public" blob/all: add an option to set a blob to be "public" Jan 13, 2019
@felipeweb
Copy link
Contributor

felipeweb commented Jan 13, 2019

I use As function to do this but it’s useful to have an easier way to do this

@vangent
Copy link
Contributor

vangent commented Jan 14, 2019

I did a bit of research on this.

GCS

AWS S3

Azure

  • Not supported; ACLs are only set at the container/bucket level, not on individual blobs.

@vsaroopchand
Copy link
Collaborator

@kaihendry The bucket is presumed to be created and configured; the Azure blob driver does not create buckets. If you must create buckets, use bucket.As() to obtain the Azure SDK type and create the container with your desired settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants