Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot view dashboards as public user #16718

Closed
sholtoarmstrong-iot opened this issue Sep 16, 2021 · 13 comments
Closed

Cannot view dashboards as public user #16718

sholtoarmstrong-iot opened this issue Sep 16, 2021 · 13 comments
Labels
#bug Bug report v1.3

Comments

@sholtoarmstrong-iot
Copy link

sholtoarmstrong-iot commented Sep 16, 2021

I set the public user permissions to allow all the permissions I could find. I then got the public link and added "?standalone=true". I am not able to view the dashboard.

Expected results

I expect to be able to see the dashboards as a public user with the correct permissions.

Actual results

I get a very non-descriptive error or the frontend.

Screenshots

Screenshot from 2021-09-16 15-17-53

How to reproduce the bug

  1. Use the pre-configured demo charts
  2. Add the permissions to the public user
  3. Get the public link of the dashboard "https://xxxx/r/1?standalone=true"
  4. Logout and visit link. Presented with an error.

Environment

(please complete the following information):

Using the docker image: apache/superset:1.3.1rc1 with the helm deploy

  • superset version: 1.3.1-rc1
  • python version: Python 3.7.9
  • node.js version: Cant find node but its the version installed on the image
  • any feature flags active:
    The following config overrides were used with the deploy to allow it to run in an iframe and enable some features.
configOverrides:

  allow_iframe_access: |

    HTTP_HEADERS = {'X-Frame-Options': 'ALLOWALL', 'Access-Control-Allow-Origin': '*', 'X-Forwarded-Proto': 'https'}
    ENABLE_PROXY_FIX = True
    WTF_CSRF_ENABLED = False
  feature_flags: |
    FEATURE_FLAGS = {
      "DASHBOARD_CROSS_FILTERS": True,
      "DASHBOARD_NATIVE_FILTERS": True,
      "ALERT_REPORTS": True
    }

Additional context

This used to work perfectly fine with apache/superset:1.1.0 and now does not seem to.
Logs from the server

[2021-09-16 13:09:14 +0000] [10] [INFO] Starting gunicorn 20.0.4
[2021-09-16 13:09:14 +0000] [10] [INFO] Listening at: http://0.0.0.0:8088 (10)
[2021-09-16 13:09:14 +0000] [10] [INFO] Using worker: gthread
[2021-09-16 13:09:14 +0000] [13] [INFO] Booting worker with pid: 13
logging was configured successfully
2021-09-16 13:09:16,831:INFO:superset.utils.logging_configurator:logging was configured successfully
2021-09-16 13:09:16,838:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
2021-09-16 13:14:02,573:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
172.31.14.195 - - [16/Sep/2021:13:14:02 +0000] "GET /superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29 HTTP/1.1" 200 26709 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
172.31.14.195 - - [16/Sep/2021:13:14:04 +0000] "GET /static/assets/images/favicon.png HTTP/1.1" 200 0 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
2021-09-16 13:14:04,216:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
172.31.14.195 - - [16/Sep/2021:13:14:04 +0000] "GET /api/v1/dashboard/10/charts HTTP/1.1" 200 1483 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
2021-09-16 13:14:04,247:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
172.31.14.195 - - [16/Sep/2021:13:14:04 +0000] "GET /api/v1/dashboard/10 HTTP/1.1" 200 2473 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
2021-09-16 13:14:04,339:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
172.31.14.195 - - [16/Sep/2021:13:14:04 +0000] "GET /api/v1/dashboard/10/datasets HTTP/1.1" 200 1316 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
172.31.14.195 - - [16/Sep/2021:13:14:05 +0000] "GET /csstemplateasyncmodelview/api/read HTTP/1.1" 200 625 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"
2021-09-16 13:14:06,205:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
172.31.14.195 - - [16/Sep/2021:13:14:06 +0000] "POST /superset/log/?explode=events&dashboard_id=10 HTTP/1.1" 200 1 "https://xxxxxxx/superset/dashboard/10/?preselect_filters=%7B%7D&native_filters=%28%27104%27%3A%28extraFormData%3A%28%29%2CfilterState%3A%28value%3A%21n%29%2Cid%3A%27104%27%2CownState%3A%28%29%29%29" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"

Logs from the worker
`
logging was configured successfully
2021-09-16 13:09:16,979:INFO:superset.utils.logging_configurator:logging was configured successfully
2021-09-16 13:09:16,988:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>

`

@sholtoarmstrong-iot sholtoarmstrong-iot added the #bug Bug report label Sep 16, 2021
@panqingdian
Copy link

Mine has the same problem and the same error. What can I do to solve this problem? I don't know. Did you handle it

@mayurnewase
Copy link
Contributor

mayurnewase commented Oct 12, 2021

this happens due new report feature in #16027, which tries to fetch saved reports on chart/chart created by logged in user and fails because user is not set if not logged in.
I think we should not load any report if its public chart/dashboard.
If flag is turned off, it should work for now.

@Atli-Nordmann
Copy link

Atli-Nordmann commented Oct 14, 2021

I am also facing this issue.
@mayurnewase could you be a little bit more specific.
What flag is needed to be turned off?
Has anyone managed to fix this?

@mayurnewase
Copy link
Contributor

Turn ALERT_REPORTS off or pull my patch referenced above and try again.

@Atli-Nordmann
Copy link

@mayurnewase Thanks for the reply.
Turning ALERT_REPORTS off doesn't work in my environment.
Will try to pull your patch.

@Atli-Nordmann
Copy link

@mayurnewase I have been trying to find a simple solution for this issue.
I cant get this to work if disable flag ENABLE_REACT_CRUD_VIEWS and ALERT_REPORTS.
But that is not an optimal solution since then the dashboard list looks like this
image

Instead of this
image

I can see that your patch (#17106) has been merged into master.
Do you know if it is in release 1.4.0?

@Atli-Nordmann
Copy link

This is still an issue in version 1.4.0.
Does anyone have an idea what version will include the fix for this.

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 17, 2022
@MM-Lehmann
Copy link

Having public dashboards available would be awesome, however, i think it's partly prevented by #17227 as well

@sfirke
Copy link
Member

sfirke commented Sep 23, 2022

The public, i.e. people not logged in, can view dashboards in version 2.0.0. I have DASHBOARD_RBAC feature flag enabled and the Public role assigned under dashboard properties -> Roles. Because it's mentioned above, I also have ALERT_REPORTS flag enabled too.

IMO this can be closed as fixed in 2.0.0.

@MM-Lehmann
Copy link

MM-Lehmann commented Sep 23, 2022 via email

@sfirke
Copy link
Member

sfirke commented Sep 23, 2022

Can others also access the dashboard purely based on the data access permissions? Especially on a different dashboard, that hasn't assigned any roles access?

Not sure, my use case doesn't do much with data access permissions and I've been assigning the Public role to all public-facing dashboards.

@eschutho
Copy link
Member

IMO this can be closed as fixed in 2.0.0.

Closing this as per the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report v1.3
Projects
None yet
Development

No branches or pull requests

8 participants