hm-seclab / YAFRA

YAFRA is a semi-automated framework for analyzing and representing reports about IT Security incidents.
https://seclab.cs.hm.edu/oss-projects/yafra/
Apache License 2.0
27 stars 5 forks source link

Use wsgi server for production #53

Open fritterhoff opened 3 years ago

fritterhoff commented 3 years ago

At the moment the default flask server is used for production. It is best practice/recommended to use an wsgi server like Gunicorn for production. As far as I know, the scheduler could cause some issues due to the fork modell of the server (depending on the individual solution).

DerAlexmeister commented 3 years ago

Does this solve the Problem mentioned in #24. Only the Extractor and the Sysmon should be exposed. @fritterhoff

fritterhoff commented 3 years ago

Does this solve the Problem mentioned in #24. @fritterhoff

Maybe it makes integrating the reverse proxy easier.

fritterhoff commented 3 years ago

In detail the problem comes from:

https://github.com/hm-seclab/YAFRA/blob/3e1f94748b06332db2762820ba587a99e319a03b/iocextractor/templates/index.html#L4

Here you reference the static resources directly without any prefix. We should at least change that to

<link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css') }}">
fritterhoff commented 3 years ago

According to https://dlukes.github.io/flask-wsgi-url-prefix.html that should solve the problem in combination with the env var SCRIPT_NAME.