Docs: Clarification in README.md for the Cloud Run set up
Update/add to: https://github.com/google/mcp-security/blob/main/run-with-google-adk/README.md#prerequisites-1
- Must have the proper permissions for the identity deploying the server and proper permissions for the default compute engine service account.
If these permissions are not present you will get this error regarding the default Service Account:
Deployment failed
ERROR: (gcloud.run.deploy) INVALID_ARGUMENT: Invalid build request. could not resolve source: googleapi: Error 403: [email protected] does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist)., forbidden
Failed to deploy the service.
Explanation: Note: The iam.automaticIamGrantsForDefaultServiceAccounts organization policy constraint prevents the Editor role from being automatically granted to default service accounts. If you created your organization after May 3, 2024, this constraint is enforced by default.
The default Service Account you will also need to add Vertex AI IAM roles: https://cloud.google.com/vertex-ai/generative-ai/docs/access-control#predefined_roles
**Error:**
`"Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/<project-id>/locations/<region>/publishers/google/models/gemini-2.5-pro' (or it may not exist).", 'status': 'PERMISSION_DENIED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'IAM_PERMISSION_DENIED', 'domain': 'aiplatform.googleapis.com', 'metadata': {'resource': 'projects/<project-id>/locations/<region>/publishers/google/models/gemini-2.5-pro', 'permission': 'aiplatform.endpoints.predict'}}]}}"}`
My default Service Account has the following roles: [email protected]
- Cloud Run Builder (roles/run.builder)
- Vertex AI User (roles/aiplatform.user)