-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtest_settings.py
More file actions
51 lines (38 loc) · 1.65 KB
/
test_settings.py
File metadata and controls
51 lines (38 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (c) 2020-2025 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
# pylint: disable=undefined-variable
import os
# enable additional authentication backends
# so we can perform some sanity testing
for backend in (
"social_core.backends.fedora.FedoraOpenId",
"social_core.backends.github.GithubAppAuth",
"social_core.backends.github.GithubOAuth2",
"social_core.backends.gitlab.GitLabOAuth2",
"social_core.backends.keycloak.KeycloakOAuth2",
"social_auth_kerberos.backend.KerberosAuth",
"django_python3_ldap.auth.LDAPBackend",
):
if backend not in AUTHENTICATION_BACKENDS: # noqa: F821
AUTHENTICATION_BACKENDS.insert(0, backend) # noqa: F821
if "django_python3_ldap" not in INSTALLED_APPS: # noqa: F821
INSTALLED_APPS.append("django_python3_ldap") # noqa: F821
LDAP_AUTH_URL = "ldap://openldap_server:389"
LDAP_AUTH_USE_TLS = True
LDAP_AUTH_SEARCH_BASE = "ou=People,dc=example,dc=com"
SOCIAL_AUTH_KEYCLOAK_KEY = "kiwitcms-web-app"
SOCIAL_AUTH_KEYCLOAK_SECRET = os.environ["KC_CLIENT_SECRET"]
SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY = os.environ["KC_PUBLIC_KEY"]
SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = (
"http://kc.example.bg:8080/auth/realms/kiwi/protocol/openid-connect/auth"
)
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = (
"http://kc.example.bg:8080/auth/realms/kiwi/protocol/openid-connect/token"
)
ANONYMOUS_ANALYTICS = False
# used for e2e testing the password reset functionality
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = "/Kiwi/uploads/email-messages"
USE_CAPTCHA = False