Skip to content

Commit

Permalink
Merge pull request #50 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jlaney authored Jan 24, 2020
2 parents 01c35dd + b64f1a3 commit ac02415
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
2 changes: 2 additions & 0 deletions project/base_settings/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .auth_settings import *
from .restclients_settings import *
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


if os.getenv('ENV', 'localdev') == "localdev":
if os.getenv('ENV', 'localdev') == 'localdev':
SECRET_KEY = os.getenv('DJANGO_SECRET', get_random_secret_key())
else:
SECRET_KEY = os.getenv('DJANGO_SECRET', None)
Expand All @@ -30,7 +30,6 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]


AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.RemoteUserBackend',
]
Expand Down Expand Up @@ -104,7 +103,6 @@
}
]


LOGGING = {
'version': 1,
'disable_existing_loggers': False,
Expand Down Expand Up @@ -142,6 +140,3 @@
}
}
}

from .auth_settings import *
from .restclients_settings import *
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from .base_settings import INSTALLED_APPS
from django.urls import reverse_lazy
import os
from ._common import *


if os.getenv('AUTH', '').startswith('SAML'):
INSTALLED_APPS += ['uw_saml']
LOGIN_URL = reverse_lazy('saml_login')
LOGOUT_URL = reverse_lazy('saml_logout')
LOGIN_URL = '/saml/login'
LOGOUT_URL = '/saml/logout'
SAML_USER_ATTRIBUTE = os.getenv('SAML_USER_ATTRIBUTE', 'uwnetid')
SAML_FORCE_AUTHN = os.getenv('SAML_FORCE_AUTHN', False)

Expand Down Expand Up @@ -45,7 +43,7 @@
'sp': {
'entityId': os.getenv('SAML_ENTITY_ID', 'https://' + CLUSTER_CNAME + '/saml'),
'assertionConsumerService': {
'url': 'https://' + CLUSTER_CNAME + reverse_lazy('saml_sso'),
'url': 'https://' + CLUSTER_CNAME + '/saml/sso',
'binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
},
'singleLogoutService': {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os
from ._common import *


APPLICATION_CERT_PATH = os.getenv('CERT_PATH', '')
Expand Down

0 comments on commit ac02415

Please sign in to comment.