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

Set storage for BuildCommand and BuildEnvironment as private #7893

Merged
merged 1 commit into from Feb 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions readthedocs/storage/s3_storage.py
Expand Up @@ -50,6 +50,10 @@ def __init__(self, *args, **kwargs):
'Ensure S3_BUILD_COMMANDS_STORAGE_BUCKET is defined.',
)

self.bucket_acl = 'private'
self.default_acl = 'private'
self.querystring_auth = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure this works in dev, too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move the S3PrivateBucketMixin I added in https://github.com/readthedocs/readthedocs-corporate/pull/1103/files#diff-ec70ada13c82176ac8d16446079e8f0966583f9d20ec9c1a80b3b95ae0d19fafR8-R17 to this repository and share this code with .com

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this works in dev. I think we can share a lot of code in .com now yes



class S3StaticStorage(OverrideHostnameMixin, ManifestFilesMixin, S3Boto3Storage):

Expand Down Expand Up @@ -88,3 +92,7 @@ def __init__(self, *args, **kwargs):
'AWS S3 not configured correctly. '
'Ensure S3_BUILD_ENVIRONMENT_STORAGE_BUCKET is defined.',
)

self.bucket_acl = 'private'
self.default_acl = 'private'
self.querystring_auth = True