Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Last active January 14, 2023 00:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThiefMaster/4f84cac8ca3ef17f0b7a9a4d52d48343 to your computer and use it in GitHub Desktop.
Save ThiefMaster/4f84cac8ca3ef17f0b7a9a4d52d48343 to your computer and use it in GitHub Desktop.
# vim: ft=python
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico'
BASE_URL = 'https://YOURHOSTNAME.cern.ch'
DEBUG = True
# DISABLE_CELERY_CHECK = False
DB_LOG = True
SMTP_USE_CELERY = False
ROUTE_OLD_URLS = True
LOG_DIR = '/home/YOURUSERNAME/dev/indico/data/log'
TEMP_DIR = '/home/YOURUSERNAME/dev/indico/data/tmp'
# ASSETS_DIR = '/home/YOURUSERNAME/dev/indico/data/assets'
CACHE_DIR = '/home/YOURUSERNAME/dev/indico/data/cache'
CACHE_BACKEND = 'redis'
REDIS_CACHE_URL = 'redis://127.0.0.1:6379/1'
SMTP_SERVER = ('localhost', 1025)
SUPPORT_EMAIL = "indico-team@YOURHOSTNAME.cern.ch"
PUBLIC_SUPPORT_EMAIL = "indico-support@YOURHOSTNAME.cern.ch"
NO_REPLY_EMAIL = "noreply-indico@YOURHOSTNAME.cern.ch"
SESSION_LIFETIME = 0
XELATEX_PATH = '/opt/texlive/bin/x86_64-linux/xelatex'
SECRET_KEY = 'faceroll your keyboard to generate your own key ;)'
DEFAULT_TIMEZONE = 'Europe/Zurich'
DEFAULT_LOCALE = 'en_GB'
ENABLE_ROOMBOOKING = True
_cern_oauth_config = {
'consumer_key': 'indico-YOURUSERNAME-dev',
'consumer_secret': '***',
'request_token_url': None,
'access_token_method': 'POST',
'access_token_url': 'https://oauth.web.cern.ch/OAuth/Token',
'authorize_url': 'https://oauth.web.cern.ch/OAuth/Authorize'
}
_cern_ldap_config = {
'uri': 'ldaps://cerndc.cern.ch',
'bind_dn': 'cn=indicodev,OU=Users,OU=Organic Units,DC=cern,DC=ch',
'bind_password': '***',
'timeout': 30,
'verify_cert': True,
'page_size': 1500,
'uid': 'cn',
'user_base': 'DC=cern,DC=ch',
'user_filter': '(objectCategory=user)',
'gid': 'cn',
'group_base': 'OU=Workgroups, DC=cern, DC=ch',
'group_filter': '(objectCategory=group)',
'member_of_attr': 'memberOf',
'ad_group_style': True,
}
AUTH_PROVIDERS = {
'cern-oauth': {
'type': 'oauth_cern',
'title': 'CERN OAuth',
'oauth': _cern_oauth_config,
'callback_uri': '/oauth/cern',
'user_info_endpoint': 'https://oauthresource.web.cern.ch/api/User',
},
'cern-ldap': {
'type': 'ldap_cern',
'title': 'CERN LDAP',
'ldap': _cern_ldap_config,
'default': True
}
}
IDENTITY_PROVIDERS = {
'cern-ldap': {
'type': 'ldap_cern',
'title': 'CERN LDAP',
'ldap': _cern_ldap_config,
'mapping': {
'first_name': 'givenName',
'last_name': 'sn',
'email': 'mail',
'affiliation': 'company',
'phone': 'telephoneNumber',
},
'trusted_email': True,
'default_group_provider': True,
'synced_fields': {'first_name', 'last_name', 'affiliation', 'phone', 'address'}
}
}
PROVIDER_MAP = {
'cern-oauth': 'cern-ldap',
'cern-ldap': 'cern-ldap'
}
LOCAL_IDENTITIES = False
LOCAL_REGISTRATION = False
CELERY_BROKER = 'redis://127.0.0.1:6379/3'
SCHEDULED_TASK_OVERRIDE = {
'indico_livesync.task.scheduled_update': None,
'indico_vc_vidyo.task.vidyo_cleanup': None,
'category_cleanup': None,
'indico_foundationsync.scheduled_update': None,
'indico_outlook.scheduled_update': None,
}
STORAGE_BACKENDS = {
'local': 'fs:/home/YOURUSERNAME/dev/indico/data/archive/',
}
ATTACHMENT_STORAGE = 'local'
USE_PROXY = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment