nerdexam
Google

PROFESSIONAL-CLOUD-SECURITY-ENGINEER · Question #68

A company's application is deployed with a user-managed Service Account key. You want to use Google-recommended practices to rotate the key. What should you do?

The correct answer is C. Create a new key, and use the new key in the application. Delete the old key from the Service. You can rotate a key by creating a new key, updating applications to use the new key, and deleting the old key. Use the serviceAccount.keys.create() method and serviceAccount.keys.delete() method together to automate the rotation…

Submitted by wei.xz· Apr 18, 2026Configuring access within a cloud solution environment

Question

A company's application is deployed with a user-managed Service Account key. You want to use Google-recommended practices to rotate the key. What should you do?

Options

  • AOpen Cloud Shell and run gcloud iam service-accounts enable-auto-rotate --iam-
  • BOpen Cloud Shell and run gcloud iam service-accounts keys rotate --iam-
  • CCreate a new key, and use the new key in the application. Delete the old key from the Service
  • DCreate a new key, and use the new key in the application. Store the old key on the system as a

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    75% (18)
  • D
    17% (4)

Explanation

You can rotate a key by creating a new key, updating applications to use the new key, and deleting the old key. Use the serviceAccount.keys.create() method and serviceAccount.keys.delete() method together to automate the rotation. https://cloud.google.com/iam/docs/creating-managing-service-account- keys#deleting_service_account_keys

Topics

#Service Accounts#Key Rotation#IAM#Security Best Practices

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-SECURITY-ENGINEER Practice