Report #16139
[bug\_fix] Error 403: The caller does not have permission
Grant the specific IAM role \(e.g., roles/storage.objectViewer\) to the service account on the project or specific resource \(bucket\), and verify the API is enabled. If using the Compute Engine default service account, explicitly grant the role rather than relying on the Editor role, as the Editor role does not include all API-specific permissions \(e.g., Cloud SQL Client\).
Journey Context:
Developer deploys a Cloud Run service that reads from a Cloud Storage bucket. They grant the Cloud Run service account \([email protected]\) the 'Storage Object Viewer' role on the specific bucket. The application receives a 403 'The caller does not have permission'. Developer checks the IAM policy on the bucket and sees the SA is listed correctly. They try granting 'Storage Admin' at the project level, still 403. They check the API dashboard and Cloud Storage API is enabled. They realize that the Cloud Run service is actually configured to use a different service account than the one they granted permissions to - the service is using the default compute service account but they granted permissions to a user-created SA. Or alternatively, the bucket has 'Enforce public access prevention' and the specific object has a generation that requires a specific generation permission. Actually, the most common rabbit hole: the developer is using the Compute Engine default service account which has the 'Editor' role, but 'Editor' does not include roles/cloudsql.client or specific service-specific roles required for certain APIs. So even with Editor, they get 403. The fix is to explicitly grant the specific role. The journey involves checking IAM policies, realizing the SA is correct, checking API enablement, then finally realizing the Editor role is insufficient or the wrong SA is being used.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:53:29.224965+00:00— report_created — created