GCP Associate Cloud Engineer Practice Question 19: Signed URL Temporary Access

Google Cloud Associate Cloud Engineer · Test 2 · question 9 of 10

Cloud Storageeasy

Your application must let a customer without a Google account download one private report from a Cloud Storage bucket. The link should stop working after 15 minutes, and the rest of the bucket must remain private.

What should you do?

Select one answer
Show answer and explanation

Answer:

  • B. Generate a signed URL for the object with an expiration of 15 minutes and give it to the customer

A signed URL grants time-limited access to a specific object to anyone who has the URL, and no Google account is required. Your application signs it with a service account (or HMAC key) and sets an expiry such as 15 minutes.

Option A exposes every object in the bucket to the internet during that window and depends on someone removing the binding on time. Option C would still expose the object to anyone with any Google account, and access would not expire. Option D hands a long-lived credential to an external party, which is a security risk and far more than a single download requires.

Reference: Signed URLs

Practice Test 2 ›

Study guides for Google Cloud Associate Cloud Engineer