
In an era with billions of connected devices and authentication requests scaling to millions per second, traditional centralized security models are reaching their limits. Synadia’s Bruno Baloi recently demonstrated how decentralized security models in NATS provide an elegant solution to these scalability challenges.
Check out the full webinar recording here or read on for the full recap, including a written version of the Q&A.
Traditional centralized security models work well for cloud-centric scenarios, e.g. e-commerce platforms or X where authentication requests are manageable. However, they begin to fail when faced with massive scale. For example, imagine millions of connected vehicles each requiring real-time authentication as they move around our physical world, crossing borders, losing and regaining connectivity, and more. The bottleneck isn’t just technical; it’s architectural.
Drawing from domain-driven design (DDD) principles, Bruno introduces the concept of security domains—abstractions that encapsulate security logic and provide autonomy in managing tokens and authentication traffic within specific boundaries.
What makes NATS particularly powerful is its built-in support for decentralized security. Unlike traditional approaches that require complex gateway architectures and load balancers, with NATS, there’s a clear separation of concerns between security and your topology.

NATS supports two distinct models for security, each suited to different use cases:
Ideal for high-volume, high-frequency scenarios (e.g. high connection churn environments where many devices connect, disconnect, and reconnect frequently). The operator model creates a hierarchy of security where:
Better suited for less dynamic environments or deployments with lower volumes of authentication traffic:
One of NATS’ most powerful features is its account-based access control model. Accounts define natural security boundaries and enable precise control over what data can be shared and how.

NATS supports two primary data-sharing patterns across accounts:
Streams: Accounts can export subjects to allow clients in other accounts to subscribe to data. This enables secure, read-only access to published data from outside accounts.
Services: Accounts can export subjects to expose request/reply services, allowing clients in other accounts to send requests and receive responses—ideal for cross-account APIs or service endpoints.
Recognizing that many organizations can’t immediately abandon existing security infrastructure, NATS provides an elegant solution: auth callouts. This feature allows NATS to delegate authentication and authorization to existing security mechanisms including:
This hybrid approach enables organizations to gradually transition to decentralized security while maintaining compatibility with legacy systems. For a deeper look at auth callout, check out the video below.
A: A “Security Domain” is an architectural construct used to describe the segregation of security responsibilities more clearly. We borrowed the term from Domain-Driven Design (DDD) to represent an encapsulation of security-related activities within a given context. From a design perspective, an Operator can loosely be associated with a Security Domain, although this is not a strict requirement.
A: The resolver determines where the server loads JWTs for accounts and users. There are three types: 1) Memory resolver (for dev), 2) File resolver (loads from local files), and 3) URL resolver (fetches from an external HTTP endpoint). So yes, “URL resolver” is the correct term when referring to an external HTTP-based source of JWTs.
A: No, the external URL resolver doesn’t require a separate NATS server. It refers to a service (e.g., HTTP API) the NATS server can query to fetch JWTs dynamically. A more recent option is the “Full Resolver,” where all servers in a cluster have built-in resolvers that communicate with each other to share information and perform lookups. This is known as the “mesh” resolver model. The URL resolver requires external logic and ongoing maintenance, whereas the Full Resolver is built into the core server and requires no additional components.
A: Yes. With file-based authentication, the relevant files must be updated on all three nodes, and each node must be restarted. If you use the Operator-based approach, updating an account on one node will automatically synchronize the changes with the other two.
A: Typically no, as these are different authentication models. However, you can have a config file that uses nkeys instead of usernames and passwords. In that case, you can use the Operator model to generate the keys, while still relying on configuration files for server setup.
A: Yes, a NATS cluster can support multiple Operators. Whether you should do so depends on your system design and business domain requirements.
A: Verifying a JWT requires only the public portion of the signing key, which is safe to share with anyone who needs it. Account administrators can also create additional signing keys to delegate JWT signing or to rotate keys, allowing for bulk invalidation of previously signed credentials.
A: Authentication works the same for leaf nodes and regular nodes. Each NATS server (including leaf nodes) can have its own auth model.
Clients connecting to a leaf node authenticate based on that node’s configuration, but cross-account requests (e.g., service imports) must be authorized at the hub/root as well. With the operator model, you can distribute account credentials using nsc, and clients can be configured to fetch them dynamically at startup.
A: It depends on the implementation of the mobile client. One option is for the mobile agent to retrieve credential files from a remote repository via a common protocol (e.g., SCP, FTP), or even over NATS. Alternatively, the mobile client could listen on a system-specific subject to receive new credentials pushed to it.
A: Yes, though it would be a custom implementation. The device-side agent would need to listen for incoming credentials over NATS or poll an external source to retrieve them at startup.
A: There is no standalone “nsc SDK” currently. However, the Synadia Control Plane (SCP) integrates nsc functionality into a UI, allowing you to create accounts, users, revoke tokens, etc., through the SCP interface.
nats auth, e.g., nats auth --help. Is the plan for the NATS CLI to eventually replace nsc?A: This has not been confirmed yet, but it’s likely in the longer term.
A: Currently, NATS server command-line parameters allow you to define server configurations (e.g., routes, clustering). However, there’s no CLI to reconfigure a server post-launch. We’re considering building tooling for this in the future.
A: Not at the moment. We’ve focused on providing a visual security management experience through the Control Plane, which uses nsc behind the scenes.
A: There are no current plans to open source the SCP.
A: You can create a dedicated Account for the third party and configure authentication via an Auth Callout. Within that Account, you can specify which users are allowed access to which subjects.
A: Not at the moment.
A: Yes, that is the plan.
nsc + CLI over the Auth Callout method?A: It’s not an all-or-nothing choice—NATS supports mixed models. You can use config-based authentication for known users and fall back to Auth Callout for others. This segregation happens at the Account level.
A: Yes—this is called “mixed mode.” But, you can’t mix Auth Callout and JWT auth within the same Account. You can however run a server with multiple Accounts, each using different auth mechanisms (e.g., one static, one callout, one resolver).
A: Yes. On rotation, clients are disconnected and must reconnect, at which point a new Auth Callout is invoked to provide updated credentials.
A: Yes. Leaf nodes can have their own Accounts, each configured with its own Auth Callout mechanism. For example, one leaf cluster might use a database-based Auth Callout, while another uses OAuth.
A: We’re working on quickstart templates to support this integration.
A: This is not part of NATS’s core design, as publishers and subscribers are decoupled. However, workarounds exist. For instance, publishers can include a source_id in the message payload, which the consumer can parse and use to write to the appropriate audit log.
Still have questions about authn or authz in NATS? Get in touch with the NATS experts at Synadia.
News and content from across the community