uvicorn main:app --reload
The reciver will accept a jsonfile and save it to a configurable
location.
Three environment variables can be set with configuration
INVENT_HOST_DIR, INVENT_IMAGE_DIR and INVENT_DB_DIR
It has two endpoints: host/ and image/ and you can post files like this
curl -X POST -H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@test.json' \
--user test.sunet.se:a-very-secret-password \
http://127.0.0.1:8000/host/test.sunet.se
The reciver uses a TOFU security model, so the user will be trusted as
long as the password is the same one that was used the first time, if
not the incident will be reported.