1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Replace mkpasswd with natscli (#223)

With mkpasswd now gone from nats-server, this change replaces instances of
mkpasswd with the new official natscli tool.
This commit is contained in:
Jaime Piña
2021-02-17 13:59:12 -08:00
committed by GitHub
parent d3dd6913fc
commit 3f01c728c1
8 changed files with 81 additions and 68 deletions

View File

@@ -6,12 +6,14 @@ For this example, start the server using:
> nats-server --user myname --pass password
```
You can encrypt passwords to pass to `nats-server` using a simple [tool](../../nats-tools/mkpasswd.md) provided by the server:
You can encrypt passwords to pass to `nats-server` using a simple [tool](../../nats-tools/natscli.md):
```bash
> go run mkpasswd.go -p
> password: password
> bcrypt hash: $2a$11$1oJy/wZYNTxr9jNwMNwS3eUGhBpHT3On8CL9o7ey89mpgo88VG6ba
> nats server passwd
? Enter password [? for help] **********************
? Reenter password [? for help] **********************
$2a$11$qbtrnb0mSG2eV55xoyPqHOZx/lLBlryHRhU3LK2oOPFRwGF/5rtGK
```
and use the hashed password in the server config. The client still uses the plain text version.