summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 7 insertions, 16 deletions
diff --git a/README.md b/README.md
index 7993adc..5876649 100644
--- a/README.md
+++ b/README.md
@@ -53,25 +53,16 @@ Install dependencies (Debian).
sudo apt install python3 python3-pip python3-leveldb
pip3 install falcon
-Start CouchDB, make sure to give it a username and password:
+Start CouchDB and the collector. Make sure to give it a username and password:
cd docker
export COUCHDB_USER=couchdb
export COUCHDB_PASSWORD=insecure
- docker-compose up -d
-
-Start the demo HTTP server. Here we should pass on a few environment
-variables to let it know which CouchDB to use:
-
- cd demo
export COUCHDB_NAME=test
- export COUCHDB_HOSTNAME=localhost
- export COUCHDB_USER=couchdb
- export COUCHDB_PASSWORD=insecure
- python3 ../src/wsgi.py
+ docker-compose up
-Try adding some observations, basic auth user:pw from `wsgi_demo_users.yaml`,
-including `{"domain": "sunet.se"}` in at least one of them:
+Now the database and the API server should be running, now we can try
+adding some observations:
echo '[{
"ip": "192.0.2.10",
@@ -92,12 +83,12 @@ including `{"domain": "sunet.se"}` in at least one of them:
"cve_2021_21974": "CVE-2021-21974 patched",
"cve_2021_21985": "CVE-2021-21985 not applicable"
}
- }]' | curl -s -u user3:pw3 --data-binary @- http://localhost:8000/sc/v0/add
+ }]' | curl -s -u user3:pw3 --data-binary @- http://localhost:80/sc/v0/add
Try retreiving all observations for a user with read access to 'sunet.se':
- curl -s -u user1:pw1 http://localhost:8000/sc/v0/get | json_pp -json_opt utf8,pretty
+ curl -s -u user1:pw1 http://localhost:80/sc/v0/get | json_pp -json_opt utf8,pretty
We might also filter the data:
- curl -s -u user1:pw1 http://localhost:8000/sc/v0/get?port=111 | json_pp -json_opt utf8,pretty
+ curl -s -u user1:pw1 http://localhost:80/sc/v0/get?port=111 | json_pp -json_opt utf8,pretty