Well, after playing with authentication in the Arango database on Windows, this is what I found:
I could not get this command to work (which should include authentication)
--server.disable-authentication false
UPDATE: I realized that I can not get this command to work, because it is not a command at all: -o After a closer look at the documentation, this is a command line parameter. It should be used when starting arangosh. See here .
I assume that I need to somehow adapt it to work on the Windows command line, but I'm not sure what needs to be changed. As a job, I opened the file "arangod.conf" (I found C: \ Program Files (x86) \ ArangoDB 1.4.7 \ etc \ arangodb here) and changed the following line:
disable-authentication = yes
to
disable-authentication = no
This activated authentication when restarting Arango. Hooray!
Now for authentication via http ... very simple. This is just basic HTTP authentication. So in my case, I used NodeJS and a request library for authentication. Both examples below work fine.
Credentials added using .auth:
request({ url:'http://localhost:8529/_api/document/example/20214484', json: true }, function (err, data){ console.log(err); if (data.body.error) console.log("ERROR: " + data.body.errorMessage); console.log(data.body); }).auth("username", "password");
OR with credentials in the URL:
request({ url:'http://username: password@localhost :8529/_api/document/example/20214484', json: true }, function (err, data){ console.log(err); if (data.body.error) console.log("ERROR: " + data.body.errorMessage); console.log(data.body); });