Why is it important to rotate service account keys regularly in Google Cloud Platform?
Think about what happens if a key is leaked or stolen.
Rotating keys reduces the chance that a compromised key can be used indefinitely. Old keys should be deleted after rotation.
Which gcloud command correctly creates a new JSON key for a service account named my-service-account@my-project.iam.gserviceaccount.com?
Check the correct gcloud subcommand and flag names for key creation.
The correct command uses gcloud iam service-accounts keys create with the --iam-account flag.
If a service account key is leaked publicly, what is the immediate risk?
Consider what a key allows in terms of authentication and access.
A leaked key allows attackers to impersonate the service account until the key is revoked or deleted.
What is the best practice for storing service account keys to minimize security risks?
Think about how to keep keys safe and prevent accidental exposure.
Using secret managers protects keys with access controls and auditing, reducing risk of leaks.
What happens to running workloads that use a service account key if that key is deleted from Google Cloud?
Consider how authentication tokens depend on keys and their validity.
Deleting a key invalidates it immediately, causing authentication failures for workloads using it.