Support signurl using compute engine service account
See original GitHub issueHi! I noticed in #968 there was functionality added to create signed URLs without a local private key. That’s awesome! I’m trying to use this and I could use a little help.
I’m running on a compute instance and I’m able to do things like list the contents of my bucket without setting up any special configuration using the default service account, but trying to create a signed URL results in this message:
$ gsutil signurl -d 10m -u gs://[snip]/[snip].zip
URL HTTP Method Expiration Signed URL
CommandException: Cannot get service account email id for the given credential type.
I’m guessing I need to set up a boto config, though I haven’t had to do that for other actions. Is there anything you could suggest?
I’m using gsutil 4.49.
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:14 (1 by maintainers)
Top Results From Across the Web
signurl - Create a signed URL | Cloud Storage
The signurl command uses the private key for a service account (the '<private-key-file>' argument) to generate the cryptographic signature for the generated ...
Read more >How can I create a signed URL for Google Cloud Storage with ...
I can create a new, separate service account from the developer console, and that has the option of downloading a .p12 file for...
Read more >How to create Signed Url – Temporary Access in ... - YouTube
Create new service account and create new bucket for demo: ... How to create Signed Url – Temporary Access in Bucket Google Cloud...
Read more >Google Cloud Storage Service Account Key Management for ...
It looks like the best practice here is to use the client.Bucket(bucket).SignedURL(object, opts) API. func storageSignUrl(object string) ...
Read more >signurl - Create a signed url - Google Cloud Storage - huihoo
Note: Unlike the gsutil ls command, the signurl command does not support operations ... The signurl command uses the private key for a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Edited the title to better describe the exact feature that is needed here.
On digging a little more into this problem, it looks like the fix is not as simple as I thought earlier.
GceAssertionCredentials
(which is what gets used if using the default setup from a GCE instance) does not provideservice_account_email
directly which is required for signing the url.We might have to figure out other ways to access the service account email which would need further exploring the API. A quick look here shows that currently there is no good way to extract that information.
You can run
gsutil version -l
to check the boto config path.