Browse the documentation

Authentication

API keys, JWT/OIDC, Management UI sign-in and TLS.

Embedded use

An embedded application calls NetlyDB in-process, so there is nothing to authenticate: access control is your application's. Authentication applies to the hosted modules, which open ports.

Which credential protects which NetlyDB surface localhost: the default binding of every hosted module Embedded callsnothing to authenticate REST API :9020X-NetlyDB-ApiKey header MCP server :9026X-NetlyDB-ApiKey header required by default; fails closed when no credential is configured API keys, preferably as SHA-256 hashes Community JWT bearer / OIDC Enterprise Management UI :9021own sign-in; admin account on first start Reverse proxyyours to configure and secure the only way in from another machine; also where TLS for the UI terminates Cluster peerspre-shared cluster secret cluster TLS on both channels off loopback (required) /health probes: anonymous by design
Which credential protects which surface. In-process calls need none; the hosted modules require one by default and bind to localhost; cluster peers share a secret.

REST API and MCP server

Both require authentication by default (Security.RequireApiAuthentication), and a host that enables one without any credentials configured fails at startup instead of running open. Anonymous access from the local machine is opt-in (AllowLoopbackAnonymous). The /health probes are anonymous by design.

MethodHowEdition
API keysClients send X-NetlyDB-ApiKey. Configure plaintext keys (ApiKeys) or, preferably, SHA-256 hashes (ApiKeyHashes). Several entries allow rotation.Community
JWT bearer / OIDCEnableJwtBearer with JwtAuthority, JwtAudience and optionally JwtIssuer.Enterprise
builder.Services.AddNetlyDB(options =>
{
    // API keys (Community). Prefer hashes: the plaintext key then never sits in configuration.
    // Several entries allow rotation. Clients send the key in the X-NetlyDB-ApiKey header.
    options.Security.ApiKeyHashes = [currentKeyHash, previousKeyHash];

    // JWT bearer / OIDC (Enterprise).
    options.Security.EnableJwtBearer = true;
    options.Security.JwtAuthority = "https://login.example.com/tenant";
    options.Security.JwtAudience = "netlydb-api";

    // HTTPS for the REST API and MCP server.
    options.Security.EnableTls = true;
    options.Security.CertificatePath = "/etc/netlydb/api.pfx";
});

Management UI

The Management UI uses its own sign-in with user accounts managed on its Settings page. On first start it creates an admin account and writes the generated password to the log once. See Management UI.

Cluster nodes

Nodes authenticate each other with a pre-shared cluster secret, and should use TLS on any network they do not fully trust. See Clustering & replication.

TLS

HTTPS for the REST API and MCP server is off by default; enable Security.EnableTls with a PFX certificate at Security.CertificatePath. All three hosted modules bind to localhost; exposing them further is done through a reverse proxy, which is also where you would terminate TLS for the Management UI.

An unhandled error has occurred. Reload X

Reconnecting

Restoring the connection to the server...

Still trying

Next attempt in seconds

Connection lost

We could not reach the server.