dosubot[bot] commented on issue #37224: URL: https://github.com/apache/superset/issues/37224#issuecomment-3764076793
<!-- Answer --> Kerberos authentication for Druid in Superset is handled entirely by the underlying driver (`pydruid` + `requests-kerberos`), not by Superset itself. Superset just passes your `connect_args` to the driver—there’s no built-in validation or UI for Kerberos fields, so everything depends on your environment and configuration ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/druid.py#L41-L142)). Here’s a checklist to help you troubleshoot: 1. **Dependencies**: Make sure you have both `pydruid` and `requests-kerberos` installed in your Python environment ([docs](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/databases.mdx#L9-L637)). 2. **System Kerberos setup**: Your host needs a valid Kerberos configuration (`krb5.conf`), a keytab (if using one), and a valid ticket (run `kinit` as the Superset user). 3. **Connect args structure**: Your JSON should be placed under `engine_params.connect_args` in the “Extras” field, like: ```json { "engine_params": { "connect_args": { "kerberos": true, "kerberos_service_name": "druid", "kerberos_principal": "[email protected]", "delegate": false } } } ``` The structure must match what `pydruid` expects—no extra nesting or config wrappers ([example](https://github.com/apache/superset/discussions/34651)). 4. **Test outside Superset**: Try connecting to Druid using a minimal Python script with SQLAlchemy and `pydruid` using the same connection string and `connect_args`. If it fails, the issue is likely with your environment or Kerberos setup, not Superset ([example](https://github.com/apache/superset/issues/32266)). 5. **Logs**: If it still fails, check Superset’s logs for the exact error message or stack trace. That info will help pinpoint whether it’s a config, dependency, or environment issue. If you share the error message from the logs, I can help you dig deeper. For more details, you can also check the [pydruid docs](https://pydruid.readthedocs.io/en/latest/) and [requests-kerberos docs](https://requests-kerberos.readthedocs.io/en/latest/). <!-- 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/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/491bc7be-2372-4f87-ba53-ce89373dddab?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Kerberos%20authentication%20for%20Druid%20in%20Superset%20is%20handled%20entirely%20by%20the%20underlying%20driver%20%28%60pydruid%60%20%2B%20%60requests-kerberos%60%29%2C%20not%20by%20Superset%20itself.%20Superset%20just%20passes%20your%20%60connect_args%60%20to%20the%20driver%E2%80%94there%E2%80%99s%20no%20built-in%20validation%20or%20UI%20for%20Kerberos%20fields%2C%20so%20everything%20depends%20on%20your%20environment%20and%20configuration%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/druid.py%23L41-L142%29%29.%0A%0AHere%E2%80%99s%20a%20checklist%20to%20help%20you%20troubleshoot%3A%0A%0A1.%20%2A%2ADependencies%2A%2A%3A%20Make%20sure%20you%20have%20both%20%60pydruid %60%20and%20%60requests-kerberos%60%20installed%20in%20your%20Python%20environment%20%28%5Bdocs%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/databases.mdx%23L9-L637%29%29.%0A2.%20%2A%2ASystem%20Kerberos%20setup%2A%2A%3A%20Your%20host%20needs%20a%20valid%20Kerberos%20configuration%20%28%60krb5.conf%60%29%2C%20a%20keytab%20%28if%20using%20one%29%2C%20and%20a%20valid%20ticket%20%28run%20%60kinit%60%20as%20the%20Superset%20user%29.%0A3.%20%2A%2AConnect%20args%20structure%2A%2A%3A%20Your%20JSON%20should%20be%20placed%20under%20%60engine_params.connect_args%60%20in%20the%20%E2%80%9CExtras%E2%80%9D%20field%2C%20like%3A%0A%20%20%20%60%60%60json%0A%20%20%20%7B%0A%20%20%20%20%20%22engine_params%22%3A%20%7B%0A%20%20%20%20%20%20%20%22connect_args%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%22kerberos%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%22kerberos_service_name%22%3A%20%22druid%22%2C%0A%20%20%20%20%20%20%20%20%20%22kerbero s_principal%22%3A%20%22superset%40EXAMPLE.COM%22%2C%0A%20%20%20%20%20%20%20%20%20%22delegate%22%3A%20false%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20%60%60%60%0A%20%20%20The%20structure%20must%20match%20what%20%60pydruid%60%20expects%E2%80%94no%20extra%20nesting%20or%20config%20wrappers%20%28%5Bexample%5D%28https%3A//github.com/apache/superset/discussions/34651%29%29.%0A4.%20%2A%2ATest%20outside%20Superset%2A%2A%3A%20Try%20connecting%20to%20Druid%20using%20a%20minimal%20Python%20script%20with%20SQLAlchemy%20and%20%60pydruid%60%20using%20the%20same%20connection%20string%20and%20%60connect_args%60.%20If%20it%20fails%2C%20the%20issue%20is%20likely%20with%20your%20environment%20or%20Kerberos%20setup%2C%20not%20Superset%20%28%5Bexample%5D%28https%3A//github.com/apache/superset/issues/32266%29%29.%0A5.%20%2A%2ALogs%2A%2A%3A%20If%20it%20still%20fails%2C%20check%20Superset%E2%80%99s%20logs%20for%20the%20exact%20error%20message%20or%20stack%20trace.%20That%20i nfo%20will%20help%20pinpoint%20whether%20it%E2%80%99s%20a%20config%2C%20dependency%2C%20or%20environment%20issue.%0A%0AIf%20you%20share%20the%20error%20message%20from%20the%20logs%2C%20I%20can%20help%20you%20dig%20deeper.%20For%20more%20details%2C%20you%20can%20also%20check%20the%20%5Bpydruid%20docs%5D%28https%3A//pydruid.readthedocs.io/en/latest/%29%20and%20%5Brequests-kerberos%20docs%5D%28https%3A//requests-kerberos.readthedocs.io/en/latest/%29.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37224) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
