You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When superset is set-up with oidc for authentication it is common to land on a protected url for example /dashboard.
In the case where the user is logged out he is correctly redirected through the login flow however once the page is loaded an unexpected Access is Denied is flashed on the screen. This flash message is added when the has_access decorator for the protected endpoint is evaluated before the user is logged in.
Adding the following to the AuthOIDCView configuration fixes the issue but a better solution may exist as this risks deleting important flash messages:
Hey @McDonnellJoseph! 👋 I'm here to help you tackle this bug and answer any questions you have. Let's squash those pesky bugs together!
To prevent the "Access Denied" flash message when starting the OIDC authentication flow from a protected endpoint in Superset, you can add the OIDC login endpoint to the CSRF exempt list in your superset_config.py file. This can be done by updating the WTF_CSRF_EXEMPT_LIST configuration.
Here is the relevant configuration:
WTF_CSRF_EXEMPT_LIST= ['login/']
This will exempt the OIDC login endpoint from CSRF protection, preventing the "Access Denied" flash message during the authentication flow [1].
Bug description
When superset is set-up with oidc for authentication it is common to land on a protected url for example /dashboard.
In the case where the user is logged out he is correctly redirected through the login flow however once the page is loaded an unexpected
Access is Denied
is flashed on the screen. This flash message is added when thehas_access
decorator for the protected endpoint is evaluated before the user is logged in.Adding the following to the AuthOIDCView configuration fixes the issue but a better solution may exist as this risks deleting important flash messages:
The relevant flash message stems from the following
flaskappbuilder/security/decorators.py
piece of code:How to reproduce the bug
/superset/dashboard/pk
Screenshots/recordings
No response
Superset version
4.0.2
Python version
3.9
Node version
16
Browser
Firefox
Additional context
This may stem from my logging configuration as an error is logged by the flask dependency but this does not appear in my superset logs.
Checklist
The text was updated successfully, but these errors were encountered: