A workflow fails to start due to permission denied error when trying to impersonate a service account from different project
given:
Projects:
project1project2
Service Accounts:
sa1@project1with roles:Workflows AdminCloudrun AdminService Account Token CreatorService Account User
sa2@project2
Workflows:
A workflow1 in project1 (creates a cloudrun instance with serviceAccountName=sa2@project2)
Result:
{
"body": {
"error": {
"code": 403,
"message": "Permission 'iam.serviceaccounts.actAs' denied on service account sa2@project2 (or it may not exist).",
"status": "PERMISSION_DENIED"
}
},
"code": 403,
"headers": {
"Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"",
"Cache-Control": "private",
"Content-Length": "244",
"Content-Type": "application/json; charset=UTF-8",
"Date": "Wed, 14 Sep 2022 10:53:24 GMT",
"Server": "ESF",
"Vary": "Origin",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "SAMEORIGIN",
"X-Xss-Protection": "0"
},
"message": "HTTP server responded with error code 403",
"tags": [
"HttpError"
]
}