-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-settings.py
82 lines (65 loc) · 1.64 KB
/
docker-settings.py
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
import os
DEBUG = True
STATIC_ROOT = '/app/static/'
MEDIA_ROOT = '/app/static/media/'
ALLOWED_HOSTS = ['*']
BASEURL = os.environ.get('APP_URL')
APIS = {
'authentication': BASEURL,
'base': BASEURL,
'booth': BASEURL,
'census': BASEURL,
'mixnet': BASEURL,
'postproc': BASEURL,
'store': BASEURL,
'visualizer': BASEURL,
'voting': BASEURL,
}
# Modules in use, commented modules that you won't use
MODULES = [
'authentication',
'base',
'booth',
'census',
'mixnet',
'postproc',
'store',
'visualizer',
'voting',
]
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': os.environ.get('DATABASE_NAME'),
'CLIENT': {
'host': os.environ.get('DATABASE_HOST'),
'username': os.environ.get('DATABASE_USERNAME'),
'password': os.environ.get('DATABASE_PASSWORD'),
'SSL': 'true'
}
}
}
# number of bits for the key, all auths should use the same number of bits
KEYBITS = 256
AUTH_LDAP_SERVER_URI = 'ldap://:389'
AUTH_LDAP_BIND_DN = 'cn=admin,dc=decide,dc=org'
AUTH_LDAP_BIND_PASSWORD = 'decide'
AUTH_LDAP_USER_SEARCH = LDAPSearch(
'ou=people,dc=decide,dc=org',
ldap.SCOPE_SUBTREE,
'(uid=%(user)s)',
)
# Populate the Django user from the LDAP directory.
AUTH_LDAP_USER_ATTR_MAP = {
'first_name': 'cn',
'last_name': 'sn',
'email': 'mail',
}
# Keep ModelBackend around for per-user permissions and maybe a local
# superuser.
AUTHENTICATION_BACKENDS = [
'django_auth_ldap.backend.LDAPBackend',
'base.backends.AuthBackend',
]