Solution 1 :

You can use the GCP product Cloud Storage to host your static website, and define who has access to your Cloud Storage buckets and objects and what level of access they have with either Cloud Identity and Access Management (Cloud IAM) or Access Control Lists (ACLs).

Problem :

I want to deploy a static website (html, css, js) and restrict the read-access to the html files depending on the authentification status of the user. Is this possible with Google Cloud and it’s Identity platform?
Right now i am still using Firebase but there it seems not to be possible to restrict access to static files itself.

Thanks for the help!


Comment posted by klosinho

thanks for your answer! so you think it is doable with GCP to host a static website (lets say “login.html”, “restricted-content.html”, and css / js) and control with fine-grained access that the “login.html” is public available but only logged in useres can visit the “restricted-content.html”?

Comment posted by v1gnus

No, that is no more a static website since that will require a server side language to authenticate users. If you make your files public, they will be accessible by any one but if you make them private, they will be accessible to users to whom you gave permission.