exam questions

Exam Professional Cloud Database Engineer All Questions

View all questions & answers for the Professional Cloud Database Engineer exam

Exam Professional Cloud Database Engineer topic 1 question 53 discussion

Actual exam question from Google's Professional Cloud Database Engineer
Question #: 53
Topic #: 1
[All Professional Cloud Database Engineer Questions]

An analytics team needs to read data out of Cloud SQL for SQL Server and update a table in Cloud Spanner. You need to create a service account and grant least privilege access using predefined roles. What roles should you assign to the service account?

  • A. roles/cloudsql.viewer and roles/spanner.databaseUser
  • B. roles/cloudsql.editor and roles/spanner.admin
  • C. roles/cloudsql.client and roles/spanner.databaseReader
  • D. roles/cloudsql.instanceUser and roles/spanner.databaseUser
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
CosmoKramer
20 hours, 19 minutes ago
Selected Answer: D
Y'all should read the documentation. Seems like none of you actually know anything about IAM? the cloudsql.viewer roles has: cloudsql.*.export cloudsql.*.get cloudsql.*.list cloudsql.instances.listServerCas cloudsql.instances.listServerCertificates in addition to a bunch of recommender permissions. roles/cloudsql.instanceUser only has two permissions: cloudsql.instances.get cloudsql.instances.login Some of you may think that this includes "Cloud SQL Admin", but that's wrong. As mentioned, read the docs more thoroughly, it says: "The following table lists each permission that Cloud SQL supports, the Cloud SQL roles that include it, and its basic role". A role has a permission, not the other way around. So, cloudsql.instances.get is part of Cloud SQL Admin, Client, Editor etc.
upvoted 1 times
...
omermahgoub
2 months, 3 weeks ago
Should be A. Because roles/cloudsql.instanceUser has the cloudsql.instances.get role, which has the following roles included: Cloud SQL Admin Cloud SQL Client Cloud SQL Editor Cloud SQL Viewer This compromise “least privilege” requirements
upvoted 1 times
...
bigdawg70
5 months, 2 weeks ago
I think it should be A because the roles/cloudsql.instanceUser role only has: cloudsql.instances.get cloudsql.instances.login You won't even be able to view anything with that role. https://cloud.google.com/sql/docs/mysql/iam-roles
upvoted 1 times
...
RaphaelG
5 months, 4 weeks ago
Selected Answer: D
To me, it is also "D", InstanceUser only has 2 permissions and Viewer has like 50 of them
upvoted 1 times
...
learnazureportal
10 months, 2 weeks ago
The current answer is => D. roles/cloudsql.instanceUser and roles/spanner.databaseUser. roles/cloudsql.instanceUser: This role allows the service account to connect to Cloud SQL instances
upvoted 2 times
DeeData
9 months, 4 weeks ago
I think you are missing out the “least privilege” part
upvoted 1 times
learnazureportal
9 months, 3 weeks ago
No I am not. pay attention to "read data out of Cloud SQL".
upvoted 1 times
...
...
...
DPonly
10 months, 2 weeks ago
Selected Answer: A
Will go by A
upvoted 3 times
...
Mithi_Kumar011
1 year ago
Correct Ans = A Explanation: To read data out of Cloud SQL for SQL Server, you need to use a service account with the roles/cloudsql.viewer role on the Cloud SQL instance. This role grants the service account permission to read data from the instance. Whereas roles/cloudsql.instanceUser will only allow to login to cloud SQL instance. No resource will be allowed to view. To update a table in Cloud Spanner, you need to use a service account with the roles/spanner.databaseUser role on the Cloud Spanner instance. This role grants the service account permission to read and write data in the Spanner database.
upvoted 4 times
...
ziiMexx
1 year, 1 month ago
Selected Answer: D
between A or D. But roles/cloudsql.viewer to broad, so i choose D
upvoted 1 times
...
felipeschossler
1 year, 2 months ago
Selected Answer: D
D. I think that instanceUser had the necessary permissions to read data: https://cloud.google.com/sql/docs/sqlserver/iam-roles#roles:~:text=roles/cloudsql.instanceUser
upvoted 1 times
...
absero1609
1 year, 2 months ago
Selected Answer: A
We want to apply least privilege and need to read data out of Cloud SQL for SQL Server only, `roles/cloudsql.viewer` is good enough to statisfy the those requirement, that filters out B, C, and D already https://cloud.google.com/sql/docs/sqlserver/iam-roles#roles
upvoted 3 times
...
filotti
1 year, 3 months ago
Selected Answer: D
To read data out of Cloud SQL for SQL Server, you need to use a service account with the roles/cloudsql.instanceUser role on the Cloud SQL instance. This role grants the service account permission to read data from the instance. To update a table in Cloud Spanner, you need to use a service account with the roles/spanner.databaseUser role on the Cloud Spanner instance. This role grants the service account permission to read and write data in the Spanner database. Therefore, to grant least privilege access, you should assign the service account only the required roles, which are roles/cloudsql.instanceUser and roles/spanner.databaseUser.
upvoted 2 times
...
dynamic_dba
1 year, 4 months ago
A. You need read access in Cloud SQL for SQL Server and read/write access in Cloud Spanner. Admin permissions are not required so eliminate B. roles/spanner.database Reader would not provide write access, so eliminate C. roles/cloudsql.viewer provides read only access to Cloud SQL resources. That eliminates D, leaving A.
upvoted 1 times
...
SidsA
1 year, 5 months ago
Ans should be D for minimum access roles/cloudsql.instanceUser : Allowing to login and get roles/spanner.databaseUser: read and write
upvoted 1 times
...
GCP72
1 year, 6 months ago
Selected Answer: A
A is the correct answer
upvoted 3 times
...
pk349
1 year, 6 months ago
A: roles/cloudsql.viewer ***** and roles/spanner.databaseUser *****
upvoted 2 times
...
chelbsik
1 year, 6 months ago
Selected Answer: A
https://cloud.google.com/spanner/docs/iam#:~:text=roles/spanner.databaseUser%20contains%20the%20permissions%20spanner.databases.read%20and%20spanner.databases.write https://cloud.google.com/sql/docs/mysql/iam-roles#:~:text=roles/cloudsql.viewer,to%20all%20Cloud%20SQL%20resources.
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