I have a GCP organisation of a handful of projects laid out in folders. I also have a handful of humans that need access of various types to the estate.
My first class of humans are those which need full read-only access to just about all of GCP.
My second class of users need read-only access to one or more folders of projects. However, I'd like to deny them access to anything in Secrets Manager or Billing.
My first thought was to create the first class of users at the top level, and the second class at the folder level, with a deny rule at the project level. However, since they all use roles/viewer
, that doesn't work.
I could also solve this by denying each user in the second class, but not the first. Since I'm permissioning everyone with Terraform, I could just deny the second class of users. This could work, but it means something special for each user - not a terrible problem, but seems wrong.
The last method I've looked at is to create a custom role. The first class of users just use roles/viewer
as they do now, but the second class use roles/restricted-viewers
or whatever. My problem with that is that I'd need to somehow keep up with permissions in the viewer
role and apply them to my custom role.
Are there any other (better?) ways to do this? Can we guess at how Google intended us to handle situations such as this?