fix(security): restore default value of SESSION_COOKIE_SECURE to False #26005
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
The default value of SESSION_COOKIE_SECURE was historically False. This was changed unintentionally when we enabled TALISMAN_CONFIG by default. That comes with unstated, implicit settings including making SESSION_COOKIE_SECURE = True. This contradicts our documentation (issue #25854).
More importantly, it contributed to a critical problem where new users who have not enabled HTTPS yet as part of their setup encounter a login loop and are unable to use Superset. The canonical issue here is #24579 (comment), please review that thread ending with the comment I linked.
When users discuss this problem in the issues, the two most upvoted "fixes" are to disable Talisman entirely or to revert to Superset 2.1.0 (which did not have Talisman enabled by default) 😬
I'm not an expert in this area and there might be more we need to to do to get a combination of security values that works for out-of-the-box setups. But this PR seemed like a good simple start in that it's reverting an unintended change that came when we implemented Talisman CSP.
TESTING INSTRUCTIONS
Install a new instance of Superset with this config value in Talisman? Two users in that thread report that this config change enabled them to install and use Superset.
ADDITIONAL INFORMATION