Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit e47ebad

Browse files
committed
Fixed #675: Added an ENV/Option to Configure USE_SIGV4
1 parent 541f217 commit e47ebad

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Brad Ison <[email protected]>
1212
Brendan Burns <[email protected]>
1313
Chas Ballew <[email protected]>
1414
Chris Tierney <[email protected]>
15+
Christian Schmitt <[email protected]>
1516
Christophe Furmaniak <[email protected]>
1617
Dan Trujillo <[email protected]>
1718
Daniel Graña <[email protected]>

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ AWS Simple Storage Service options
322322
server-side by S3 and will be stored in an encrypted form while at rest
323323
in S3.
324324
1. `s3_secure`: boolean, true for HTTPS to S3
325+
1. `s3_use_sigv4`: boolean, true for USE_SIGV4 (boto_host needs to be set or use_sigv4 will be ignored by boto.)
325326
1. `boto_bucket`: string, the bucket name for *non*-Amazon S3-compliant object store
326327
1. `boto_host`: string, host for *non*-Amazon S3-compliant object store
327328
1. `boto_port`: for *non*-Amazon S3-compliant object store

config/config_sample.yml

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ s3: &s3
8585
s3_secure: _env:AWS_SECURE:true
8686
s3_access_key: _env:AWS_KEY
8787
s3_secret_key: _env:AWS_SECRET
88+
s3_use_sigv4: _env:AWS_USE_SIGV4
8889
boto_host: _env:AWS_HOST
8990
boto_port: _env:AWS_PORT
9091
boto_calling_format: _env:AWS_CALLING_FORMAT

docker_registry/drivers/s3.py

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def makeConnection(self):
9191
else:
9292
self.signer = None
9393

94+
if self._config.s3_use_sigv4 is True:
95+
if self._config.boto_host is None:
96+
logger.warn("No S3 Host specified, Boto won't use SIGV4!")
97+
boto.config.add_section('s3')
98+
boto.config.set('s3', 'use-sigv4', 'True')
99+
94100
if self._config.s3_region is not None:
95101
return boto.s3.connect_to_region(
96102
region_name=self._config.s3_region,

0 commit comments

Comments
 (0)