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

Bucket (and file?) policies #24

Open
sckott opened this issue Dec 13, 2023 · 6 comments
Open

Bucket (and file?) policies #24

sckott opened this issue Dec 13, 2023 · 6 comments

Comments

@sckott
Copy link
Member

sckott commented Dec 13, 2023

At least I currently don't have permission to modify bucket ACLs, so can't test and make sure that aws_bucket_acl_modify works.

Perhaps with the new test AWS account i'll be able to test this.

@seankross
Copy link
Collaborator

My super hot take about this is that we should totally avoid bucket ACLs, which I believe is possible. I think they're a legacy feature that has been replaced by Policies.

@sckott
Copy link
Member Author

sckott commented Dec 13, 2023

I like that take. Makes sense, I can see there's a number of AWS docs pages that say ACLs are deprecated.

I googled around a bit and don't see it: What's the process for managing permissions for buckets then? We can do policies stuff for users, groups, roles, but not sure how it's done for buckets.

sckott added a commit that referenced this issue Dec 13, 2023
@sckott
Copy link
Member Author

sckott commented Dec 13, 2023

removed the 2 bucket acl fxns

@seankross
Copy link
Collaborator

I think this is where we should get really opinionated. It appears there are both IAM Policies that can govern bucket access, and Bucket Policies that apply to individual buckets: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-iam-policies.html. I think we should abstract these details away from end users, and enable the following functionality:

  • A function to make a bucket publicly open on the internet for anyone to read from.
  • Some functionality where you can get a public file's public URL.
  • A function to allow a specific user/group/role to read from a bucket.
  • A function to allow a specific user/group/role to read and write from a bucket.

It would be cool if for these use cases the end user didn't have to worry about policies, and sixtyfour could create, find, and assign the appropriate policies.

@sckott sckott changed the title Modify bucket ACL Bucket policies Dec 14, 2023
@sckott
Copy link
Member Author

sckott commented Jan 10, 2024

Sorry for the delay. Okay, so maybe the functions would look like:

  • aws_bucket_as_public()
  • aws_file_url(type = "private") or aws_file_url(type = "public")
  • aws_group(name="users") %>% aws_bucket_allow_read()
  • aws_group(name="users") %>% aws_bucket_allow_read_write()

Thoughts?

@sckott sckott changed the title Bucket policies Bucket (and file?) policies Jan 10, 2024
@sckott
Copy link
Member Author

sckott commented Jan 10, 2024

@seankross #21 may be the same as

Some functionality where you can get a public file's public URL

at least related

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

No branches or pull requests

2 participants