Google Cloud Associate Cloud Engineer — Question 223

You recently discovered that your developers are using many service account keys during their development process. While you work on a long term improvement, you need to quickly implement a process to enforce short-lived service account credentials in your company. You have the following requirements:

• All service accounts that require a key should be created in a centralized project called pj-sa.
• Service account keys should only be valid for one day.

You need a Google-recommended solution that minimizes cost. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C because it directly enforces the requirement for service account keys to have a maximum lifetime of 24 hours while also restricting key creation to the centralized project pj-sa. Options A and B involve rotating keys but do not address the key lifetime directly. Option D incorrectly suggests a DENY policy instead of a constraint for key lifetime, which does not align with the requirement.