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

Use credentials from a string #19

Open
IlyaSemenov opened this issue May 22, 2020 · 2 comments
Open

Use credentials from a string #19

IlyaSemenov opened this issue May 22, 2020 · 2 comments

Comments

@IlyaSemenov
Copy link

IlyaSemenov commented May 22, 2020

For some reason django-gcloud-storage needs Google SA credentials specifically stored in a file, which contracts the modern 12 factor approach where the apps/containers are stateless and everything is passed via environment variables.

Will you please add support for GCS_CREDENTIALS (as opposed to GCS_CREDENTIALS_FILE_PATH)? gcloud itself already supports it with storage.Client(credentials=google.auth.jwt.Credentials.from_service_account_info(json.load(base64.b64decode(settings.GCS_CREDENTIALS).decode("utf-8")))) (vs. storage.Client.from_service_account_json)

@strayer
Copy link
Owner

strayer commented May 22, 2020

This would probably be a simple change mostly here. Feel free to open a PR with this. Alternatively this may already be possible with django-storages, since it supports gcloud natively for a while now.

@IlyaSemenov
Copy link
Author

Thank you, django-storages worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants