I have a cloud run service behind an Identity Aware Proxy. That service needs to perform service to service communications to other Cloud Run services. We are using service account credentials to do this, but we also want the actual userid in the second service so we can enforce authorization if required.
What is the preferred way to do this? Just pass it in a header or as part of the API signature?
It's totally up to you and and opinionated question. My personal preference is to set in the header all the metadata of the request and in the body the main purpose of it.
No strict rules, only a choice to make!