0
0
GCPcloud~20 mins

Security best practices in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Security Best Practices Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
security
intermediate
2:00remaining
Identify the least privilege principle in IAM roles

You have a Google Cloud project with multiple users. Which IAM role assignment best follows the least privilege principle?

AAssign the 'Viewer' role to users who only need to read resources.
BAssign the 'Owner' role to all users for full access.
CAssign the 'Editor' role to users who only need to deploy applications.
DAssign the 'Storage Admin' role to users who manage Compute Engine instances.
Attempts:
2 left
💡 Hint

Think about giving users only the permissions they need to do their job.

Architecture
intermediate
2:00remaining
Choosing the best network security setup

You want to protect your Google Cloud VM instances from unauthorized internet access. Which setup provides the best security?

APlace VMs in a public subnet with firewall rules allowing all traffic.
BAssign external IPs to VMs and disable firewall rules.
CUse default network with no firewall rules.
DPlace VMs in a private subnet with no external IPs and use Cloud NAT for outbound internet access.
Attempts:
2 left
💡 Hint

Think about how to keep VMs unreachable from the internet but still allow them to access the internet if needed.

Configuration
advanced
2:00remaining
Detecting misconfigured Cloud Storage bucket permissions

Which of the following Cloud Storage bucket IAM policies will publicly expose the bucket contents?

A{"bindings": [{"role": "roles/storage.admin", "members": ["group:admins@example.com"]}]}
B{"bindings": [{"role": "roles/storage.objectViewer", "members": ["user:alice@example.com"]}]}
C{"bindings": [{"role": "roles/storage.objectViewer", "members": ["allUsers"]}]}
D{"bindings": [{"role": "roles/storage.objectCreator", "members": ["serviceAccount:my-sa@project.iam.gserviceaccount.com"]}]}
Attempts:
2 left
💡 Hint

Look for the member that allows anyone on the internet access.

service_behavior
advanced
2:00remaining
Understanding Cloud KMS key rotation impact

You rotate a Cloud KMS key used to encrypt data in Cloud Storage. What happens to the data encrypted with the old key version?

AData encrypted with old key versions remains accessible and can be decrypted.
BData encrypted with old key versions is deleted after key rotation.
CData encrypted with old key versions is automatically re-encrypted with the new key version.
DData encrypted with old key versions becomes unreadable immediately.
Attempts:
2 left
💡 Hint

Think about how key versions work in encryption.

🧠 Conceptual
expert
2:00remaining
Analyzing the effect of enabling VPC Service Controls

You enable VPC Service Controls around your Google Cloud project. Which of the following is a direct effect of this action?

AIt automatically encrypts all data at rest with customer-managed keys.
BIt prevents data exfiltration by restricting access to services from outside the defined perimeter.
CIt disables all firewall rules in the VPC network.
DIt allows unrestricted access to Cloud Storage buckets within the project.
Attempts:
2 left
💡 Hint

Consider what VPC Service Controls are designed to protect against.