0
0
GCPcloud~5 mins

IAM conditions for fine-grained control in GCP - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of IAM conditions in Google Cloud?
IAM conditions allow you to add extra rules to your access policies, so permissions are granted only when specific conditions are met. This helps control access more precisely.
Click to reveal answer
beginner
Name two common attributes used in IAM conditions.
Common attributes include request.time (to limit access by time) and resource.name (to limit access to specific resources).
Click to reveal answer
intermediate
How do IAM conditions improve security compared to basic IAM roles?
IAM conditions let you restrict permissions based on context like time, resource name, or resource labels, reducing the risk of over-permission and accidental access.
Click to reveal answer
intermediate
What is the syntax format used to write IAM conditions?
IAM conditions use a simple expression language similar to logical statements, for example: request.time > timestamp("2024-01-01T00:00:00Z").
Click to reveal answer
intermediate
Can IAM conditions be used to restrict access based on the user's IP address?
No, IAM conditions do not support IP address restrictions directly. Use network-level controls like firewall rules or Identity-Aware Proxy (IAP).
Click to reveal answer
What does an IAM condition do in Google Cloud?
ADeletes unused resources
BCreates new user accounts automatically
CAdds extra rules to control when permissions apply
DMonitors network traffic
Which attribute can you use in an IAM condition to limit access by time?
Arequest.time
Bresource.type
Cuser.email
Dresource.name
IAM conditions help improve security by:
AGranting all permissions to everyone
BAllowing access only during certain conditions
CRemoving all roles from users
DBacking up data automatically
Which of these is a valid use of IAM conditions?
ARestrict access to a resource only during business hours
BChange user passwords automatically
CEncrypt data at rest
DMonitor CPU usage
Can IAM conditions restrict access based on the user's IP address?
AYes, using request.ip attribute
BOnly for storage buckets
COnly for admin users
DNo, IP address is not supported
Explain how IAM conditions help achieve fine-grained access control in Google Cloud.
Think about how adding rules based on request details can limit access.
You got /4 concepts.
    Describe a scenario where using IAM conditions would be beneficial.
    Consider when you want to allow access only during certain hours or from certain places.
    You got /3 concepts.