exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 96 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 96
Topic #: 1
[All Professional Cloud Developer Questions]

You have written a Cloud Function that accesses other Google Cloud resources. You want to secure the environment using the principle of least privilege. What should you do?

  • A. Create a new service account that has Editor authority to access the resources. The deployer is given permission to get the access token.
  • B. Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to get the access token.
  • C. Create a new service account that has Editor authority to access the resources. The deployer is given permission to act as the new service account.
  • D. Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to act as the new service account.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ParagSanyashiv
Highly Voted 2 years, 9 months ago
Agree with D
upvoted 7 times
...
alpha_canary
Most Recent 6 months, 1 week ago
Selected Answer: D
https://cloud.google.com/functions/docs/securing/function-identity#individual:~:text=In%20order%20to,you%20this%20permission
upvoted 1 times
...
Xoxoo
10 months ago
Selected Answer: D
Quoted from https://cloud.google.com/functions/docs/securing/function-identity#individual "In order to deploy a function with a user-managed service account, the deployer must have the iam.serviceAccounts.actAs permission on the service account being deployed"
upvoted 2 times
...
wanrltw
11 months, 1 week ago
Selected Answer: D
https://cloud.google.com/functions/docs/securing/function-identity#individual
upvoted 1 times
...
__rajan__
1 year, 1 month ago
Selected Answer: B
This approach allows you to create a service account with a custom IAM role that provides only the necessary permissions required by your Cloud Function. By granting the deployer permission to get the access token, you ensure that they can obtain the necessary credentials to deploy and manage the Cloud Function.
upvoted 1 times
...
zellck
1 year, 10 months ago
Selected Answer: D
D is the answer. https://cloud.google.com/functions/docs/securing/function-identity#per-function_identity
upvoted 2 times
...
tomato123
2 years, 2 months ago
Selected Answer: D
D is correct
upvoted 2 times
...
akshaychavan7
2 years, 2 months ago
D should be the correct choice here. In Google Cloud, the resource(which can be a Cloud Function, a VM, etc.) always acts as a service account while accessing other resources.
upvoted 1 times
...
[Removed]
2 years, 5 months ago
What 'deployer' means here? The function itself? or the user who set up the function?
upvoted 1 times
[Removed]
2 years, 5 months ago
B. https://cloud.google.com/functions/docs/securing/authenticating
upvoted 1 times
[Removed]
2 years, 5 months ago
Changed the mind to D. (the note above is when you *invoke* the function, not to access other GCP services). https://cloud.google.com/functions/docs/securing/function-identity "While IAM-defined service accounts are the preferred method for managing access in Google Cloud, some services might require other modes, such as an API key, OAuth 2.0 client, or service account key." and "Note: In order to deploy a function with a user-managed service account, the deployer must have the iam.serviceAccounts.actAs permission on the service account being deployed."
upvoted 4 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago