|
@@ -34,6 +34,12 @@ DATABASES = {
|
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
|
ALLOWED_HOSTS = []
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
+# Enable strong authentication (username + password + OTP)
|
|
|
|
+# when enabled, strong authentication is done via a Yubikey hardware token
|
|
|
|
+# OTP is validated by a local or a remote service (configuration is done
|
|
|
|
+# through django admin pages)
|
|
|
|
+ENABLE_STRONG_AUTH = False
|
|
|
|
+
|
|
# Local time zone for this installation. Choices can be found here:
|
|
# Local time zone for this installation. Choices can be found here:
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
# although not all choices may be available on all operating systems.
|
|
# although not all choices may be available on all operating systems.
|
|
@@ -58,7 +64,9 @@ USE_L10N = True
|
|
USE_TZ = True
|
|
USE_TZ = True
|
|
|
|
|
|
# Default URL for login and logout
|
|
# Default URL for login and logout
|
|
|
|
+#LOGIN_URL = '/members/login_otp'
|
|
LOGIN_URL = '/members/login'
|
|
LOGIN_URL = '/members/login'
|
|
|
|
+OTP_LOGIN_URL = '/members/login_otp'
|
|
LOGIN_REDIRECT_URL = '/members'
|
|
LOGIN_REDIRECT_URL = '/members'
|
|
LOGOUT_URL = '/members/logout'
|
|
LOGOUT_URL = '/members/logout'
|
|
|
|
|
|
@@ -122,6 +130,7 @@ MIDDLEWARE_CLASSES = (
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
+ 'django_otp.middleware.OTPMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
# Uncomment the next line for simple clickjacking protection:
|
|
# Uncomment the next line for simple clickjacking protection:
|
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
@@ -142,17 +151,28 @@ INSTALLED_APPS = (
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.sessions',
|
|
'django.contrib.sites',
|
|
'django.contrib.sites',
|
|
- 'ldapdb', # LDAP as database backend
|
|
|
|
|
|
+
|
|
|
|
+ # LDAP as database backend
|
|
|
|
+ 'ldapdb',
|
|
|
|
+
|
|
'django.contrib.messages',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.staticfiles',
|
|
- # Uncomment the next line to enable the admin:
|
|
|
|
- 'django.contrib.admin',
|
|
|
|
|
|
+
|
|
|
|
+ # same as django.contrib.admin but without autodiscover() call :
|
|
|
|
+ # https://docs.djangoproject.com/en/dev/ref/contrib/admin/#discovery-of-admin-files
|
|
|
|
+ 'django.contrib.admin.apps.SimpleAdminConfig',
|
|
|
|
+
|
|
# Uncomment the next line to enable admin documentation:
|
|
# Uncomment the next line to enable admin documentation:
|
|
#'django.contrib.admindocs',
|
|
#'django.contrib.admindocs',
|
|
|
|
+
|
|
'polymorphic',
|
|
'polymorphic',
|
|
# 'south',
|
|
# 'south',
|
|
- 'autocomplete_light', #Automagic autocomplete foreingkey form component
|
|
|
|
- 'activelink', #Detect if a link match actual page
|
|
|
|
|
|
+
|
|
|
|
+ #Automagic autocomplete foreingkey form component
|
|
|
|
+ 'autocomplete_light',
|
|
|
|
+
|
|
|
|
+ #Detect if a link match actual page
|
|
|
|
+ 'activelink',
|
|
'coin',
|
|
'coin',
|
|
'coin.members',
|
|
'coin.members',
|
|
'coin.offers',
|
|
'coin.offers',
|
|
@@ -161,7 +181,9 @@ INSTALLED_APPS = (
|
|
'coin.reverse_dns',
|
|
'coin.reverse_dns',
|
|
'coin.configuration',
|
|
'coin.configuration',
|
|
'coin.vpn',
|
|
'coin.vpn',
|
|
- 'coin.isp_database'
|
|
|
|
|
|
+ 'coin.isp_database',
|
|
|
|
+ 'django_otp',
|
|
|
|
+ 'otp_yubikey'
|
|
)
|
|
)
|
|
|
|
|
|
# A sample logging configuration. The only tangible logging
|
|
# A sample logging configuration. The only tangible logging
|
|
@@ -249,3 +271,6 @@ try:
|
|
from settings_local import *
|
|
from settings_local import *
|
|
except ImportError:
|
|
except ImportError:
|
|
pass
|
|
pass
|
|
|
|
+
|
|
|
|
+# if ENABLE_STRONG_AUTH:
|
|
|
|
+# LOGIN_URL = OTP_LOGIN_URL
|