-
Notifications
You must be signed in to change notification settings - Fork 218
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
creating signed url's give with sdk gives AttributeError: you need a private key to sign credentials.the credentials you are currently using <class 'google.auth.credentials.AnonymousCredentials'> just contains a token. #1391
Comments
Signed URLs are a client-side operation, they don't involve neither the real or the fake server. You need to use fake credentials to sign the URL. When you do send a request to the signed URL, fake-gcs-server will take any signed URL and trust that it's valid. |
@fsouza I am getting this error when trying to generate signed URLs using the GCS Go CDK:
Which I believe is the same root cause as the original on this issue. Can you provide an example or some docs about how to create the fake/mock credentials? Thank you |
It seems that by default it is the real server that signs the url. The following code is from the node library
So it seems like one should be able to make Storage client use a JWT client internally. I haven't figured that part yet though. |
I was able to do this by assigning dummy values to |
I'm using this snippet to create a pre-signed download url
Because this is in a test environment I'm not setting the GOOGLE_APPLICATION_CREDENTIALS because it needs to use the fake-gcs-container.
Any workarounds for this error ? help would be much appriciated.
The text was updated successfully, but these errors were encountered: