You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Signed URLs and signed policy documents provide a way to grant temporary, scoped access to Cloud Storage objects without requiring the user to have a Google Cloud account or IAM permissions. They are essential for applications that need to serve private content to end users or allow file uploads without exposing service account credentials.
A signed URL is a URL that includes authentication information in its query string parameters. Anyone with the URL can perform the specified operation (GET, PUT, DELETE) on the specified object for a limited time.
# Generate a signed download URL (valid for 1 hour)
gsutil signurl -d 1h service-account-key.json gs://my-bucket/private-report.pdf
# Using gcloud storage (does not require a key file)
gcloud storage sign-url gs://my-bucket/private-report.pdf \
--duration=1h \
--private-key-file=service-account-key.json
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.