Tokens
To use token authentication, you can specify an section with the token
property set:
Token authentication can be used in the authorization section for clients and clusters.
A client can easily connect by specifying the server URL:
Tokens can be bcrypted enabling an additional layer of security, as the clear-text version of the token would not be persisted on the server configuration file.
nats server passwd
Output
Here’s a simple configuration file:
token: "$2a$11$PWIFAL8RsWyGI3jVZtO9Nu8.6jOxzxfZo7c/W0eLk017hjgUKWrhy"