Commit 1d92de52 authored by Alexander Lercher's avatar Alexander Lercher

Secured role-stage with ssl

parent 50587721
......@@ -6,7 +6,7 @@ info:
# Import security definitions from global security definition
securityDefinitions:
$ref: '../../../../modules/security/security.yml#securityDefinitions'
$ref: '../security/security.yml#securityDefinitions'
consumes:
- "application/json"
......
......@@ -26,7 +26,11 @@ def api_root():
return 'Endpoint of role-stage-discovery-microservice!'
# SSL configuration
context = (f'{modules_path}/certificate/articonf1.crt', f'{modules_path}/certificate/articonf1.key') # certificate and key files
try:
certificate_path = os.environ['ARTICONF_CERTIFICATE_PATH']
except KeyError:
certificate_path = '/srv/articonf/'
context = (os.path.normpath(f'{certificate_path}/articonf1.crt'), os.path.normpath(f'{certificate_path}/articonf1.key')) # certificate and key files
# start app
if __name__ == '__main__':
......
......@@ -39,6 +39,7 @@ requests==2.22.0
rope==0.16.0
scikit-learn==0.22.1
scipy==1.4.1
semver==2.10.2
six==1.14.0
swagger-ui-bundle==0.0.6
typed-ast==1.4.1
......
......@@ -32,6 +32,14 @@ spec:
image: alexx882/role-stage-discovery-microservice
ports:
- containerPort: 5000
volumeMounts:
- mountPath: /srv/articonf
name: articonf
volumes:
- name: articonf
hostPath:
path: /srv/articonf
type: Directory
---
apiVersion: v1
kind: Service
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment