I'm trying to read a private bucket file with a CDN applied via a signed URL.
I created two private buckets.
a-bucket
b-bucket
And to apply CDN to these buckets, I created a load balancer and added two backends to this load balancer.
a-backend
b-backend
And added host, path, backend.
a.example.com, /*, a-backend
b.example.com, /*, b-backend
I also added a sign key to each CDN backend.
a-sign-key
b-sign-key
And I added two domains in the hosting service to access the two buckets by domain. The destination ip is the same.
a.example.com
b.example.com
Finally, I created a signed URL using the KeyName and Key in NestJS.
The problem is that I was able to read a-bucket through a.example.com, but I couldn't read b-bucket through b.example.com.
AccessDenied
Anything I'm missing?
I solved the problem. I had to grant permission for Cloud CDN to access the bucket. The problem was that I gave permission to a-bucket, but not to b-bucket.