IAM Permission for view logging Cloud Run

Guys,

I want to give the permission to read logs from a service running on a Cloud Run. Today we see the logs of services that are running on Cloud Run in Log Analysis (https://console.cloud.google.com/logs/query ). There you can filter by the Cloud Run service, and by a specific deployment.

It turns out that the GCP account has several services running and we would like to give access to a group of people to see the logs of just a few Cloud Runs. When creating the user, I gave him the “Log View Access” permission so that he could get to the log analysis screen, and then I gave him the “Log Viewer” permission. After that, this user saw the logs of all applications in the account.

I then created a condition for the “Log Viewer” role, giving this permission only to resources that had a specific TAG. I registered the TAG and related it to one of the services to test, but the user is still allowed to see the logs of all applications, not just the one linked to the TAG.

Is there any way to resolve this?

Greetings @Bertoni ,

Just FYI, “Log View Access” and “Log Viewer” are actually roles and not permissions.

Basically, a role consists of different permissions.

Here in the screenshot below, you can find Logs Viewer with the permissions connected to it:

What you want to do is create a custom role and assign the necessary permissions to the user or service account until you achieve the desired outcome.

I hope this helps. Let me know if you have questions. Thank you.