diff --git a/py/common/api_utils.py b/py/common/api_utils.py index 726aa58..190f5ec 100644 --- a/py/common/api_utils.py +++ b/py/common/api_utils.py @@ -105,7 +105,7 @@ def send_api_request( ) if response.status_code == 403: - logging.warning('403 Caught: %s', response) + logging.warning('403 Caught: %s', response.json()) return '403: Not allowed (Check permissions)' else: response.raise_for_status() diff --git a/terraform/iam_policies.tf b/terraform/iam_policies.tf index 3b2027a..5a5b7b6 100644 --- a/terraform/iam_policies.tf +++ b/terraform/iam_policies.tf @@ -165,7 +165,10 @@ resource "google_cloud_run_service_iam_policy" "backend_run_invoker" { resource "google_project_iam_binding" "project_token_creator" { project = var.project_id role = "roles/iam.serviceAccountTokenCreator" - members = ["serviceAccount:${google_project_service_identity.pubsub_agent.email}"] + members = [ + "serviceAccount:${google_project_service_identity.pubsub_agent.email}", + "serviceAccount:${google_service_account.backend_sa.email}" + ] }