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

S3Boto3: Add AWS_S3_VERIFY #580

Merged
merged 1 commit into from
Sep 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/backends/amazon-S3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ Available are numerous settings. It should be especially noted the following:
``AWS_S3_USE_SSL`` (optional: default is ``True``)
Whether or not to use SSL when connecting to S3.

``AWS_S3_VERIFY`` (optional: default is ``None`` - boto3 only)
Whether or not to verify the connection to S3. Can be set to False to not verify certificates or a path to a CA cert bundle.

``AWS_S3_ENDPOINT_URL`` (optional: default is ``None``)
Custom S3 URL to use when connecting to S3, including scheme. Overrides ``AWS_S3_REGION_NAME`` and ``AWS_S3_USE_SSL``.

Expand Down
4 changes: 3 additions & 1 deletion storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class S3Boto3Storage(Storage):
endpoint_url = setting('AWS_S3_ENDPOINT_URL')
region_name = setting('AWS_S3_REGION_NAME')
use_ssl = setting('AWS_S3_USE_SSL', True)
verify = setting('AWS_S3_VERIFY', None)
max_memory_size = setting('AWS_S3_MAX_MEMORY_SIZE', 0)

def __init__(self, acl=None, bucket=None, **settings):
Expand Down Expand Up @@ -306,7 +307,8 @@ def connection(self):
region_name=self.region_name,
use_ssl=self.use_ssl,
endpoint_url=self.endpoint_url,
config=self.config
config=self.config,
verify=self.verify,
)
return self._connections.connection

Expand Down