Skip to main content
NATS Account secrets store credentials for authenticating with NATS messaging systems, including NGS (NATS Global Service). Use them for connecting workloads to NATS clusters using NKey-based authentication.

Use Cases

  • NGS Cloud Access: Connect to Synadia’s global NATS service
  • NATS Cluster Authentication: Authenticate with self-hosted NATS clusters
  • Microservice Messaging: Enable pub/sub communication between services
  • Event-Driven Architecture: Connect event producers and consumers
  • IoT Message Brokers: Handle high-throughput device messaging

Configuration Options

FieldDescriptionRequired
accountIdNATS account public key (starts with A)Yes
privateKeyAccount private/seed key (starts with S)Yes
NATS NKeys contain embedded checksums and must be generated using official NATS tools. Random strings will not work.

Create a NATS Account Secret

1

Navigate to Secrets

In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2

Enter basic information

Enter a Name and optional Description.
3

Select secret type

Select NATS Account as the secret type.
4

Configure NATS credentials

Click Data in the left pane. Enter the Account ID (starts with A) and the Private Key (starts with S).
5

Create the secret

Click Create.

Using with NGS Cloud Account

For NGS integration, you can also create an NGS Cloud Account which provides managed connectivity. The NATS Account secret type is used for the underlying authentication.
1

Navigate to Cloud Accounts

In the Console, navigate to Cloud Accounts and click New, or use the Create dropdown in the top-right corner and select Cloud Account.
2

Enter basic information

Enter a Name and optional Description.
3

Select provider

Select NGS as the cloud provider.
4

Link the secret

Select your NATS Account secret from the dropdown.
5

Create the cloud account

Click Create.
When using NGS Cloud Accounts, the NATS Account secret provides the authentication credentials, while the Cloud Account resource manages the connection to NGS infrastructure.

Best Practices

Create distinct NATS accounts for development, staging, and production to isolate message traffic and credentials.
Regularly rotate NATS keys. Generate new keypairs, update the secret, and phase out old keys.
Use NATS account permissions to limit which subjects each account can publish to or subscribe from.
Track message rates and connection counts per account to detect anomalies or unauthorized access.

Next Steps