Skip to content

Commit

Permalink
[s3] Re-allow overrides of access_key_names (#1026)
Browse files Browse the repository at this point in the history
* Re-allow override of access_key_names, etc.

This change:

b13efd9

swapped from using `self.access_key_names` to `S3Boto3Storage.access_key_names`; it's unclear if that was intentional or not, but that means it does not accept overrides; we relied on overrides to use some bucket specific keys provided by rook ceph.

* Update s3boto3.py
  • Loading branch information
toddgardner authored and jschneier committed Sep 19, 2021
1 parent 8e48a30 commit fe6dd57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,16 @@ def _get_access_keys(self):
provided in the settings then get them from the environment
variables.
"""
access_key = self.access_key or lookup_env(S3Boto3Storage.access_key_names)
secret_key = self.secret_key or lookup_env(S3Boto3Storage.secret_key_names)
access_key = self.access_key or lookup_env(self.access_key_names)
secret_key = self.secret_key or lookup_env(self.secret_key_names)
return access_key, secret_key

def _get_security_token(self):
"""
Gets the security token to use when accessing S3. Get it from
the environment variables.
"""
security_token = self.security_token or lookup_env(S3Boto3Storage.security_token_names)
security_token = self.security_token or lookup_env(self.security_token_names)
return security_token

def _clean_name(self, name):
Expand Down

0 comments on commit fe6dd57

Please sign in to comment.