2011-09-28 16:08:26 +02:00
|
|
|
|
2013-05-22 18:46:50 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
_PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
|
2013-05-22 11:40:48 +02:00
|
|
|
|
|
|
|
# Choose storage
|
2014-09-15 10:48:46 +02:00
|
|
|
# mandaye.backends.ldap_back or mandaye.backends.sql
|
2013-05-22 11:40:48 +02:00
|
|
|
storage_backend = "mandaye.backends.sql"
|
|
|
|
|
|
|
|
## SQL Backend config
|
2013-05-21 11:59:19 +02:00
|
|
|
# Database configuration
|
2014-09-15 10:48:46 +02:00
|
|
|
# http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html
|
2014-05-21 13:15:40 +02:00
|
|
|
# rfc 1738 https://tools.ietf.org/html/rfc1738
|
|
|
|
# dialect+driver://username:password@host:port/database
|
2013-05-21 11:59:19 +02:00
|
|
|
db_url = 'sqlite:///test.db'
|
|
|
|
|
2014-09-15 10:48:46 +02:00
|
|
|
## LDAP Backend config
|
|
|
|
ldap_url = 'ldap://127.0.0.1'
|
|
|
|
ldap_bind_dn = 'cn=admin,dc=acompany,dc=org'
|
|
|
|
ldap_bind_password = 'MyPassword'
|
|
|
|
ldap_base_dn = 'ou=mandaye,dc=acompany,dc=org'
|
2014-09-10 18:51:54 +02:00
|
|
|
|
2014-05-27 18:38:44 +02:00
|
|
|
# urllib2 debug mode
|
|
|
|
debug = False
|
2011-09-07 22:19:30 +02:00
|
|
|
|
2011-11-04 22:47:23 +01:00
|
|
|
# Log configuration
|
2014-05-27 18:38:44 +02:00
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': True,
|
|
|
|
|
|
|
|
'formatters': {
|
|
|
|
'console': {
|
|
|
|
'format': '%(asctime)s %(levelname)s %(message)s',
|
|
|
|
'datefmt': '%H:%M:%S',
|
|
|
|
},
|
2014-05-30 16:11:14 +02:00
|
|
|
'syslog': {
|
|
|
|
'format': '%(name)s %(levelname)s %(uuid)s %(message)s',
|
2014-05-27 18:38:44 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'console': {
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'console'
|
|
|
|
},
|
|
|
|
'syslog': {
|
|
|
|
'level': 'INFO',
|
2014-05-28 09:46:53 +02:00
|
|
|
'class': 'entrouvert.logging.handlers.SysLogHandler',
|
2014-05-30 16:11:14 +02:00
|
|
|
'formatter': 'syslog',
|
2014-05-28 09:46:53 +02:00
|
|
|
'address': '/dev/log',
|
|
|
|
'max_length': 999,
|
2014-05-27 18:38:44 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'': {
|
|
|
|
'handlers': ['console'],
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'propagate': False,
|
|
|
|
},
|
|
|
|
'mandaye': {
|
2014-05-28 09:46:53 +02:00
|
|
|
'handlers': ['console', 'syslog'],
|
2014-05-27 18:38:44 +02:00
|
|
|
'level': 'DEBUG',
|
|
|
|
'propagate': False,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2011-11-04 22:47:23 +01:00
|
|
|
|
2011-09-07 22:19:30 +02:00
|
|
|
# Template directory
|
2013-05-22 18:46:50 +02:00
|
|
|
template_directory = os.path.join(_PROJECT_PATH, 'mandaye/templates')
|
2014-08-27 15:34:11 +02:00
|
|
|
templates_directories = []
|
2014-05-21 13:15:40 +02:00
|
|
|
# Configuration directory
|
|
|
|
config_root = os.path.join(_PROJECT_PATH, 'conf.d')
|
2013-10-23 17:50:54 +02:00
|
|
|
# Static path
|
2014-04-10 09:16:41 +02:00
|
|
|
static_url = '/mandaye/static'
|
2011-10-05 15:51:24 +02:00
|
|
|
# Static folder
|
2013-05-22 18:46:50 +02:00
|
|
|
static_root = os.path.join(_PROJECT_PATH, 'mandaye/static')
|
2013-05-21 23:36:46 +02:00
|
|
|
# Data dir
|
2013-05-22 18:46:50 +02:00
|
|
|
data_dir = os.path.join(_PROJECT_PATH, 'data')
|
2014-04-27 13:11:59 +02:00
|
|
|
# Skel root
|
|
|
|
skel_root = os.path.join(_PROJECT_PATH, 'mandaye/skel')
|
2011-08-31 19:54:24 +02:00
|
|
|
|
2014-05-27 13:20:27 +02:00
|
|
|
# Raven Sentry configuration
|
|
|
|
raven_dsn = None
|
|
|
|
|
2011-11-04 19:51:02 +01:00
|
|
|
# Email notification configuration
|
2011-11-16 19:08:02 +01:00
|
|
|
email_notification = False
|
2013-10-31 12:10:10 +01:00
|
|
|
email_prefix='[Mandaye]'
|
2011-11-04 19:51:02 +01:00
|
|
|
smtp_host = 'localhost'
|
|
|
|
smtp_port = 25
|
|
|
|
email_from = 'traceback@entrouvert.com'
|
|
|
|
email_to = ['admin@localhost']
|
|
|
|
|
2014-08-29 19:16:14 +02:00
|
|
|
# Template vars
|
|
|
|
template_vars = {}
|
|
|
|
|
2012-03-02 17:19:58 +01:00
|
|
|
# Use long traceback with xtraceback
|
|
|
|
use_long_trace = True
|
2012-03-01 19:35:44 +01:00
|
|
|
# Ask Mandaye to auto decompress a response message
|
|
|
|
# Decompress response only if you load a filter
|
|
|
|
auto_decompress = True
|
2014-06-27 14:09:11 +02:00
|
|
|
# Ask mandaye to add a toolbar
|
|
|
|
mandaye_toolbar = True
|
2014-09-05 19:20:02 +02:00
|
|
|
mandaye_offline_toolbar = False
|
2014-07-09 14:32:07 +02:00
|
|
|
# Authentic 2 auto connection
|
|
|
|
a2_auto_connection = False
|
2014-06-27 14:09:11 +02:00
|
|
|
|
2013-05-21 11:59:19 +02:00
|
|
|
# Encrypt service provider passwords with a secret
|
2011-12-23 11:01:03 +01:00
|
|
|
# You should install pycypto to use this feature
|
2013-05-21 11:59:19 +02:00
|
|
|
encrypt_sp_password = False
|
2011-12-07 18:49:50 +01:00
|
|
|
# Must be a 16, 24, or 32 bytes long
|
|
|
|
encrypt_secret = ''
|
|
|
|
|
2013-05-27 14:57:47 +02:00
|
|
|
alembic_cfg = os.path.join(_PROJECT_PATH, 'mandaye/alembic.ini')
|
|
|
|
alembic_script_path = os.path.join(_PROJECT_PATH, 'mandaye/alembic')
|
2013-05-23 11:06:46 +02:00
|
|
|
|
2014-05-21 13:15:40 +02:00
|
|
|
# supported authentification
|
|
|
|
authentifications = {
|
2014-05-27 18:38:44 +02:00
|
|
|
'saml2': 'mandaye.auth.SAML2Auth'
|
|
|
|
}
|
2014-05-21 13:15:40 +02:00
|
|
|
|
|
|
|
# supported mappers
|
|
|
|
mappers = {}
|
|
|
|
|
2013-05-22 18:46:50 +02:00
|
|
|
# beaker session configuration
|
2011-09-02 19:28:49 +02:00
|
|
|
session_opts = {
|
2014-05-27 18:38:44 +02:00
|
|
|
'session.type': 'file',
|
|
|
|
'session.cookie_expires': True,
|
|
|
|
'session.timeout': 3600,
|
2014-09-03 10:32:15 +02:00
|
|
|
'session.data_dir': '/var/tmp/beaker',
|
|
|
|
'session.path': '/'
|
2014-05-27 18:38:44 +02:00
|
|
|
}
|
2011-09-02 19:28:49 +02:00
|
|
|
|
2014-05-21 13:15:40 +02:00
|
|
|
# Needed if ssl is activated
|
|
|
|
ssl = False
|
|
|
|
keyfile = ''
|
|
|
|
certfile = ''
|
|
|
|
|
2014-05-27 18:38:44 +02:00
|
|
|
if raven_dsn:
|
|
|
|
LOGGING['handlers']['sentry'] = {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'class': 'raven.handlers.logging.SentryHandler',
|
|
|
|
'dsn': raven_dsn,
|
|
|
|
}
|
|
|
|
LOGGING['loggers']['']['handlers'].append('sentry')
|