Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization hosts both production (prod-*) and development (dev-*) Cloud SQL for PostgreSQL instances in the same Google Cloud project. A contractor needs temporary access over the next 14 days to connect only to the dev-* instances.
Your security policy enforces these requirements:
Which configuration should you implement?
roles/cloudsql.client with an IAM Condition matching sqladmin.googleapis.com/Instance names starting with dev- and a 14-day expiration timestamp, and explicitly enable Data Access audit logs for Cloud SQL.IAM Conditions provide attribute-based, conditional access control for Google Cloud resources by evaluating expressions before granting a role binding. Data Access audit logs are a category of Cloud Audit Logs that record API calls that read resource metadata or configuration, as well as user-driven data reads, writes, and database authentication events.
request.time < timestamp(...)) to the IAM policy binding automatically revokes the contractor's connection permissions after 14 days without manual intervention.sqladmin.googleapis.com/Instance resource type. Matching resource.name with a startsWith prefix for dev- restricts the roles/cloudsql.client (cloudsql.instances.connect) permission strictly to development instances while denying connections to prod-* instances.ADMIN_READ, DATA_READ, and DATA_WRITE as needed) captures database login events and records the authenticated principal identity for compliance verification.dev-* and prod-* instances without requiring separate projects.Unlike Admin Activity logs or Policy Denied logs, enabling Data Access audit logs is mandatory to capture Cloud SQL login attempts. Furthermore, targeting sqladmin.googleapis.com/Instance uses a supported Cloud SQL resource type for IAM Conditions, delivering enforceable least-privilege access alongside a complete audit trail.
roles/logging.viewer to inspect login audit logs.This approach pairs Context-Aware Access (such as Access Context Manager policies) with IAM database authentication routed through the Cloud SQL Auth Proxy, while assigning the roles/logging.viewer role to auditors to review recorded login events.
roles/logging.viewer role only grants access to view Admin Activity audit logs. To view Data Access audit logs (which contain login and data access records), auditors require the roles/logging.privateLogViewer role.dev-* instances without corresponding IAM Conditions, and Data Access logs must still be explicitly enabled.roles/logging.viewer) from private data-access log viewing (roles/logging.privateLogViewer) to protect potentially sensitive log payloads.roles/logging.privateLogViewer, login records will not appear unless Data Access audit logs are enabled for Cloud SQL.The contractor connected directly over SSL (without the Cloud SQL Auth Proxy) while using Context-Aware Access, IAM Conditions enforced the dev-* and 14-day limits, Data Access audit logs were enabled, and auditors were granted roles/logging.privateLogViewer.
roles/cloudsql.client with an IAM Condition targeting sqladmin.googleapis.com/Database resources starting with dev- and a 14-day expiration, and rely on Admin Activity audit logs to track contractor logins.This option attempts to restrict IAM permissions at the logical database level inside Cloud SQL using an IAM Condition on sqladmin.googleapis.com/Database, while relying on default Admin Activity audit logs to monitor user authentication activity.
sqladmin.googleapis.com/Instance and sqladmin.googleapis.com/BackupRun. They do not support operations on the users (cloudsql.users.*) or databases (cloudsql.databases.*) resources in the Cloud SQL Admin API.SetIamPolicy, CreateServiceAccount, or instance creation/deletion, not connection logins.GRANT statements or IAM group authentication, not via IAM Conditions on a database resource type.The requirement was solely to audit administrative changes to Cloud SQL instance settings (such as flag updates or instance deletions) and the IAM Condition targeted sqladmin.googleapis.com/Instance or sqladmin.googleapis.com/BackupRun rather than databases.
roles/cloudsql.viewer and roles/cloudsql.client with an IAM Condition restricting resource.name to dev- instances so prod-* instances are hidden from the console, and review Policy Denied audit logs to verify contractor logins.This configuration combines roles/cloudsql.viewer and roles/cloudsql.client with a resource-name IAM Condition in an attempt to hide production instances from the Google Cloud console, while using Policy Denied audit logs to monitor contractor access.
instances.list API responses. Because cloudsql.instances.list (included in roles/cloudsql.viewer) is a parent-only permission evaluated at the project level, the contractor will still see all prod-* instances listed in the project.The goal was strictly to detect unauthorized access attempts blocked by security policies using Policy Denied audit logs, rather than recording all successful contractor logins and enforcing a 14-day expiration.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated