QuestionQ67

VerifiedConfiguring access and security

You have an application running inside a Compute Engine instance. You want to provide the application with secure access to a BigQuery dataset. You must ensure that credentials are only valid for a short period of time, and your application will only have access to the intended BigQuery dataset. You want to follow Google-recommended practices and minimize your operational costs. What should you do?

Explanation

Attach a custom (non-rotating) service account to the Compute Engine instance and grant it the BigQuery Data Viewer role scoped to the specific dataset. This implements least-privilege access, with short-lived credentials automatically managed by the Compute Engine metadata server (no manual key rotation needed). Granting project-level roles or rotating service accounts hourly introduces unnecessary complexity and security risk.

Community Discussion

No comments yet. Be the first to start the discussion!