Skip to content

Commit 0c1acb8

Browse files
committed
Documented arangodb auth commands
1 parent 0c69695 commit 0c1acb8

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

docs/Manual/Programs/Starter/Options.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ and pass it through the `--auth.jwt-secret-path` option.
9494
For example:
9595

9696
```bash
97-
echo "MakeThisSecretMuchStronger" > jwtSecret
97+
arangodb create jwt-secret --secret=jwtSecret
9898
arangodb --auth.jwt-secret=./jwtSecret
9999
```
100100

101101
All starters used in the cluster must have the same JWT secret.
102102

103+
To use a JWT secret to access the database, use `arangodb auth header`.
104+
See [Using authentication tokens](./Security.md#using-authentication-tokens) for details.
105+
103106
## SSL options
104107

105108
The arango starter by default creates a cluster that uses no unencrypted connections (no SSL).

docs/Manual/Programs/Starter/Security.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,34 @@ arangodb create jwt-secret \
9999
```
100100

101101
Make sure to protect and store the generated file (`my-secret.jwt`) in a safe place.
102+
103+
## Using authentication tokens
104+
105+
ArangoDB deployments that require authentication can be accessed through standard user+password
106+
pairs or using a JWT to get "super-user" access.
107+
108+
This super-user access is needed to communicate directly with the agency or with any server
109+
in the deployment.
110+
Note that uses super-user access for normal database access is NOT advised.
111+
112+
To create a JWT from the JWT secret file specified using the `--auth.jwt-secret` option,
113+
use the following command:
114+
115+
```bash
116+
arangodb auth token --auth.jwt-secret=<secret-file>
117+
```
118+
119+
To create a complete HTTP Authorization header that can be passed directly to tools like `curl`,
120+
use the following command:
121+
122+
```bash
123+
arangodb auth header --auth.jwt-secret=<secret-file>
124+
```
125+
126+
Using `curl` with this command looks like this:
127+
128+
```bash
129+
curl -v -H "$(arangodb auth header --auth.jwt-secret=<secret-file>)" http://<database-ip>:8529/_api/version
130+
```
131+
132+
Note the double quotes around `$(...)`.

0 commit comments

Comments
 (0)