Google Cloud Professional Cloud Developer — Question 128

Your team develops services that run on Google Cloud. You need to build a data processing service and will use Cloud Functions. The data to be processed by the function is sensitive. You need to ensure that invocations can only happen from authorized services and follow Google-recommended best practices for securing functions. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C because creating a service account with the Cloud Functions Invoker role allows only authorized services to invoke the function, ensuring security for sensitive data. Option A does not directly secure function invocations, and option B lacks the necessary permissions for invocation. Option D, while it provides a method of authentication, does not use the recommended service account approach for invoking Cloud Functions.