nats
How to get these credentialsConnection to a NATS server or cluster: server URLs, one authentication method (token, user/password, NKey seed or a .creds file's contents), optional TLS, and the HTTP monitoring URL.
CREATE SECRET nats (
TYPE nats,
servers '<servers>',
token '<NATS_TOKEN>', -- secret
user '<user>',
password '<NATS_PASSWORD>', -- secret
nkey_seed '<NATS_NKEY_SEED>', -- secret
creds '<NATS_CREDS>', -- secret
tls_ca '<tls_ca>',
tls_cert '<tls_cert>',
tls_key '<TLS_KEY>', -- secret
monitoring_url '<monitoring_url>',
jetstream_domain '<jetstream_domain>'
);
| Key | Type | Required | Description |
|---|---|---|---|
| servers | VARCHAR | — | Comma-separated server URLs, e.g. 'nats://n1:4222,nats://n2:4222' (tls:// for TLS). Default nats://127.0.0.1:4222. |
| token secret | VARCHAR | — | Authentication token. |
| user | VARCHAR | — | User name for user/password authentication. |
| password secret | VARCHAR | — | Password for user/password authentication. |
| nkey_seed secret | VARCHAR | — | NKey user seed (starts with SU), for NKey authentication. |
| creds secret | VARCHAR | — | Contents of a decentralized-auth .creds file (user JWT plus NKey seed). |
| tls_ca | VARCHAR | — | PEM CA certificate(s) used to verify the server. |
| tls_cert | VARCHAR | — | PEM client certificate for mutual TLS. |
| tls_key secret | VARCHAR | — | PEM private key of the client certificate. |
| monitoring_url | VARCHAR | — | Comma-separated HTTP monitoring base URLs (port 8222), one per server, e.g. 'http://n1:8222'. Without it, monitoring functions use the $SYS request API, which needs system-account credentials. |
| jetstream_domain | VARCHAR | — | JetStream domain to address (leaf-node and multi-domain deployments). |
The worker doesn't mark which keys are required.
Needed by account_infoaccount_statsaccountsconnectionsconsumersgatewayshealthjetstream_serversjsz_consumersjsz_streamskv_bucketskv_entries and 10 more functions