Associate Cloud Engineer ยท IAM policies and roles
IAM role types
Basic, predefined and custom roles, why basic roles are too broad, picking the narrowest predefined role.
Key points
- Basic (legacy) roles Owner, Editor and Viewer span almost every service and should be avoided in production.
- Predefined roles are service-specific and maintained by Google.
- Custom roles bundle permissions you choose and are maintained by you.
- Prefer the narrowest predefined role.
Source: https://docs.cloud.google.com/iam/docs/roles-overview
Practice questions
Which type of role is maintained by Google and updated when a service gains new permissions?
- Custom role
- Predefined role
- Basic role
- Conditional role
Show answer
Answer: B. Predefined role
Predefined roles are managed by Google. Custom roles are maintained by you, and basic roles are broad legacy roles, not per-service ones.
Which statements about role types are correct?
- Predefined roles are managed by Google
- Custom roles must be kept up to date by you
- Legacy basic roles cannot be used in conditional bindings
- Basic roles are the narrowest roles available
- Custom roles gain new permissions automatically when services change
Show answer
Answer: A. Predefined roles are managed by Google, B. Custom roles must be kept up to date by you, C. Legacy basic roles cannot be used in conditional bindings
Predefined roles are Google-managed, custom roles are yours to maintain, and legacy basic roles cannot carry conditions. Basic roles are the broadest, not the narrowest, and custom roles do not pick up new permissions automatically.
The Editor role is a safe default for developers because it only covers a single service.
Show answer
Answer: False
False. Editor is a legacy basic role that spans most services in the project; a service-specific predefined role is the safer choice.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
