From fa826581003150299e8547bbad4ec85159f0dbad Mon Sep 17 00:00:00 2001 From: TJ Keemon Date: Thu, 28 Sep 2017 18:15:00 +0800 Subject: [PATCH] use AUTHENTICATION_BACKENDS from APPSEMBLER_FEATURES --- lms/envs/aws_appsembler.py | 5 +++++ lms/envs/devstack_appsembler.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lms/envs/aws_appsembler.py b/lms/envs/aws_appsembler.py index 2b2345956095..e9144142a13c 100644 --- a/lms/envs/aws_appsembler.py +++ b/lms/envs/aws_appsembler.py @@ -116,3 +116,8 @@ CUSTOM_SSO_FIELDS_SYNC = ENV_TOKENS.get('CUSTOM_SSO_FIELDS_SYNC', {}) HTTPS = ENV_TOKENS.get('BASE_SCHEME', 'https').lower() == 'http' and 'off' or 'on' + +#configure auth backends +if 'LMS_AUTHENTICATION_BACKENDS' in APPSEMBLER_FEATURES.keys(): + #default behavior is to replace the existing backends with those in APPSEMBLER_FEATURES + AUTHENTICATION_BACKENDS = tuple(APPSEMBLER_FEATURES['LMS_AUTHENTICATION_BACKENDS']) diff --git a/lms/envs/devstack_appsembler.py b/lms/envs/devstack_appsembler.py index 8c092bd5ad1d..06586fea8d04 100644 --- a/lms/envs/devstack_appsembler.py +++ b/lms/envs/devstack_appsembler.py @@ -105,3 +105,8 @@ CUSTOM_SSO_FIELDS_SYNC = ENV_TOKENS.get('CUSTOM_SSO_FIELDS_SYNC', {}) # to allow to run python-saml with custom port SP_SAML_RESTRICT_MODE = False + +#configure auth backends +if 'LMS_AUTHENTICATION_BACKENDS' in APPSEMBLER_FEATURES.keys(): + #default behavior is to replace the existing backends with those in APPSEMBLER_FEATURES + AUTHENTICATION_BACKENDS = tuple(APPSEMBLER_FEATURES['LMS_AUTHENTICATION_BACKENDS'])