diff --git a/.env.example b/.env.example index 005c84a70aa0b8fd982ce04978ad997b519b62b3..e0e6e2c2f9ac3de2d552343824d1b3c57765ad2f 100644 --- a/.env.example +++ b/.env.example @@ -41,7 +41,6 @@ MAIL_SMARTHOST="" IP_CONTACT_SEND_MAIL="true" # IP_CONTACT_OVERRIDE_MAIL_RECEIVER="somebody@example.com" -IP_CONTACT_EMAIL_SENDER="noreply@netvs.scc.kit.edu" +IP_CONTACT_EMAIL_SENDER="noreply@netvs-devel.scc.kit.edu" WAPI_NETVS_SUPERUSER="" - diff --git a/HOWTO.md b/HOWTO.md deleted file mode 100644 index 70b2ec87faaca356bb55dd5994505e782584d3ee..0000000000000000000000000000000000000000 --- a/HOWTO.md +++ /dev/null @@ -1 +0,0 @@ -gunicorn -k uvicorn.workers.UvicornWorker --reload --bind localhost:8000 main:app diff --git a/README.md b/README.md index bcb905393f3e81fe756cef99ee0a827ea1444cdb..436c11742bb33e6ee2b1d83f4e9d3f16b67b3d9e 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,19 @@ ## Installation -The NET-SUITE middleware requires ```python3```. +The NETVS middleware requires ```python3```. In case you don't want a venv setup, omit steps 1&2. 1. Create venv: ```shell - virtualenv venv/ + python3 -m venv venv/ ``` 2. Change into venv: ```shell - source bin/activate + source venv/bin/activate ``` 3. Install dependencies: @@ -23,9 +23,9 @@ In case you don't want a venv setup, omit steps 1&2. pip install -r requirements.txt ``` -## Generate APLIST/MACFINDER certificate +## Generate AP-List/MACfinder certificate Login as root on `macfinder-1.tmn.scc.kit.edu` and execute `/root/make-devel-cert.sh <certname>`. -The script will ask for some input. Typically the default and yes are correct. +The script will ask for some input. Typically, the default values and yes are correct. ## Productive setup with uwsgi @@ -40,12 +40,24 @@ uwsgi -s /tmp/net-suite.sock --virtualenv <path to env> --manage-script-name --m ```shell python3 main.py ``` +or +```shell +gunicorn -k uvicorn.workers.UvicornWorker --reload --bind localhost:8000 main:app +``` ## systemd Also take at look at the [uwsgi documentation](http://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd). ## Configuration +### Middleware +`WAPI_NETVS_SUPERUSER` is the superuser for the middleware. +When queries are required which are not possible as the requesting user (due to permission restrictions), the superuser is used. +Therefore, the user must have the necessary permissions to execute those queries. +Typically, a user with `cntl.default_reader` and `wapi.devel_tester` is used. + +As the queries are executed directly against the database, no token for the user is required; it will only be used to populate the context of the query. + ### NET-DB #### Postgres Net-Suite uses different databases depending on the host operation mode defined in ```/usr/local/etc/host_oper_mode_data.cfg```: