Skip to content

Commit

Permalink
Merge pull request #8 from AdRoll/add-content-type-header
Browse files Browse the repository at this point in the history
Add content-type header text/plain to passwords
  • Loading branch information
rb-nr authored May 18, 2020
2 parents 726ebb5 + 6c74090 commit aa373ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion s3keyring/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package = 's3keyring'
project = "S3 backend for the keyring module"
project_no_spaces = project.replace(' ', '')
version = '0.7.1.post0'
version = '0.7.1.post1'
description = 'Keeps your secrets safe in S3'
authors = ['German Gomez-Herrero']
authors_string = ', '.join(authors)
Expand Down
10 changes: 7 additions & 3 deletions s3keyring/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ def set_password(self, service, username, password):
# Save in S3 using both server and client side encryption
keyname = self._get_s3_key(service, username)
try:
self.bucket.Object(keyname).put(ACL='private', Body=pwd_base64,
ServerSideEncryption='aws:kms',
SSEKMSKeyId=self.kms_key_id)
self.bucket.Object(keyname).put(
ACL='private',
Body=pwd_base64,
ServerSideEncryption='aws:kms',
SSEKMSKeyId=self.kms_key_id,
ContentType='text/plain'
)
except EndpointConnectionError:
if self.use_local_keyring:
# Can't connect to S3: fallback to OS keyring
Expand Down

0 comments on commit aa373ab

Please sign in to comment.