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

Secured role-stage with ssl

parent 50587721
...@@ -6,7 +6,7 @@ info: ...@@ -6,7 +6,7 @@ info:
# Import security definitions from global security definition # Import security definitions from global security definition
securityDefinitions: securityDefinitions:
$ref: '../../../../modules/security/security.yml#securityDefinitions' $ref: '../security/security.yml#securityDefinitions'
consumes: consumes:
- "application/json" - "application/json"
......
...@@ -26,7 +26,11 @@ def api_root(): ...@@ -26,7 +26,11 @@ def api_root():
return 'Endpoint of role-stage-discovery-microservice!' return 'Endpoint of role-stage-discovery-microservice!'
# SSL configuration # 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 # start app
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -39,6 +39,7 @@ requests==2.22.0 ...@@ -39,6 +39,7 @@ requests==2.22.0
rope==0.16.0 rope==0.16.0
scikit-learn==0.22.1 scikit-learn==0.22.1
scipy==1.4.1 scipy==1.4.1
semver==2.10.2
six==1.14.0 six==1.14.0
swagger-ui-bundle==0.0.6 swagger-ui-bundle==0.0.6
typed-ast==1.4.1 typed-ast==1.4.1
......
...@@ -32,6 +32,14 @@ spec: ...@@ -32,6 +32,14 @@ spec:
image: alexx882/role-stage-discovery-microservice image: alexx882/role-stage-discovery-microservice
ports: ports:
- containerPort: 5000 - containerPort: 5000
volumeMounts:
- mountPath: /srv/articonf
name: articonf
volumes:
- name: articonf
hostPath:
path: /srv/articonf
type: Directory
--- ---
apiVersion: v1 apiVersion: v1
kind: Service 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