mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
1.6 KiB
1.6 KiB
Authentication
The NATS server provides various ways of authenticating clients:
- Token Authentication
- Username/Password credentials
- TLS Certificate
- NKEY with Challenge
- JWTs with Challenge
Authentication deals with allowing a NATS client to connect to the server.
With the exception of JWT authentication, authentication and authorization configuration is in the authorization
block of the configuration.
Authorization Block
The authorization
block provides authentication configuration as well as authorization:
Property | Description |
---|---|
token |
Specifies a token that can be used to authenticate to the server |
user |
Specifies a single user name for clients to the server |
password |
Specifies a single password for clients to the server |
users |
A list of user configuration maps |
timeout |
Maximum number of seconds to wait for client authentication |
User Configuration Map
A user
configuration map specifies credentials and permissions options for a single user:
Property | Description |
---|---|
user |
username for client authentication |
password |
password for the user entry |
nkey |
public nkey identifying an user |
permissions |
permissions map configuring subjects accessible to the user |
Permissions Configuration Map
The permissions
map specify subjects that can be subscribed to or published by the specified client.