You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google no longer recommends using JSON service account private keys, instead favoring Workload Identity federation. I have django-storages working in a GKE cluster using Workload Identity, and while files are able to be uploaded and downloaded, I am unable to get a signed URL for the files, instead I am getting this error when calling my_model_instance.my_file_field.url:
AttributeError: you need a private key to sign credentials.the credentials you are currently using <class 'google.auth.compute_engine.credentials.Credentials'> just contains a token. see https://googleapis.dev/python/google-api-core/latest/auth.html#setting-up-a-service-account for more details.
Is there a way to trick django-storages into just making the request for the URL? I believe what is happening is that it thinks it's using Compute Engine Default SA credentials, even though the request should get intercepted by workload identity and be successful. I could be wrong, however.
The text was updated successfully, but these errors were encountered:
pdilyard
changed the title
Get a signed GCS URL using WorkloadIdentity
Get a signed GCS URL when using Workload Identity
Feb 1, 2022
@pdilyard see #941 for a similar issue. I am using Cloud Run vs GKE, but get the same error. There are some work arounds and a link a stack overflow question that may help.
Google no longer recommends using JSON service account private keys, instead favoring Workload Identity federation. I have django-storages working in a GKE cluster using Workload Identity, and while files are able to be uploaded and downloaded, I am unable to get a signed URL for the files, instead I am getting this error when calling
my_model_instance.my_file_field.url
:Is there a way to trick django-storages into just making the request for the URL? I believe what is happening is that it thinks it's using Compute Engine Default SA credentials, even though the request should get intercepted by workload identity and be successful. I could be wrong, however.
The text was updated successfully, but these errors were encountered: