From 23a991472147589a9f7f79bdb68436582d49d75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 13 Dec 2022 10:22:47 +0100 Subject: [PATCH] fix: authn login in dev by disabling enterprise integration In development, login via the authn mfe was broken because of explicit enterprise integration: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=18000): Max retries exceeded with url: /enterprise/api/v1/enterprise-learner/?username=regis (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) See: https://discuss.overhang.io/t/tutor-login-fail-in-new-version/3083 --- changelog.d/20221213_102202_regis_dev.md | 1 + tutor/templates/apps/openedx/settings/lms/development.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20221213_102202_regis_dev.md diff --git a/changelog.d/20221213_102202_regis_dev.md b/changelog.d/20221213_102202_regis_dev.md new file mode 100644 index 0000000..885880e --- /dev/null +++ b/changelog.d/20221213_102202_regis_dev.md @@ -0,0 +1 @@ +- [Bugfix] Fix Authn MFE login in development by disabling enterprise integration. (by @regisb) diff --git a/tutor/templates/apps/openedx/settings/lms/development.py b/tutor/templates/apps/openedx/settings/lms/development.py index e30aabb..ed0c277 100644 --- a/tutor/templates/apps/openedx/settings/lms/development.py +++ b/tutor/templates/apps/openedx/settings/lms/development.py @@ -24,7 +24,11 @@ SESSION_COOKIE_SAMESITE = "Lax" # CMS authentication IDA_LOGOUT_URI_LIST.append("http://{{ CMS_HOST }}:8001/logout/") -FEATURES['ENABLE_COURSEWARE_MICROFRONTEND'] = False +FEATURES["ENABLE_COURSEWARE_MICROFRONTEND"] = False + +# Disable enterprise integration +FEATURES["ENABLE_ENTERPRISE_INTEGRATION"] = False +SYSTEM_WIDE_ROLE_CLASSES.remove("enterprise.SystemWideEnterpriseUserRoleAssignment") LOGGING["loggers"]["oauth2_provider"] = { "handlers": ["console"],