Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: added a clarification about a token usage #563

Merged
merged 2 commits into from
Aug 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ http: localhost:8222 # HTTP monitoring port
# Authorization for client connections
authorization {
user: derek
# ./util/mkpassword -p T0pS3cr3t
# ./util/mkpasswd -p T0pS3cr3t
password: $2a$11$W2zko751KUvVy59mUTWmpOdWjpEm5qhcCZRd05GjI/sSOT.xtiHyG
timeout: 1
}
Expand All @@ -213,7 +213,7 @@ cluster {
# Authorization for route connections
authorization {
user: route_user
# ./util/mkpassword -p T0pS3cr3tT00!
# ./util/mkpasswd -p T0pS3cr3tT00!
password: $2a$11$xH8dkGrty1cBNtZjhPeWJewu/YPbSU.rXJWmS6SFilOBXzmZoMk9m
timeout: 0.5
}
Expand Down Expand Up @@ -462,12 +462,20 @@ Or, if you chose to use a token:

```
authorization {
# You can generate the token using /util/mkpassword.go
# You can generate the token using /util/mkpasswd.go
token: $2a$11$pBwUBpza8vdJ7tWZcP5GRO13qRgh4dwNn8g67k5i/41yIKBp.sHke
timeout: 1
}
```

>If you chose to use a token for client's authentication and generate the token by `/util/mkpasswd.go` then you must use the generated bcrypt hash as the token in server config, as written above, and the generated pass as the token in client configurations.

```
$ go run util/mkpasswd.go
pass: D#6)e0ht^@61kU5!^!owrX // NATS client token
bcrypt hash: $2a$11$bXz1Mi5xM.rRUnYRT0Vb2el6sSzVrqA0DJKdt.5Itj1C1K4HT9FDG // server authorization token
```

**Multi-user authentication**

You can enable multi-user authentication using a NATS server configuration file that defines user credentials (`user` and `password`), and optionally `permissions`, for two or more users. Multi-user authentication leverages [variables](#variables).
Expand Down