dosubot[bot] commented on issue #37008: URL: https://github.com/apache/superset/issues/37008#issuecomment-3728142559
<!-- Greeting --> Hi @schoel-bis! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> This is a known issue in Superset 6.0.0: when using LDAP authentication with AUTH_USER_REGISTRATION enabled, Superset expects RECAPTCHA_PUBLIC_KEY to be set, even though ReCaptcha isn't used for LDAP. This causes a KeyError at startup if the key is missing. The logic in cached_common_bootstrap_data doesn't currently exclude LDAP from requiring the key, which leads to this problem [see code](https://github.com/apache/superset/blob/master/superset/views/base.py). A pull request has been opened to fix this by disabling reCAPTCHA when using LDAP authentication [PR #36857](https://github.com/apache/superset/pull/36857). Until that is released, the current workaround is to set RECAPTCHA_PUBLIC_KEY (and RECAPTCHA_PRIVATE_KEY) in your config, even if you don't use them. You can use Google's development-only keys for testing, or just set them to empty strings [see discussion](https://github.com/apache/superset/discussions/36296): ```python RECAPTCHA_PUBLIC_KEY = "your_public_key" # or "" RECAPTCHA_PRIVATE_KEY = "your_private_key" # or "" ``` This will allow Superset to start with LDAP authentication until the fix is merged and released. <!-- 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/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/47b65973-1cc1-411c-b499-3d4153f1aa47?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20in%20Superset%206.0.0%3A%20when%20using%20LDAP%20authentication%20with%20AUTH_USER_REGISTRATION%20enabled%2C%20Superset%20expects%20RECAPTCHA_PUBLIC_KEY%20to%20be%20set%2C%20even%20though%20ReCaptcha%20isn%27t%20used%20for%20LDAP.%20This%20causes%20a%20KeyError%20at%20startup%20if%20the%20key%20is%20missing.%20The%20logic%20in%20cached_common_bootstrap_data%20doesn%27t%20currently%20exclude%20LDAP%20from%20requiring%20the%20key%2C%20which%20leads%20to%20this%20problem%C2%A0%5Bsee%20code%5D%28https%3A//github.com/apache/superset/blob/master/superset/views/base.py%29.%0A%0AA%20pull%20request%20has%20been%20opened%20to%20fix%20this%20by%20disabling%20reCAPTCHA%20when%20using%20LDAP%20authentication%C2%A0%5BPR%20%2336857 %5D%28https%3A//github.com/apache/superset/pull/36857%29.%20Until%20that%20is%20released%2C%20the%20current%20workaround%20is%20to%20set%20RECAPTCHA_PUBLIC_KEY%20%28and%20RECAPTCHA_PRIVATE_KEY%29%20in%20your%20config%2C%20even%20if%20you%20don%27t%20use%20them.%20You%20can%20use%20Google%27s%20development-only%20keys%20for%20testing%2C%20or%20just%20set%20them%20to%20empty%20strings%C2%A0%5Bsee%20discussion%5D%28https%3A//github.com/apache/superset/discussions/36296%29%3A%0A%0A%60%60%60python%0ARECAPTCHA_PUBLIC_KEY%20%3D%20%22your_public_key%22%20%20%23%20or%20%22%22%0ARECAPTCHA_PRIVATE_KEY%20%3D%20%22your_private_key%22%20%20%23%20or%20%22%22%0A%60%60%60%0A%0AThis%20will%20allow%20Superset%20to%20start%20with%20LDAP%20authentication%20until%20the%20fix%20is%20merged%20and%20released.) [](https://go.dosu.dev/discord-bot) [](h ttps://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37008) -- 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]
