Révision b1e68a2c
Ajouté par Thomas Noël il y a plus de 9 ans
usr/local/univnautes/sp/sp/settings.py | ||
---|---|---|
107 | 107 |
'django.middleware.csrf.CsrfViewMiddleware', |
108 | 108 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
109 | 109 |
'django.contrib.messages.middleware.MessageMiddleware', |
110 |
# Uncomment the next line for simple clickjacking protection: |
|
111 |
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
110 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
112 | 111 |
) |
113 | 112 |
|
114 | 113 |
ROOT_URLCONF = 'sp.urls' |
... | ... | |
149 | 148 |
LOGIN_REDIRECT_URL = '/' |
150 | 149 |
|
151 | 150 |
|
152 |
# A sample logging configuration. The only tangible logging |
|
153 |
# performed by this configuration is to send an email to |
|
154 |
# the site admins on every HTTP 500 error when DEBUG=False. |
|
155 |
# See http://docs.djangoproject.com/en/dev/topics/logging for |
|
156 |
# more details on how to customize your logging configuration. |
|
151 |
# logging configuration |
|
152 |
# FIXME : syslog (freebsd -> /var/run/log) / local4 / debug |
|
157 | 153 |
LOGGING = { |
158 | 154 |
'version': 1, |
159 | 155 |
'disable_existing_loggers': False, |
... | ... | |
178 | 174 |
SAML_METADATA_ROOT = 'metadata' |
179 | 175 |
SAML_METADATA_AUTOLOAD = 'none' |
180 | 176 |
|
177 |
AUTH_FRONTENDS = ('authentic2.authsaml2.frontend.AuthSAML2Frontend',) |
|
178 |
AUTHENTICATION_BACKENDS = ( |
|
179 |
'django.contrib.auth.backends.ModelBackend', |
|
180 |
'authentic2.authsaml2.backends.AuthSAML2PersistentBackend', |
|
181 |
'authentic2.authsaml2.backends.AuthSAML2TransientBackend') |
|
182 |
|
|
181 | 183 |
|
182 | 184 |
# get some values from config.xml |
183 |
# => this django project must be restarted if config.xml is changed
|
|
185 |
# => server must be restarted if config.xml is changed
|
|
184 | 186 |
|
185 | 187 |
sp = pfconfigxml.get_sp() |
186 | 188 |
# SAML certificate |
187 | 189 |
SAML_SIGNATURE_PUBLIC_KEY = sp.get('saml_cert', {}).get('crt') |
188 | 190 |
SAML_SIGNATURE_PRIVATE_KEY = sp.get('saml_cert', {}).get('prv') |
191 |
|
|
189 | 192 |
# SESSION_COOKIE_AGE from pfsenseid, at least 2 minutes |
190 | 193 |
SESSION_COOKIE_AGE = max(sp.get('cp', {}).get('idletimeout', 2)*60, 2*60) |
191 | 194 |
|
Formats disponibles : Unified diff
sp/settings.py: AUTH params in settings.py