Search code examples
permissionsgoogle-cloud-storagelooker-studioservice-accounts

Service Account for Google Data Studio to Access HTML Files on Google Cloud Storage


I have some HTML files uploaded into a Google Cloud Storage bucket that I would like to embed through an iframe on my dashboard in Google Data Studio.

This works just fine when I open access to the world on the bucket (or resource) by setting the AllUsers permission.

However, I would prefer to only allow access through Google Data Studio. How can this be achieved?

I was thinking of adding a permission for the Service Account of Google Data Studio, but don't really know how to configure this correctly.


Solution

  • I don't believe this is possible right now.

    However, a complex solution I can think of is to use a combination of Community Connectors and Community Viz:

    • Build a community connector that uses your own GCP service account to read the HTML files on GCS and send back the raw HTML content as data.
    • Build a community viz that can take the HTML data from the connector and render the HTML.
    • If you have multiple HTML files, you can setup filters in Data Studio so that each viz renders only one HTML.

    Code samples for Community Connector and viz are available here.