qichao_he
qichao_he

Reputation: 5434

Is there a way to create read only dashboard in Apache Superset

So we have been using Apache Superset, It's a great tool.

The only frustration come from that there are a few dashboards we want to share with users outside the company.

I believe right now the way to do it is go from the Gamma user then create a read only role (Correct me if I'm wrong)

There are a few downside of this:

  1. we need to create a view per user on each table to make sure that they do not see the records that they are not supposed to.
  2. the access is given by datasource, so they will be able to see any dashboard that use the same datasource, which can be a problem sometimes.
  3. all of these authentication is a lot of work to maintain.

I'm wondering if there is any way (or even hack) to simply share the graphs and tables as a dashboard, without any database access granted.

Like a frozen or snapshot of dashboard, like the way Redash does it: https://redash.io/help/user-guide/dashboards/sharing-dashboards

Upvotes: 17

Views: 22575

Answers (4)

zhuguowei
zhuguowei

Reputation: 8487

Public dashboards

This is not meant for production. It’s for experiments or while doing a proof of concept.

#superset_config.py
PUBLIC_ROLE_LIKE_GAMMA = True
or
PUBLIC_ROLE_LIKE: Optional[str] = "Gamma"

After this, we need to re-run the init user (if already run)

docker-compose exec superset superset-init

Dashboards & charts can be embedded without superset header (Nav bar etc) by adding standalone=true parameter to the url, like this :

http://localhost:9000/superset/dashboard/world_health/?standalone=true

We need to grant database source permissions to public role for the data to be visible.

please see: https://sairamkrish.medium.com/apache-superset-custom-authentication-and-integrate-with-other-micro-services-8217956273c1

Upvotes: 1

Agnes kyenze
Agnes kyenze

Reputation: 367

What you are looking for can be achieved through a combination of the public user and appending ?standalone=true to the dashboard url. You also don't need the entire list of Gamma user permissions, the most important ones are can explore on superset, explore json on superset and datasource access and csrf token. This basically renders the dashboards without the superset menu and should make everything readonly.

Upvotes: 8

Binu V Pillai
Binu V Pillai

Reputation: 306

We can achieve this by creating a custom role.
1. Can remove all the menu items
2. Can disable the dashboard edit button
3. Can give access to specific tables.
So a user cannot access any other dashboard or charts
Eg. Dashboard

Upvotes: 0

Alloy
Alloy

Reputation: 418

Superset is great, I'm glad people are talking about it since the days when it was AirBnB's Caravel. It has come a long way.

There is no 'official' solution for what you're looking for but there is a way to effectively get the same result. You said you wouldn't mind a 'hack' so...

Creating a table or a data source and exposing it to the 'public' group should do what you're looking to accomplish.

Upvotes: -1

Related Questions