Report #70024
[bug\_fix] GCP IAM Permission denied \(HTTP 403\) despite having role granted due to IAM Conditions
Check the IAM binding for a condition \(e.g., \`resource.name.startsWith\('projects/\_/buckets/prod-'\)\` or \`request.time < timestamp\('2024-01-01T00:00:00Z'\)\`\) and either remove the condition or ensure the resource/request meets the condition \(e.g., rename bucket to match prefix, or access within time window\).
Journey Context:
Developer grants 'Storage Admin' role to a service account for bucket 'dev-data-bucket'. The application immediately gets '403 Permission denied'. The developer checks IAM > Bucket Permissions and confirms 'Storage Admin' is listed for the service account. They check the bucket name is correct. After an hour of checking VPC Service Controls and organization policies, they click 'View condition' in the IAM console next to the role binding. They discover a condition: 'Resource name starts with projects/\_/buckets/prod-'. They realize this IAM binding was copy-pasted from a production Terraform module that included the condition for safety. They either remove the condition for the dev environment or rename the bucket to 'prod-data-bucket-dev' to match the prefix \(if following naming convention\). The 403 resolves immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:07:06.517350+00:00— report_created — created