settings_local.example.py 3.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
# se veut agnostique au réseau considéré, de manière à être installable en
# quelques clics.
#
# Copyright © 2017  Gabriel Détraz
# Copyright © 2017  Goulven Kermarec
# Copyright © 2017  Augustin Lemesle
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 23
"""re2o.settings_locale
The file with all the available options for a locale configuration of re2o
24
"""
25

26 27
from __future__ import unicode_literals

28
# A secret key used by the server.
29
SECRET_KEY = 'SUPER_SECRET_KEY'
chirac's avatar
chirac committed
30

31
# The password to access the project database
32
DB_PASSWORD = 'SUPER_SECRET_DB'
chirac's avatar
chirac committed
33

34 35 36
# AES key for secret key encryption.
# The length must be a multiple of 16
AES_KEY = 'A_SECRET_AES_KEY'
37

38
# Should the server run in debug mode ?
chirac's avatar
chirac committed
39 40 41
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

42
# A list of admins of the services. Receive mails when an error occurs
43
ADMINS = [('Example', 'admin@example.net')]
Gabriel Detraz's avatar
Gabriel Detraz committed
44

45
# The list of hostname the server will respond to.
46
ALLOWED_HOSTS = ['URL_SERVER']
chirac's avatar
chirac committed
47

48 49 50 51
# The time zone the server is runned in
TIME_ZONE = 'Europe/Paris'

# The storage systems parameters to use
chirac's avatar
chirac committed
52
DATABASES = {
53
    'default': {  # The DB
54
        'ENGINE': 'db_engine',
55 56
        'NAME': 'db_name_value',
        'USER': 'db_user_value',
chirac's avatar
chirac committed
57
        'PASSWORD': DB_PASSWORD,
58
        'HOST': 'db_host_value',
Maël Kervella's avatar
Maël Kervella committed
59 60 61 62
        'TEST': {
            'CHARSET': 'utf8',
            'COLLATION': 'utf8_general_ci'
        }
Gabriel Detraz's avatar
Gabriel Detraz committed
63
    },
64
    'ldap': {  # The LDAP
Gabriel Detraz's avatar
Gabriel Detraz committed
65
        'ENGINE': 'ldapdb.backends.ldap',
66 67
        'NAME': 'ldap://ldap_host_ip/',
        'USER': 'ldap_dn',
68
        'TLS': True,
69
        'PASSWORD': 'SUPER_SECRET_LDAP',
70
    }
chirac's avatar
chirac committed
71 72
}

73 74
# Security settings for secure https
# Activate once https is correctly configured
75 76 77 78 79
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_BROWSER_XSS_FILTER = False
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
CSRF_COOKIE_HTTPONLY = False
chirac's avatar
chirac committed
80 81 82
X_FRAME_OPTIONS = 'DENY'
SESSION_COOKIE_AGE = 60 * 60 * 3

83
# The path where your organization logo is stored
chirac's avatar
chirac committed
84
LOGO_PATH = "static_files/logo.png"
85

86
# The mail configuration for Re2o to send mails
87
SERVER_EMAIL = 'no-reply@example.net'  # The mail address to use
88 89
EMAIL_HOST = 'MY_EMAIL_HOST'           # The host to use
EMAIL_PORT = MY_EMAIL_PORT             # The port to use
90

91
# Settings of the LDAP structure
Gabriel Detraz's avatar
Gabriel Detraz committed
92
LDAP = {
93 94 95 96
    'base_user_dn': 'cn=Utilisateurs,dc=example,dc=net',
    'base_userservice_dn': 'ou=service-users,dc=example,dc=net',
    'base_usergroup_dn': 'ou=posix,ou=groups,dc=example,dc=net',
    'base_userservicegroup_dn': 'ou=services,ou=groups,dc=example,dc=net',
Maël Kervella's avatar
Maël Kervella committed
97
    'user_gid': 500,
Gabriel Detraz's avatar
Gabriel Detraz committed
98 99
    }

100
# A range of UID to use. Used in linux environement
Gabriel Detraz's avatar
Gabriel Detraz committed
101
UID_RANGES = {
Maël Kervella's avatar
Maël Kervella committed
102 103
    'users': [21001, 30000],
    'service-users': [20000, 21000],
Gabriel Detraz's avatar
Gabriel Detraz committed
104 105
}

106
# A range of GID to use. Used in linux environement
Gabriel Detraz's avatar
Gabriel Detraz committed
107
GID_RANGES = {
Maël Kervella's avatar
Maël Kervella committed
108
    'posix': [501, 600],
Gabriel Detraz's avatar
Gabriel Detraz committed
109 110
}

111
# Some Django apps you want to add in you local project
112
OPTIONNAL_APPS = ()