Want to create a signurl for accessing private cloud storage bucket in GCP

111 Views Asked by At

I am trying to create a signedurl for accessing private cloud storage which contains static files. I have configured http loadbalancer and enabled cdn on it. I have generated key and attached it to backend bucket. I have followed each and every step mentioned in this document :-

https://cloud.google.com/cdn/docs/using-signed-urls#gcloud

But while generating signed url it is not able to access the content of bucket. I am getting 403 forbidden error.

For creating key

head -c 16 /dev/urandom | base64 | tr +/ -_ > KEY_FILE_NAME

For adding the key to backend

gcloud compute backend-buckets \
   add-signed-url-key BACKEND_NAME \
   --key-name KEY_NAME \
   --key-file KEY_FILE_NAME

I am using this code to generate url

Gcloud compute sign-url \
"Http://Ip/" \
--key-name key \
--key-file keyfile \
--expires-in 30m \
--validate

But i am getting 403 error when accessing the generated url.

your client does not have permission to get url/ from this server
0

There are 0 best solutions below