diff --git a/api/tacticalrmm/ee/sso/sso_settings.py b/api/tacticalrmm/ee/sso/sso_settings.py new file mode 100644 index 00000000..82a49b96 --- /dev/null +++ b/api/tacticalrmm/ee/sso/sso_settings.py @@ -0,0 +1,18 @@ +""" +Copyright (c) 2024-present Amidaware Inc. +This file is subject to the EE License Agreement. +For details, see: https://license.tacticalrmm.com/ee +""" + +HEADLESS_ONLY = True +SOCIALACCOUNT_ONLY = True +ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" +ACCOUNT_EMAIL_VERIFICATION = "none" +SOCIALACCOUNT_ADAPTER = "ee.sso.adapter.TacticalSocialAdapter" +SOCIALACCOUNT_EMAIL_AUTHENTICATION = True +SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True +SOCIALACCOUNT_EMAIL_VERIFICATION = True + +SOCIALACCOUNT_PROVIDERS = {"openid_connect": {"OAUTH_PKCE_ENABLED": True}} + +SESSION_COOKIE_SECURE = True diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 4f211ceb..9b9cd955 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -117,19 +117,8 @@ REDIS_HOST = "127.0.0.1" TRMM_LOG_LEVEL = "ERROR" TRMM_LOG_TO = "file" -# settings for django all auth -HEADLESS_ONLY = True -SOCIALACCOUNT_ONLY = True -ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" -ACCOUNT_EMAIL_VERIFICATION = "none" -SOCIALACCOUNT_ADAPTER = "ee.sso.adapter.TacticalSocialAdapter" -SOCIALACCOUNT_EMAIL_AUTHENTICATION = True -SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True -SOCIALACCOUNT_EMAIL_VERIFICATION = True - -SOCIALACCOUNT_PROVIDERS = {"openid_connect": {"OAUTH_PKCE_ENABLED": True}} - -SESSION_COOKIE_SECURE = True +with suppress(ImportError): + from ee.sso.sso_settings import * # noqa with suppress(ImportError): from .local_settings import * # noqa