From 7da15d108ebd961f387f69555664ee6fae4e6d8a Mon Sep 17 00:00:00 2001 From: Zachary Trabookis Date: Thu, 30 Jul 2020 12:29:43 -0400 Subject: [PATCH] Set `SESSION_COOKIE_SAMESITE=Lax` for `devstack_docker` environment by default to allow login to LMS service. This is a fix for `devstack_docker` default value set to `Lax` for `DCS_SESSION_COOKIE_SAMESITE`. It was defaulting to `SameSite=None` which requires a secure site which `localhost` site does not by default. Setting this `SameSite` cookie attribute to something other than `None` will continue to allow login to the LMS for `devstack_docker` environment. Regards to #23671 and https://discuss.openedx.org/t/lti-xblock-and-samesite/759/16 Set `SESSION_COOKIE_SAMESITE=Lax` for `devstack_docker` environment by default to allow login to LMS service. This is a fix for `devstack_docker` default value set to `Lax` for `DCS_SESSION_COOKIE_SAMESITE`. It was defaulting to `SameSite=None` which requires a secure site which `localhost` site does not by default. Setting this `SameSite` cookie attribute to something other than `None` will continue to allow login to the LMS for `devstack_docker` environment. Regards to #23671 and https://discuss.openedx.org/t/lti-xblock-and-samesite/759/16 --- lms/envs/devstack.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 7dde2ab955..b34699517d 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -395,6 +395,12 @@ if FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION'): # List of enterprise customer uuids to exclude from transition to use of enterprise-catalog ENTERPRISE_CUSTOMERS_EXCLUDED_FROM_CATALOG = () +##################################################################### + +# django-session-cookie middleware +DCS_SESSION_COOKIE_SAMESITE = 'Lax' +DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True + ##################################################################### # See if the developer has any local overrides. if os.path.isfile(join(dirname(abspath(__file__)), 'private.py')):