I use Reactjs to create a website and host it on Firebase, and set serviceAccount.json
with firebase-admin
and @google-cloud/storage
on Google Cloud Functions to handle functions. Website has a <iframe>
element, it will load aaa.html
link url from bucket in Google Cloud Storage. Bucket of GCS is set to allAuthenticatedUsers
. Upload aaa.html
using predefinedAcl:'authenticatedRead'
. Website could login with firebaseui-web-react
. I only got access denied when I load aaa.html
.
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>
Anonymous caller does not have storage.objects.get access to
bucket/path/aaa.html.
</Details>
</Error>
How can I access correctly?