Skip to content

Commit

Permalink
Merge pull request #954 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jlaney committed Feb 23, 2024
2 parents b29dee7 + d9fe8a5 commit 81f7e6b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DJANGO_CONTAINER_VERSION=1.4.1
ARG DJANGO_CONTAINER_VERSION=2.0.1

FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} as app-container

Expand Down
26 changes: 3 additions & 23 deletions docker/prod-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,9 @@ daemon:

certs:
mounted: true
certPath: /certs/apps.canvas.uw.edu-uwca.cert
keyPath: /certs/apps.canvas.uw.edu-uwca.key
secretName: apps.canvas.uw.edu-uwca-certs

mountedSecrets:
enabled: true
mountPath: /ssl
secretName: apps.canvas.uw.edu-openssl-conf
certPath: /certs/apps.canvas.uw.edu-ic.cert
keyPath: /certs/apps.canvas.uw.edu-ic.key
secretName: apps.canvas.uw.edu-ic-certs

environmentVariables:
- name: ENV
Expand Down Expand Up @@ -417,9 +412,6 @@ environmentVariables:
- name: CLUSTER_CNAME
value: apps.canvas.uw.edu

- name: OPENSSL_CONF
value: /ssl/openssl.cnf

externalSecrets:
enabled: true
secrets:
Expand Down Expand Up @@ -497,13 +489,6 @@ externalSecrets:
property: username
- name: password
property: password
- name: apps.canvas.uw.edu-uwca-certs
externalKey: canvas/prod/uwca-certs
data:
- name: apps.canvas.uw.edu-uwca.cert
property: apps.canvas.uw.edu-uwca.cert
- name: apps.canvas.uw.edu-uwca.key
property: apps.canvas.uw.edu-uwca.key
- name: apps.canvas.uw.edu-ic-certs
externalKey: canvas/prod/ic-certs
data:
Expand All @@ -516,11 +501,6 @@ externalSecrets:
data:
- name: uw-idp-cert
property: cert
- name: apps.canvas.uw.edu-openssl-conf
externalKey: openssl-conf
data:
- name: openssl.cnf
property: openssl.cnf

environmentVariablesSecrets:
djangoSecret:
Expand Down
26 changes: 3 additions & 23 deletions docker/test-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,9 @@ daemon:

certs:
mounted: true
certPath: /certs/test-apps.canvas.uw.edu-uwca.cert
keyPath: /certs/test-apps.canvas.uw.edu-uwca.key
secretName: test-apps.canvas.uw.edu-uwca-certs

mountedSecrets:
enabled: true
mountPath: /ssl
secretName: test-apps.canvas.uw.edu-openssl-conf
certPath: /certs/test-apps.canvas.uw.edu-ic.cert
keyPath: /certs/test-apps.canvas.uw.edu-ic.key
secretName: test-apps.canvas.uw.edu-ic-certs

environmentVariables:
- name: ENV
Expand Down Expand Up @@ -124,9 +119,6 @@ environmentVariables:
- name: CLUSTER_CNAME
value: test-apps.canvas.uw.edu

- name: OPENSSL_CONF
value: /ssl/openssl.cnf

externalSecrets:
enabled: true
secrets:
Expand Down Expand Up @@ -204,13 +196,6 @@ externalSecrets:
property: username
- name: password
property: password
- name: test-apps.canvas.uw.edu-uwca-certs
externalKey: canvas/test/uwca-certs
data:
- name: test-apps.canvas.uw.edu-uwca.cert
property: test-apps.canvas.uw.edu-uwca.cert
- name: test-apps.canvas.uw.edu-uwca.key
property: test-apps.canvas.uw.edu-uwca.key
- name: test-apps.canvas.uw.edu-ic-certs
externalKey: canvas/test/ic-certs
data:
Expand All @@ -223,11 +208,6 @@ externalSecrets:
data:
- name: uw-idp-cert
property: cert
- name: test-apps.canvas.uw.edu-openssl-conf
externalKey: openssl-conf
data:
- name: openssl.cnf
property: openssl.cnf
environmentVariablesSecrets:
djangoSecret:
name: DJANGO_SECRET
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
'python-dateutil',
'django-pyscss>=2.0',
'beautifulsoup4',
'suds-jurko==0.6',
'suds',
'django-blti~=2.2',
'django-cors-headers',
'aws-message-client~=1.5',
'djangorestframework~=3.11',
'aws-message-client~=1.6',
'djangorestframework~=3.14',
'django-storages[google]',
'uw-memcached-clients~=1.0',
'UW-RestClients-Core~=1.4',
Expand Down
9 changes: 8 additions & 1 deletion sis_provisioner/dao/astra.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ def __init__(self, *args, **kwargs):
self.key_file = settings.ASTRA_KEY
self.cert_file = settings.ASTRA_CERT

@property
def _ssl_context(self):
ctx = ssl.SSLContext()
ctx.load_cert_chain(certfile=self.cert_file, keyfile=self.key_file)
ctx.set_ciphers('HIGH:!DH:!aNULL')
return ctx

def connect(self):
sock = socket.create_connection((self.host, self.port), self.timeout)
if self._tunnel_host:
self.sock = sock
self._tunnel()
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
self.sock = self._ssl_context.wrap_socket(sock)


class HTTPSClientAuthHandler(HTTPSHandler):
Expand Down

0 comments on commit 81f7e6b

Please sign in to comment.