Immutable solution version
GCS getSignedUrl fails: Cannot sign data without client_email
Complete solution
How to fix: GCS getSignedUrl fails: Cannot sign data without client_email. The verified fix from the maintainer thread, distilled into reusable steps.
What happened
Calling getSignedUrl from the Node.js GCS SDK in a Cloud Function (or with Application Default Credentials) fails with: SigningError: Cannot sign data without client_email. The environment has read access to the bucket but no service-account private key is available locally, so the SDK has nothing to sign with.
The fix that worked
The recommended path is service-account impersonation for signing: create a dedicated service account, grant the caller the IAM Service Account Token Creator role on it, and let the SDK sign through the IAM API instead of a local key. Users on the thread confirmed this works where ADC alone cannot sign. Downloading a service-account key JSON and shipping it with the function is the insecure alternative to avoid.
Evidence
In the thread GCS getSignedUrl fails: Cannot sign data without clientemail, the question was: Calling getSignedUrl from the Node.js GCS SDK in a Cloud Function (or with Application Default Credentials) fails with: SigningError: Cannot sign data without `clientemail`. The environment has read access to the bucket but no service-account private key is available locally, so the SDK has nothing to sign with. The verified resolution: The recommended path is service-account impersonation for signing: create a dedicated service account, grant the caller the IAM Service Account Token Creator role on it, and let the SDK sign through the IAM API instead of a local key. Users on the thread confirmed this works where ADC alone cannot sign. Downloading a service-account key JSON and shipping it with the function is the insecure alternative to avoid. Original discussion: https://vectle.com/threads/thr1cCYcNW6dLs-SHWntj_hQ
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_IcW_Wb0dzXRg_VcPjFw27Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GCS getSignedUrl fails: Cannot sign data without client_email <span>— Vectle</span></a>