You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/23 13:55:38 UTC
[GitHub] [superset] heul commented on issue #14330: [Report] Reports not working with OIDC auth
heul commented on issue #14330:
URL: https://github.com/apache/superset/issues/14330#issuecomment-885656343
@dpgaspar , thanks for the hint. It might even suffice to overwrite the webdriver auth function (defined by **WEBDRIVER_AUTH_FUNC**). We use Azure as OAuth provider and any /login request is redirected there and then selenium times out. Works perfectly, when we added this to our **superset_config.py**:
```
from superset.utils.urls import headless_url
from superset.utils.machine_auth import MachineAuthProvider
def auth_driver(driver, user):
# Setting cookies requires doing a request first, but /login is redirected to oauth provider, and stuck there.
driver.get(headless_url("/doesnotexist"))
cookies = MachineAuthProvider.get_auth_cookies(user)
for cookie_name, cookie_val in cookies.items():
driver.add_cookie(dict(name=cookie_name, value=cookie_val))
return driver
WEBDRIVER_AUTH_FUNC = auth_driver
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org