You are using Python to automate the deployment of infrastructure. A task must authenticate via a service account and access least-privilege permissions across multiple environments. Which practice best aligns with secure professional authentication for Google Cloud-based automation?

Answer

Use Application Default Credentials (ADC) with Workload Identity / environment-based auth and grant least-privilege IAM roles

Explanation

ADC with Workload Identity avoids long-lived keys and supports secure, environment-specific authentication. Least-privilege IAM reduces blast radius.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list