- gcloud alpha compute backend-buckets add-signed-url-key - add Cloud CDN Signed URL key to a backend bucket
gcloud alpha compute backend-buckets add-signed-url-key BACKEND_BUCKET_NAME --key-file=LOCAL_FILE_PATH --key-name=KEY_NAME [GCLOUD_WIDE_FLAG ...]
(ALPHA) gcloud alpha compute backend-buckets add-signed-url-key
Cloud CDN Signed URLs give you a way to serve responses from the globally distributed CDN cache, even if the request needs to be authorized.
Signed URLs are a mechanism to temporarily give a client access to a private resource without requiring additional authorization. To achieve this, the full request URL that should be allowed is hashed and cryptographically signed. By using the signed URL you give it, that one request will be considered authorized to receive the requested content.
Generally, a signed URL can be used by anyone who has it. However, it is usually only intended to be used by the client that was directly given the URL. To mitigate this, they expire at a time chosen by the issuer. To minimize the risk of a signed URL being shared, we recommend that you set it to expire as soon as possible.
A 128-bit secret key is used for signing the URLs.
Name of the backend bucket to add CDN signed URL key to.
The file containing the RFC 4648 Section 5 base64url encoded 128-bit secret key
for Cloud CDN Signed URL. It is vital that the key is strongly random. One way
to generate such a key is with the following command:
- head -c 16 /dev/random | base64 | tr +/ -_ > [KEY_FILE_NAME]
Name of the Cloud CDN Signed URL key.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute backend-buckets add-signed-url-key $ gcloud beta compute backend-buckets add-signed-url-key