mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[GH-ISSUE #1073] Cannot use signed url with java #162
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#162
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 @marcelocamanho on GitHub (Feb 14, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1073
Was anyone able to use them?
I am using a simple code to init the storage service and to access it, but it fails.
This causes the error:
Was anyone able to work around this please?
Thanks
@fsouza commented on GitHub (May 2, 2023):
Hey @marcelocamanho, sorry for such a delayed response, I completely missed this issue. Signing URLs doesn't really involve the server, so you need a valid key to sign even if you're using a fake server. What I've seen other folks do in the past is generating some sort of X.509 certificate or even generating a real one from Google, invalidating it and then using in tests/CI.
@SamueLacmene commented on GitHub (Dec 21, 2023):
@marcelocamanho Did you find a solution to your Problem? I'm facing the same issue. If yes can you please share you solution ?! :-)
@SamueLacmene commented on GitHub (Dec 21, 2023):
I managed to mock the credential, so that the method
storage.signUrlwas able to work without having to use aservice-account-key.json. Here is the solution:I'm using Sprint + kotlin + mockito
@Burtan commented on GitHub (Dec 27, 2023):
While the fake signing is working for me. The generated url does not use the fake gcs url, but https://storage.googleapis.com/.
I see, it is working as intended.
https://github.com/fsouza/fake-gcs-server#using-with-signed-urls
@tlusk commented on GitHub (Jun 26, 2025):
Here's a way you can create a new
ServiceAccountCredentialsobject without needing to mock it like the above solution: