GitHub user dosubot[bot] added a comment to the discussion: Chromedriver 
requires login to take screenshots for reports

<!-- Answer -->
Yes, the Selenium-driven Chrome browser (via chromedriver) used by Superset to 
generate report screenshots does need to be logged in if your Superset 
deployment requires authentication. Superset handles this programmatically: 
before taking a screenshot, it logs in a user using Flask-Login, retrieves the 
session cookies, and injects them directly into the Selenium WebDriver 
session—so the browser is authenticated as that user. This is managed by the 
MachineAuthProvider class and related code. By default, it does not simulate a 
UI login; it sets cookies directly. You can override this behavior with a 
custom function using the WEBDRIVER_AUTH_FUNC config if you want to automate 
the login form instead, but authentication is always required unless you 
explicitly allow anonymous access in your Superset instance. More details and 
code references are available in the [MachineAuthProvider 
implementation](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superse
 t/utils/machine_auth.py) and [webdriver 
integration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/webdriver.py)
 ([discussion](https://github.com/apache/superset/issues/33731)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/d18eadc5-7871-4684-8ef4-0d878b05ce0e?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34131)

GitHub link: 
https://github.com/apache/superset/discussions/34131#discussioncomment-13728301

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to