In a CI/CD-driven automation, you run Python code that triggers Cloud Functions. The function receives an event and then calls a downstream API. Which practice best improves security against privilege escalation and unintended invocation?

Answer

Use an identity-aware policy: restrict invoker permissions to a specific service account and validate tokens/issuer on the function side

Explanation

Restricting invoker identity controls who can trigger the function. Validating issuer/audience at the application layer prevents callers from using forged or unintended tokens.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list