If I want to publish private bucket content over the internet, meaning I want to host my static website on a private bucket and add an HTTPS load balancer as the frontend, it's not working.
In AWS, it's easily possible to publish a private bucket through CloudFront.
Hello @abhishek-wings!
Take a look at this guide on how to configure a bucket to host a static website. Cloud Storage doesn't support custom domains with HTTPS on its own, the mentioned guide utilizes Cloud Storage with an external Application Load Balancer to serve content from a custom domain over HTTPS.
Also, take a look at Static website examples and tips for GCP.
If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!
what if there is an Org policy in place that prevents public access to the bucket. what would be Google's workaround that ?
Message:
You cannot add the principals allUsers or allAuthenticatedUsers to the bucket's policy because public access prevention is enforced. This constraint could be enforced at the bucket, project, folder, or organization level. Ask your org or project administrator about access options.
Thanks,
Hi @lai-123,
If I may, the answer to your use case is further down in my below answer.
I hope this will helps you
Hi,
Thank you for the Info. The documentation talks about Amazon S3 buckets, does this apply to GCS buckets ? Is there a Google documentation on that ?
Thanks,
Yes, it also concerns GCS.
"Private origin authentication gives Cloud CDN long-term resource access to private Amazon S3 buckets or other compatible object stores"
You will find the informations here : https://cloud.google.com/cdn/docs/configure-private-origin-authentication
Kindly
Hi @abhishek-wings
For this achievement, you can use Private Origin Authentication feature.
Here are non exhaustifs steps you can follow:
I hope this will helps you !
@ZKH Unfortunately you can not do this with google cloud bucket, as the lb backend already has an GCS category, which doesnt have this option to use private origin