question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Report] Reports not working with OIDC auth

See original GitHub issue

Can’t send Report emails with error Report Schedule sellenium user not found.

Expected results

Can send Report emails

Actual results

Almost nothing in logs but Report Schedule sellenium user not found error in reports action log.

Screenshots

image

How to reproduce the bug

Setup smth like this

SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 600

ENABLE_ALERTS = True
FEATURE_FLAGS = {
    'ALERT_REPORTS': True
}

WEBDRIVER_TYPE = "chrome"
#WEBDRIVER_OPTION_ARGS = [
    "--force-device-scale-factor=2.0",
    "--high-dpi-support=2.0",
    "--headless",
    "--disable-gpu",
    "--disable-dev-shm-usage",
    "--no-sandbox",
    "--disable-setuid-sandbox",
    "--disable-extensions",
]

# This is for internal use, you can keep http
WEBDRIVER_BASEURL="http://localhost:8088"
# This is the link sent to the recipient, change to your domain eg. https://superset.mydomain.com
WEBDRIVER_BASEURL_USER_FRIENDLY="https://<BASE_URL>"

in config but no emails sent (or tried to send).

Environment

(please complete the following information):

  • superset version: Superset 1.1.0
  • python version: Python 3.8.7
  • node.js version: v12.21.0

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

Apr 24 21:00:00 node6 celery[1401583]: Report state: Report Schedule sellenium user not found
Apr 24 21:00:00 node6 celery[1401583]: [2021-04-24 21:00:00,239: INFO/ForkPoolWorker-1] Report state: Report Schedule sellenium user not found

(every hour)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:31 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
heulcommented, Jul 23, 2021

@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
1reaction
dpgasparcommented, May 19, 2021

@dusatvoj

I see so it may be because of: https://github.com/apache/superset/blob/master/superset/utils/machine_auth.py#L53 by default the test request is /login if it redirects immediately to openid then that could be your problem. You can write your own MachineAuthProvider and set it on MACHINE_AUTH_PROVIDER_CLASS config key.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Report] Reports not working with OIDC auth #18289 - GitHub
Anyway: I've tried to set it up BUT There's another error Report Schedule execution failed when generating a screenshot. Apr 29 09:01:45 node6...
Read more >
Troubleshooting Single Sign-On using OIDC
Authentication: Sisense recognizes that the user isn't signed in, and that you have enabled OpenID Connect in your Admin settings.
Read more >
Troubleshooting OpenID-Connect Authentication on Containers
The goal of this blog post is to provide a basic understanding of how to troubleshoot ManageIQ configured for OpenID-Connect authentication ...
Read more >
Troubleshoot OpenID Connect - Tableau Help
Use the following topics to troubleshoot OpenID Connect (OIDC) issues in Tableau Server. OpenID Connect protocol is supported by many identity providers.
Read more >
Help - OpenID Authentication - i-net Clear Reports
OpenID Authentication. This generic provider works with all OpenID Connect (OIDC) services which are compatible with the OpenID specification.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found