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

enables passing security_token to constructor #1246

Merged
merged 1 commit into from May 18, 2023

Conversation

smirolo
Copy link
Contributor

@smirolo smirolo commented May 16, 2023

Without this line, BaseStorage.__init__ raises an ImproperlyConfigured exception which prevents passing security_token as a parameter to S3Boto3Storage.__init__.

We use django-storages to manage a multi-tenant / multi-S3-bucket / multi-aws-account service. As a result, multiple S3Boto3Storage classes get instantiated with the proper information (access_key, secret_key and security_token).

This line fixes our problem. I am not sure if there was a reason why security_token is not
listed in default settings and/or if as a result it breaks some other use cases.

Without this line, `BaseStorage.__init__` raises an `ImproperlyConfigured`
exception which prevents passing security_token as a parameter to
`S3Boto3Storage.__init__`.
@jschneier
Copy link
Owner

Thanks. I guess with this we can purge out line 259 and probably a bunch of stuff around there. Can you just start with removing that and I will send another cleanup PR.

@jschneier
Copy link
Owner

Never mind, it doesn't matter so I will take this now.

@jschneier jschneier merged commit cdad67b into jschneier:master May 18, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants