mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[GH-ISSUE #537] Signed URLs: Cannot sign data with client_email #102
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @psteinroe on GitHub (Jul 16, 2021).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/537
Hi,
I am having troubles with signed urls using node. When using the following config,
generating a signed url with
fails with
Cannot sign data without 'client_email'.When I add a fake service account with
it returns an upload url looking something like
https://storage.googleapis.com/network-test/File/4ce53b09-648c-4d95-8408-db1acd967b37/4ce53b09-648c-4d95-8408-db1acd967b37.jpg?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=123-abc%40developer.gserviceaccount.com%2F20210716%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20210716T140253Z&X-Goog-Expires=901&X-Goog-SignedHeaders=host&X-Goog-Signature=2f0287af9ed53efbd95d4090471ce8702a06b0ecfd8a39b2c771a32c3c865be7053e919fa0f1e8e8ac7026ed729b0c871b09cfc08c4337c39fdefbb300df517e46eeec6828ec23a24b27fd1e9ada30604aca2ce067b83ff5ebfbd1a7365efdfb7d2c3c428980f94a40121853493343216fa82e6f6b512897cb9475d5743fb45a5f278c135cd0301adc912d4c6ac6b4bfae3834628dc8705e38e3032f738f3ddc61ad564c7e3614914d2f260a2cb84b63230347265b86d193d40000590802823236c1ba2b269fa64da1452a1ceae56f74089421815da7c3ced08df73df41ec5821e9e83a9ee1a33aa0015cde4b1656e0ade8716b4b3a9d603ad933cebc03b5ba6and then the upload fails with
Request failed with status code 403.Does anyone has an example for uploading to fake-gcs using a signed url?
@BruAndreo commented on GitHub (Sep 16, 2021):
Hi @steinroe ,
How did you solve this? I have the same problem.
@psteinroe commented on GitHub (Sep 16, 2021):
Unfortunately I did not solve it yet, but I am still highly interested in doing so.
@fsouza commented on GitHub (Oct 7, 2021):
Hey @steinroe @BruAndreo, signing is a client-side only change. You'd need to manually override the host.
fake-gcs-server doesn't really care about signed URLs though, it should take and process them, but there's no way for it to do any validation of the params.
@psteinroe commented on GitHub (Oct 7, 2021):
Thanks for the clarification @fsouza! Would you mind providing an example (preferably with a node client) to upload files to fake-gcs-server? I can't get it to work...
@fsouza commented on GitHub (Oct 14, 2021):
I haven't used the nodejs much, but are you running into the same issue as #346? Or is it something different?
@josmardias commented on GitHub (Oct 22, 2021):
@steinroe
Create a docker-compose.yml like this:
then this is how you upload a file:
if instead you are trying to use
createWriteStreamremember to disable resumable, like this@psteinroe commented on GitHub (Oct 22, 2021):
Thanks for your inputs @josmardias @fsouza! I got it to work now. The fixes were: