1
# Django settings for idptest project.
7
# ('Your Name', 'your_email@domain.com'),
13
PROJECT_ROOT = os.getcwd()
17
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
18
'NAME': '%s/idptest.sqlite' % PROJECT_ROOT, # Or path to database file if using sqlite3.
19
'USER': '', # Not used with sqlite3.
20
'PASSWORD': '', # Not used with sqlite3.
21
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
22
'PORT': '', # Set to empty string for default. Not used with sqlite3.
26
# Backwards-compatibility for Django 1.1:
27
DATABASE_ENGINE = 'sqlite3'
28
DATABASE_NAME = DATABASES['default']['NAME']
30
# Local time zone for this installation. Choices can be found here:
31
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32
# although not all choices may be available on all operating systems.
33
# On Unix systems, a value of None will cause Django to use the same
34
# timezone as the operating system.
35
# If running in a Windows environment this must be set to the same as your
37
TIME_ZONE = 'America/Chicago'
39
# Language code for this installation. All choices can be found here:
40
# http://www.i18nguy.com/unicode/language-identifiers.html
41
LANGUAGE_CODE = 'en-us'
45
# If you set this to False, Django will make some optimizations so as not
46
# to load the internationalization machinery.
49
# If you set this to False, Django will not format dates, numbers and
50
# calendars according to the current locale
53
# Absolute path to the directory that holds media.
54
# Example: "/home/media/media.lawrence.com/"
57
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
58
# trailing slash if there is a path component (optional in other cases).
59
# Examples: "http://media.lawrence.com", "http://example.com/media/"
62
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
64
# Examples: "http://foo.com/media/", "/media/".
65
ADMIN_MEDIA_PREFIX = '/media/'
67
# Make this unique, and don't share it with anybody.
68
SECRET_KEY = 'q+0vb%)c7c%&kl&jcca^6n7$3q4ktle9i28t(fd&qh28%l-%58'
70
# List of callables that know how to import templates from various sources.
72
'django.template.loaders.filesystem.Loader',
73
'django.template.loaders.app_directories.Loader',
74
# 'django.template.loaders.eggs.Loader',
77
MIDDLEWARE_CLASSES = (
78
'django.middleware.common.CommonMiddleware',
79
'django.contrib.sessions.middleware.SessionMiddleware',
80
'django.middleware.csrf.CsrfViewMiddleware',
81
'django.contrib.auth.middleware.AuthenticationMiddleware',
84
ROOT_URLCONF = 'idptest.urls'
87
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
88
# Always use forward slashes, even on Windows.
89
# Don't forget to use absolute paths, not relative paths.
90
'%s/templates' % PROJECT_ROOT,
94
'django.contrib.admin',
95
'django.contrib.auth',
96
'django.contrib.contenttypes',
97
'django.contrib.sessions',
98
'django.contrib.sites',
102
LOGIN_REDIRECT_URL = '/idp/sso/post/response/preview/'
103
SAML2IDP_SIGNING = True
104
SAML2IDP_PRIVATE_KEY_FILE = PROJECT_ROOT + '/keys/sample/sample-private-key.pem'
105
SAML2IDP_CERTIFICATE_FILE = PROJECT_ROOT + '/keys/sample/sample-certificate.pem'
109
logging.basicConfig(filename=PROJECT_ROOT + '/saml2idp.log', format='%(asctime)s: %(message)s', level=logging.DEBUG)
110
logging.info('Logging setup.')