settings_local.example.py 3.53 KB
Newer Older
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
1
# coding: utf-8
2 3 4 5 6
# 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
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
7
# Copyright © 2017  Lara Kermarec
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# 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.
23 24
"""re2o.settings_locale
The file with all the available options for a locale configuration of re2o
25
"""
26

27 28
from __future__ import unicode_literals

29
# A secret key used by the server.
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
30
SECRET_KEY = "SUPER_SECRET_KEY"
chirac's avatar
chirac committed
31

32
# The password to access the project database
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
33
DB_PASSWORD = "SUPER_SECRET_DB"
chirac's avatar
chirac committed
34

35 36
# AES key for secret key encryption.
# The length must be a multiple of 16
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
37
AES_KEY = "A_SECRET_AES_KEY"
38

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

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

46
# The list of hostname the server will respond to.
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
47
ALLOWED_HOSTS = ["URL_SERVER"]
chirac's avatar
chirac committed
48

49
# The time zone the server is runned in
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
50
TIME_ZONE = "Europe/Paris"
51 52

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

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

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

84
# The mail configuration for Re2o to send mails
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
85 86 87
SERVER_EMAIL = "no-reply@example.net"  # The mail address to use
EMAIL_HOST = "MY_EMAIL_HOST"  # The host to use
EMAIL_PORT = MY_EMAIL_PORT  # The port to use
88

89
# Settings of the LDAP structure
Gabriel Detraz's avatar
Gabriel Detraz committed
90
LDAP = {
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
91 92 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",
    "user_gid": 500,
}
Gabriel Detraz's avatar
Gabriel Detraz committed
97

98
# A range of UID to use. Used in linux environement
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
99
UID_RANGES = {"users": [21001, 30000], "service-users": [20000, 21000]}
Gabriel Detraz's avatar
Gabriel Detraz committed
100

101
# A range of GID to use. Used in linux environement
Hugo Levy-Falk's avatar
Hugo Levy-Falk committed
102
GID_RANGES = {"posix": [501, 600]}
Gabriel Detraz's avatar
Gabriel Detraz committed
103

104 105 106
# Some optionnal Re2o Apps
OPTIONNAL_APPS_RE2O = ()

107
# Some Django apps you want to add in you local project
108
OPTIONNAL_APPS = OPTIONNAL_APPS_RE2O + ()