Skip to content

fix: beta/google-cloud-run use a service account with minimal permiss… #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RichardoC
Copy link

…ions

Google recommend not using this service account as it's has more permissions than are typically required [1]

This PR updates the cloud run setup to use a dedicated service account, and then only grant the required permissions to it instead.

@ag-adampike ag-adampike self-assigned this May 22, 2025
@ag-adampike ag-adampike added the enhancement New feature or request label May 22, 2025
@ag-adampike
Copy link
Member

ag-adampike commented May 23, 2025

Hey @RichardoC! Thanks for this (pretty freakin' sweet) PR, and for taking the time to include accompanying documentation changes and the linked reference. 😍

This is indeed good guidance corroborated as a best practice in other Google Cloud documentation12 and following principle of least privilege.

I have to review the changes and add some for customers that use SCIM bridge with Google Workspace as their identity provider. That case adds some potential complexity: because a SCIM client application is not available for Workspace, our bespoke provisioning integration always requires a Google Cloud service account key for this purpose. 🙃

Not getting that bit tangled up was one honest reason for using the default Compute Engine service account instead of a dedicated service account in the first place.

In any case, I'll be able to have a more thorough look at this next week and hopefully merge it shortly after.

Thanks again! 💙

Footnotes

  1. Best practices for using service accounts

  2. Introduction to service identity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants