5. Security

This page describes the security controls in SynergyDB as of main at 8a689c5c (2026-11-30). This is SynergyDB V1.0. Every statement below comes from a file in the repository and names that file. Where the repository documents a control but does not show it tested, or where files disagree, the page says so in a line starting Not verified:.

Audience: security reviewers evaluating SynergyDB, and the operators who will run it.

Contents

  1. Authentication per wire
  2. Authorization
  3. Encryption in transit
  4. Encryption at rest
  5. Audit logging
  6. Cluster internal security
  7. Network hardening
  8. Secrets hygiene
  9. Compliance status and HIPAA
  10. License
  11. Known security gaps (summary)

1. Authentication per wire

Shared rules

  • Users are SynergyDB roles made with CREATE USER ... PASSWORD. A superuser is created on first start. The SQL, document, graph and analytical wires authenticate against the catalog and refuse unknown or empty credentials. (source: README.md, "Security defaults")
  • If no superuser password is supplied, a first start in a terminal prompts for one. With no terminal (a service or container) one is generated and written to a file in the data directory. The container entrypoint no longer prints a generated password to the container log, except when the data volume is not writable. (source: src/main.rs help text; docs/status/2026-11-29-preauth-body-limits.md)
  • Passwords are stored as Argon2id. (source: docs/status/2026-11-30-pg-scram.md)
  • Failed-login delay on every wire. After 5 consecutive failed logins for one user name, each further failure is delayed, starting at 200 ms and doubling to 5 s. A correct password is never delayed and resets the count. Nothing is locked out. The key is the user name, not the client address. (source: docs/status/2026-11-29-auth-hardening.md)
  • Login needs a wire role on non-SQL wires. Redis, MongoDB, Elasticsearch, CouchDB, Kafka, InfluxDB, Prometheus, Memcached, Gremlin and Schema Registry accept a SynergyDB login only from a superuser or from a role that is a member of synergy_wire_<wire> or synergy_wire_all. A wire's own password that is not a SynergyDB role (for example SYNERGYDB_REDIS_REQUIREPASS) is not affected. An emergency escape hatch, SYNERGYDB_WIRE_ACCESS=open, turns this check off. (source: docs/status/2026-11-29-nonsql-wire-privileges.md)
  • Large bodies only after login. Elasticsearch, CouchDB, InfluxDB, ClickHouse HTTP and Snowflake read a request body over 1 MB only after the request's URL and headers authenticate. DynamoDB reads a body over 1 MB only when it is signed with a known access key, and caps requests at 16 MB. Gremlin HTTP (64 MB), Prometheus (100 MB), Schema Registry (16 MB) and S3 still read the body before checking credentials. (source: docs/status/2026-11-29-preauth-body-limits.md)
  • With no config file, the default bind address is 127.0.0.1. The repository's synergydb.toml also binds to 127.0.0.1. The container config docker/synergydb.prod.toml binds to 0.0.0.0. (source: src/config.rs; synergydb.toml; docker/synergydb.prod.toml)

Per-wire table

"Default" means a server started with no wire-specific auth setting and without SYNERGYDB_DEV_INSECURE_AUTH.

Wire How clients authenticate Default when nothing is configured
PostgreSQL SCRAM-SHA-256. The first login after a password is set uses the password exchange once, then stores a SCRAM verifier; later logins use SCRAM. SYNERGYDB_PG_SCRAM=0 reverts to the password exchange for every login. Channel binding (SCRAM-SHA-256-PLUS) is not offered. Credentials required
MySQL SynergyDB user and password. A mysql_native_password (SHA1) verifier is stored for every role for client compatibility. Credentials required
SQL Server (TDS) SynergyDB user and password. With TLS configured, the login packet is encrypted even when the client sets Encrypt=no. Credentials required
Oracle (TNS) SynergyDB user and password Credentials required
MongoDB SCRAM-SHA-256 against the authentication database (user@db). SCRAM-SHA-1 is not supported. A SynergyDB role can log in with its SynergyDB password. Credentials required, plus synergy_wire_mongodb
Redis AUTH as a SynergyDB role, as a Redis ACL user with its own password, or with SYNERGYDB_REDIS_REQUIREPASS. With requirepass set, SynergyDB roles cannot log in on Redis. Credentials required, plus synergy_wire_redis: every command except AUTH, HELLO, QUIT and RESET answers NOAUTH until login, with or without requirepass (the README says otherwise; see below)
Memcached Text protocol set token or binary SASL PLAIN, as a SynergyDB user; or a memcached-style user:password file (SYNERGYDB_MEMCACHED_AUTH_FILE) Loopback clients need no credentials. Clients from any other address must authenticate.
Cassandra (CQL) Password authentication against shared SynergyDB roles Credentials required
Neo4j (Bolt) SynergyDB user and password Credentials required
Gremlin SynergyDB user and password Credentials required, plus synergy_wire_gremlin
ClickHouse (native and HTTP) SynergyDB user; on HTTP, credentials in headers or ClickHouse user parameters Credentials required
InfluxDB Authorization: Basic, Authorization: Token user:pass, or the u and p query parameters, checked against the catalog (source: src/protocol/influxdb/mod.rs, extract_credentials) Credentials required, plus synergy_wire_influxdb. /ping, /health and /ready answer without a login from any address (source: src/protocol/influxdb/mod.rs, route_request).
Elasticsearch HTTP Basic only. ApiKey, Bearer and any other scheme get 401; there are no cookies, tokens or loopback exemptions (source: src/protocol/elasticsearch/mod.rs, authenticate) Credentials required on every request, plus synergy_wire_elasticsearch
CouchDB HTTP Basic, or the AuthSession cookie that POST /_session issues after a password check; no tokens (source: src/protocol/couchdb/mod.rs, authenticate, session) Credentials required, plus synergy_wire_couchdb. Only GET/HEAD / and /_up answer without a login, from any address; nothing checks for loopback (source: src/protocol/couchdb/mod.rs, handle_inner)
Kafka SASL/PLAIN against the catalog SASL required unless kafka_require_sasl = false
Schema Registry HTTP Basic credentials of a SynergyDB user Loopback clients need no credentials. Clients from any other address must authenticate.
S3 AWS SigV4 signatures and presigned URLs, with one operator-provisioned access key Signed requests required
DynamoDB AWS SigV4, with one operator-provisioned access key Signed requests required
Snowflake Login request body (LOGIN_NAME, PASSWORD) checked against the catalog, then the issued session token (Snowflake Token= or Bearer). An Authorization: Basic header never succeeds: it is checked only against SNOWFLAKE_AUTH_HASHES, which nothing fills (source: src/protocol/snowflake/mod.rs, login_request, check_auth, get_snowflake_auth_hashes) Credentials required. Issued tokens do not expire
Prometheus SynergyDB user Credentials required, plus synergy_wire_prometheus
Arrow Flight SQL Basic authentication Credentials required
gRPC (synergydb.v1.Sql) authorization: Basic base64(user:pass) only. Bearer and ApiKey get UNAUTHENTICATED "token authentication is not configured", although the proto comment and the status entry say Bearer works (source: src/protocol/grpc/interceptors.rs, GrpcAuthGate::authorize). Reflection and health are outside the auth gate. Credentials required
SQLite (libSQL Hrana over HTTP) libSQL authToken holding a SynergyDB user:password, or HTTP Basic Wire is off unless sqlite_port is set. When on: loopback open, remote must authenticate. SYNERGYDB_SQLITE_AUTH=users requires auth everywhere; open disables it.
HTTP admin / REST Bearer token SYNERGYDB_API_KEY (empty value ignored, constant-time compare) /metrics and /api/v1/status answer loopback only unless SYNERGYDB_METRICS_TOKEN is set. /health, /livez, /readyz, /cluster/role and /cluster/writable are public.

Sources for the table: README.md ("Security defaults", "Known gaps"); docs/status/2026-11-30-pg-scram.md; docs/status/2026-11-29-preauth-body-limits.md; docs/status/2026-11-30-tls-remaining-wires.md; docs/status/2026-11-30-mongo-users-roles.md; docs/status/2026-11-30-redis-acl-users.md; docs/status/2026-11-29-open-wires-fail-closed.md; docs/status/2026-11-30-cassandra-roles-grant.md; docs/status/2026-11-29-nonsql-wire-privileges.md; docs/status/2026-11-29-auth-hardening.md; docs/status/2026-11-24-flight-sql-snowflake-dbt.md; docs/status/2026-11-30-grpc-sql-service.md; docs/status/2026-11-30-sqlite-libsql-hrana.md; docs/status/2026-11-30-hipaa-audit-rls-tls.md; src/config.rs.

Per-wire authentication detail, from the code, is in Authentication and each page under protocols (for example Elasticsearch, CouchDB, Snowflake, gRPC, Redis).

Not verified: this page does not restate the credential format for MySQL, SQL Server, Oracle, Neo4j, Gremlin and Prometheus logins, or how the single S3/DynamoDB access key is provisioned; see the protocol pages.

Warning: unauthenticated access paths

Memcached and Schema Registry accept unauthenticated clients from loopback by default. A client on the same host (127.0.0.1 or ::1) needs no credentials. Clients from other addresses must log in. Set SYNERGYDB_MEMCACHED_AUTH=users and SYNERGYDB_SCHEMA_REGISTRY_AUTH=users to require auth from everyone. Setting either to open makes the port fully open and is only for a trusted private network. (source: docs/status/2026-11-29-open-wires-fail-closed.md; README.md, "Known gaps")

Health and welcome routes answer without a login. The HIPAA entry says some CouchDB, Elasticsearch, InfluxDB and HTTP API requests were served from loopback without a login and audited as (unauthenticated) (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md). The code is narrower and has no loopback test on these wires: Elasticsearch has no unauthenticated route; CouchDB opens only GET/HEAD / and /_up, from any address; InfluxDB opens /ping, /health and /ready; the HTTP API opens /health, /livez, /readyz and the /cluster/* role routes (source: src/protocol/elasticsearch/mod.rs, authenticate; src/protocol/couchdb/mod.rs, handle_inner; src/protocol/influxdb/mod.rs, route_request; src/protocol/http/routes.rs, build_router).

Redis fails closed by default; the README is out of date. The README says Redis accepts unauthenticated clients unless SYNERGYDB_REDIS_REQUIREPASS is set (source: README.md, "Security defaults"). In the code, every new connection starts unauthenticated unless SYNERGYDB_DEV_INSECURE_AUTH is set, and every command except AUTH, HELLO, QUIT and RESET answers NOAUTH Authentication required., whether or not a password is configured (source: src/protocol/redis/commands.rs, CommandExecutor::with_shared, CommandExecutor::requires_auth). Tested by test_no_password_configured_fails_closed in src/protocol/redis/commands.rs. This matches the status entries docs/status/2026-11-24-config-env-tls-protected-mode.md and docs/status/2026-11-30-redis-acl-users.md. Detail: Redis.

Not verified: that test sets the connection state directly; no test starts a full server without the dev flag and connects to it.

Test switches: never on a reachable server

  • SYNERGYDB_DEV_INSECURE_AUTH=1 turns authentication off. It exists for test harnesses. Never set it on a reachable server. (source: README.md, "Security defaults")
  • Since 2026-11-29 the server refuses to start with SYNERGYDB_DEV_INSECURE_AUTH or SYNERGYDB_TEST_AUTH_CHEAP set while bound to a non-loopback address. Two overrides defeat that refusal: SYNERGYDB_ALLOW_INSECURE_BIND=1, or protected mode turned off (SYNERGYDB_SERVER_PROTECTED_MODE=no or [server] protected_mode = false). Do not set either outside an isolated test network. (source: docs/status/2026-11-29-auth-hardening.md; src/main.rs)
  • Under the dev switch, protected mode makes Redis and Memcached refuse non-loopback clients with a DENIED ... protected mode error. (source: docs/status/2026-11-24-config-env-tls-protected-mode.md)
  • The server also refuses known placeholder superuser passwords (the CHANGE_ME family) when bound to a non-loopback address. (source: docs/status/2026-11-29-auth-hardening.md; src/main.rs)
  • --dev must never be used on a reachable server. It sets a fixed, publicly documented superuser password and binds to 127.0.0.1 (source: README.md, "Run it"). The built-in help also advertises --dev --bind-all ("Development mode + allow remote connections"), which binds to all interfaces. The placeholder-password refusal in src/main.rs does not include the password --dev sets, so that combination starts a reachable server with a well-known superuser password. (source: src/main.rs)

2. Authorization

Roles, GRANT and ownership (SQL wires)

  • Table privileges (GRANT/REVOKE) are enforced on the SQL wires. (source: docker/synergydb.prod.toml, comment in the auth section)
  • GRANT role_a, role_b TO member and the matching REVOKE handle lists of roles. Before 2026-11-30 a role list was silently ignored. (source: docs/status/2026-11-30-make-interval-and-multi-role-grant.md)
  • CREATE/ALTER ROLE accepts REPLICATION/NOREPLICATION, ENCRYPTED PASSWORD and CONNECTION LIMIT -1. REPLICATION is recorded but grants nothing, since there is no replication protocol. (source: docs/status/2026-11-30-role-options-column-grants.md)

Column-level grants. GRANT SELECT | INSERT | UPDATE | REFERENCES (col, ...) and REVOKE are enforced. A role without the table-level privilege may run a statement only if every column it reads or writes is granted. SELECT *, RETURNING * and bare scans need every column. A hidden column named anywhere in the query is refused with SQLSTATE 42501. A table-level REVOKE also revokes the privilege on every column. Known gaps: column matching is conservative, so some joins are refused where PostgreSQL would allow them; information_schema.column_privileges and has_column_privilege() do not report column grants. (source: docs/status/2026-11-30-role-options-column-grants.md)

Database privileges and ownership. CREATE DATABASE needs a superuser or CREATEDB. DROP DATABASE and ALTER DATABASE ... OWNER TO need a superuser or the owner; before 2026-11-30 any login could drop any database. ALTER TABLE | VIEW | MATERIALIZED VIEW ... OWNER TO now transfers ownership. Still open: a non-superuser can create tables in a database it does not own (it cannot read or change the owner's tables), and functions and sequences carry no privileges. (source: docs/status/2026-11-30-db-privileges-owner-to.md)

SET ROLE. SET [SESSION] ROLE, SET LOCAL ROLE, SET ROLE NONE, RESET ROLE and DISCARD ALL change the acting role. Privileges, row-level security, column masking and current_user follow the set role; session_user stays the login role. A non-superuser may switch only to roles it is a member of. SET LOCAL ROLE reverts at commit or rollback. Before 2026-11-30, SET ROLE was parsed and ignored. Known gap: a session-level SET ROLE inside a transaction that rolls back is not undone. (source: docs/status/2026-11-30-set-role-identity.md)

Tables without an owner record. Internal tables behind the non-SQL wires (_couchdb_*, _es_*, _s3_*, _mongo* and so on) are denied to ordinary roles over the SQL wires until a superuser grants access. Ordinary tables with no owner record, such as tables created before authorization existed or a MongoDB collection exposed as a table, stay open to every SQL role until a superuser restricts them. Escape hatch: SYNERGYDB_UNOWNED_RELATIONS=open. (source: docs/status/2026-11-29-nonsql-wire-privileges.md)

Non-SQL wires

Wire Permission model Default for a login with no wire-specific record
Redis Redis 8 ACL users: per-user command, category, key and channel rules, checked on every command including MULTI and Lua. Differential suite 341/341 against Redis 8. Full access on the wire (opt-in model)
MongoDB Built-in roles (read, readWrite, dbAdmin, userAdmin, dbOwner, the AnyDatabase roles, root, backup, restore, cluster roles) per database. Granting a role needs userAdmin on that role's database. 343/343 against MongoDB 8. No user-defined roles, no collection-level privileges. Full access on the wire (opt-in model)
Cassandra Cassandra 4.1 roles and permissions on keyspaces, tables and roles, with inheritance. 457/457 against Cassandra 4.1. No function, aggregate or MBean resources. SQL table privileges apply (opt-in model)
Other non-SQL wires Wire role only (synergy_wire_<wire>) All-or-nothing per wire

Sources: docs/status/2026-11-30-redis-acl-users.md; docs/status/2026-11-30-mongo-users-roles.md; docs/status/2026-11-30-cassandra-roles-grant.md; docs/status/2026-11-29-nonsql-wire-privileges.md.

Access on the non-SQL wires is all-or-nothing per wire unless the wire has its own model above. There is no per-index, per-collection or per-key permission model on the others. (source: docs/status/2026-11-29-nonsql-wire-privileges.md)

Row-level security (RLS)

What the README says. RLS beyond simple column = value policies is listed under "Not validated end to end", and complex policies "fail closed and hide all rows". (source: README.md, "Engine features")

What the 2026-11-30 entries change. Three status entries dated after the README text extend RLS:

  • Policy shapes. CREATE POLICY ... USING (EXISTS (SELECT ... FROM t [alias] WHERE ... [LIMIT n])) is accepted and enforced, including current_setting(...) and current_user inside the subquery. Joins, aggregates and other subquery shapes inside a policy are rejected at CREATE POLICY time. (source: docs/status/2026-11-30-rls-exists-policies.md)
  • Queries that used to skip policies. Subqueries in expressions (EXISTS, IN, scalar, ARRAY, = ANY), UNION/INTERSECT/EXCEPT, top-level CTEs and derived tables, SELECT ... FOR UPDATE, recursive CTEs and INSERT ... SELECT sources skipped policies before. The entry gives the example of a user reading another clinic's rows through EXISTS (...). All of these now apply SELECT policies. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • Stale policy cache. A policy change was seen only by the connection that made it. A process-wide epoch now invalidates every connection's cache, with a 1 s expiry for changes arriving by replication. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • Per-database policies. Policies, RLS flags and column masks are kept per database. Before, a policy on a table name applied to same-named tables in every database. The default databases share one namespace. Policies created before this change still apply everywhere unless SYNERGYDB_RLS_LEGACY_DATABASE names their database. (source: docs/status/2026-11-30-rls-policies-per-database.md)
  • Owner exemption. A table's owner is exempt from its policies unless the table is FORCEd, as in PostgreSQL. A WITH CHECK violation reports SQLSTATE 42501. (source: docs/status/2026-11-30-rls-policies-per-database.md)
  • Evidence. A side-by-side test against PostgreSQL 16.15 matches on 62/62 scenario checks (30/47 on the first version of the scenario before the fixes). (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)

What is still not covered:

  • UPDATE ... FROM other_table and DELETE ... USING other_table were not checked for RLS on the joined table. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • The non-SQL wires have per-user privileges but no row-level policies. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • pg_policy / pg_policies return no rows even though policies are enforced, and pg_tables.rowsecurity always reads true. (source: docs/status/2026-11-30-set-role-identity.md; docs/status/2026-11-30-rls-policies-per-database.md)
  • Superusers bypass policies. (source: docs/status/2026-11-30-set-role-identity.md)

Not verified: The 62 scenarios are listed in docs/proof/2026-11-30-hipaa-*.md, which is not in the reviewed snapshot, so this page cannot say which policy and query shapes they cover. The README's "fail closed" statement has not been updated; the status entries say unsupported policy shapes are rejected when the policy is created, but do not say whether any remaining case fails closed at query time.

Column masking. ALTER TABLE t MASK COLUMN c replaces a column's value for non-superusers. The roadmap entry records limits: masking applies only to explicitly named columns (not SELECT *) and only on simple single-table plan shapes. (source: ROADMAP.md, item 4.42)

Not verified: The masking limits are recorded in an entry dated 2026-05-09. No later file confirms whether they still apply.


3. Encryption in transit

How TLS is configured

  • TLS is set in [tls] (enabled, cert_path, key_path, ca_cert_path, require_client_cert, auto_generate_dev_cert, require_tls) or the matching SYNERGYDB_TLS_* variables. (source: src/config.rs)
  • enabled = true without a certificate stops the server at startup instead of serving plaintext, unless auto_generate_dev_cert is on (source: src/config.rs; test tls_enabled_without_certificates_is_rejected).
  • Debug builds turn TLS on by default. With no [tls] block, enabled and auto_generate_dev_cert default to cfg!(debug_assertions): off in release builds, on in debug builds, which write a self-signed certificate to data_dir/certs/ (source: src/config.rs, TlsConfigFile; src/protocol/tls.rs, resolve_tls_config). A debug build therefore refuses plaintext on the 13 implicit-TLS wires below.
  • Three modes, not one. Once TLS is on, 13 wires use implicit TLS and accept only TLS, from any address including loopback: Redis, MongoDB, Bolt, Cassandra, Elasticsearch, CouchDB, DynamoDB, ClickHouse native, ClickHouse HTTP, Snowflake, InfluxDB, Prometheus and Memcached. The HTTP API, Kafka, S3, Schema Registry, SQLite Hrana, Oracle and Gremlin serve TLS and plaintext on one port, decided by the first byte; gRPC and Arrow Flight do the same through tonic. PostgreSQL, MySQL and SQL Server upgrade inside the protocol. On these last three groups plaintext is accepted by default (source: src/protocol/tls.rs, TlsListener::accept, TlsListener::accept_auto; the with_tls handling in each src/protocol/<wire>/mod.rs). Detail: TLS.
  • require_tls (SYNERGYDB_TLS_REQUIRE_TLS), default off, refuses non-loopback plaintext on the wires that can serve both. Loopback clients may still use plaintext. It has no effect on the implicit-TLS wires, which never take plaintext once TLS is on (source: src/protocol/tls.rs, plaintext_allowed; src/config.rs).

TLS support by wire

Wire TLS How it is negotiated Source
PostgreSQL Yes SSL request; require_tls answers a non-SSL startup with FATAL 28000. Tested with sslmode=require and verify-ca. 2026-11-30-tls-remaining-wires.md, 2026-11-30-pg-scram.md
MySQL / MariaDB clients Yes CLIENT_SSL; require_tls refuses a handshake without it 2026-11-30-tls-remaining-wires.md
SQL Server (TDS) Yes PRELOGIN encryption; TDS 8.0 strict (Encrypt=strict). Encrypt=no still gets login-only encryption. 2026-11-30-tls-remaining-wires.md
Oracle (TNS) Yes TCPS, same port 2026-11-30-tls-remaining-wires.md
Gremlin Yes wss://, https://, same port 2026-11-30-tls-remaining-wires.md
gRPC Yes TLS with ALPN h2, same port 2026-11-30-tls-remaining-wires.md
Arrow Flight SQL Yes grpc+tls://, same port 2026-11-30-tls-remaining-wires.md
HTTP admin / REST Yes Same port, first-byte detection 2026-11-29-tls-coverage.md
Kafka Yes Same port, first-byte detection (TLS 1.3 observed) 2026-11-29-tls-coverage.md
S3 Yes Same port, first-byte detection 2026-11-29-tls-coverage.md
Schema Registry Yes Same port, first-byte detection 2026-11-29-tls-coverage.md
SQLite (libSQL Hrana) Yes Same port, first-byte detection src/protocol/sqlite/hrana.rs
Elasticsearch Yes Implicit TLS only, once TLS is on. Durability test ran over TLS src/protocol/elasticsearch/mod.rs; 2026-11-27-es-write-journal.md
Redis, MongoDB, Memcached, Cassandra, Neo4j Bolt, ClickHouse native and HTTP, InfluxDB, CouchDB, DynamoDB, Snowflake, Prometheus Yes Implicit TLS only, once TLS is on; no plaintext on the port, loopback included each src/protocol/<wire>/mod.rs (tls_listener); TLS

The HIPAA entry reports a require_tls test passing on "22/22 wires" from a non-loopback address with the certificate verified. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)

Not verified: The entry does not list the 22 wires, and its report is not in the snapshot. The README says SQLite clients "must use an http:// URL" (source: README.md, "Known gaps"), and a comment in src/config.rs describes that wire as having "no TLS path"; the Hrana listener does call accept_auto (source: src/protocol/sqlite/hrana.rs), so both statements are stale. Unit tests in src/protocol/tls.rs cover the config struct, not a handshake.

Mutual TLS

ca_cert_path and require_client_cert exist in the TLS config, and the README lists "TLS and mTLS" as an engine feature. (source: src/config.rs; README.md, "Engine features")

Not verified: No status entry describes an mTLS test. STATUS.md still lists "TLS/mTLS" under "Untested major systems"; for TLS that section is older than the TLS entries above, but nothing in the snapshot supersedes it for mTLS.

Credential exposure without TLS

  • Kafka SASL/PLAIN, S3 payloads, HTTP API tokens and Basic credentials on HTTP wires cross the network in the clear without TLS. (source: docs/status/2026-11-29-tls-coverage.md)
  • PostgreSQL uses SCRAM-SHA-256 for repeat logins, but the first login after a password change uses the password exchange once. Without TLS, that exchange sends the password. Channel binding is not offered, so libpq channel_binding=require is refused. (source: docs/status/2026-11-30-pg-scram.md)

Use TLS with require_tls = true on any network that is not fully trusted.


4. Encryption at rest

Encryption at rest is off by default. Turn it on with [storage] encryption_enabled = true plus a key. (source: src/config.rs; docs/status/2026-11-30-encryption-at-rest.md)

All statements in this section come from docs/status/2026-11-30-encryption-at-rest.md unless another source is named.

Scheme

  • AES-256-GCM, with per-purpose subkeys derived by HKDF-SHA-512, and key ids on sealed data.
  • The key is 64 hex characters, supplied by SYNERGYDB_ENCRYPTION_KEY or [storage] encryption_key_file (the environment variable takes precedence). Retired keys are supplied by SYNERGYDB_ENCRYPTION_RETIRED_KEYS. (source: src/config.rs; this entry)
  • A key check file, data_dir/ENCRYPTION, makes the server refuse to start, before reading any data file, if the key is wrong or if encryption is off on an encrypted directory. Enabling encryption with no key is a startup error.
  • A WAL or Raft entry that passes its checksum but fails to decrypt is a hard error, not a torn tail.

What is encrypted

SSTable data, index and bloom blocks; the WAL; MANIFEST and MANIFEST.log; Raft log segments and snapshots; saved vector graphs. Backups copy the sealed files plus the key check.

What is not encrypted

Stated as "by design and documented": file metadata; the generated TLS key under data_dir/certs/; the initial superuser password file; opt-in slow-query and debug logs; memory.

The audit log is a separate file with its own integrity chain (section 5). Not verified: No reviewed file says whether audit log segments are encrypted at rest. Plan for host-level disk encryption if that matters.

Key rotation and tools

  • Active plus retired keys.
  • synergydb encryption status audits every file on disk (exit 0, 2 or 3).
  • synergydb encryption rewrite (server stopped) re-seals SSTables under the active key and retires flushed WAL.
  • synergydb encryption generate-key.

Key storage is the operator's job. The per-tenant layout in the operator guide keeps one key file per tenant, readable by root and the service group. (source: deploy/security/network.md)

Evidence and cost

  • The proof script checks 9 wires' clients, searches the disk for plaintext canaries, and covers kill -9, wrong key, rotation, backup and restore, and enabling on existing data: 47/0. A 3-node cluster test with different keys found 0 canary hits in 43 files: 16/0.
  • Throughput on pgbench was within noise to about 5% lower. WAL on disk is about 55% larger before flushed segments are retired.

Not verified: The attestation document docs/security/encryption-at-rest.md named in the entry is not in the reviewed snapshot. ORM batteries and wire differential suites were not rerun with encryption on.


5. Audit logging

Audit logging is off by default in the built-in defaults and in the repository's synergydb.toml. The container config docker/synergydb.prod.toml turns it on. (source: src/config.rs; synergydb.toml; docker/synergydb.prod.toml)

All statements in this section come from docs/status/2026-11-30-hipaa-audit-rls-tls.md and src/config.rs.

What is recorded

With [audit] enabled = true and a path, every wire (22 wires plus gRPC and Arrow Flight) records:

  • logins, both success and failure;
  • reads and writes;
  • schema, role, grant and policy changes;
  • denials.

Each record carries the user, client address, wire, objects, statement, parameters and row counts. log_statement and log_parameters (both default true) control whether statement text and bound parameter values are written.

Bound parameters and statement text may contain protected health information. With log_parameters = true (the default), the audit log holds those values. Protect the audit path accordingly.

Format and integrity

  • JSONL, one record per line, hash-chained: HMAC-SHA256 with a key from SYNERGYDB_AUDIT_KEY or [audit] key_file, or plain SHA-256 if no key is set.
  • require_key = true refuses to start without a key. Set this for health data.
  • Daily and size-based rotation (rotate_mb, default 256), retention pruning (retention_days, default 2190, which is 6 years; 0 keeps forever), hourly checkpoint records (checkpoint_secs), recovery of a crash-torn tail, and file permissions 0600/0700/0400.
  • The logger uses an unbounded queue, a dedicated thread and an fsync per batch, and never drops an event.
  • synergydb audit verify checks the chain (exit 0 intact, 2 tampered, 3 unreadable). --expect-head SEQ:HASH checks the newest record. synergydb audit generate-key creates a key.

Evidence

test-scripts/audit/prove_audit.py: 36/36, covering 22 wires with official clients and 5 tamper drills.

Limits

  • Records become durable just after the reply is sent. There is no fail-closed mode: a crash between reply and fsync can lose the record of an action that was acknowledged.
  • Truncating the end of the newest segment is caught only with --expect-head or the logged checkpoints.
  • gRPC and Snowflake audit hooks were not exercised end to end.
  • Unauthenticated access (Memcached and Schema Registry from loopback, and the open health and welcome routes listed in section 1) is logged as (unauthenticated), with no user identity.

Not verified: The setup guide docs/security/hipaa-audit.md and profile docs/security/hipaa-cluster.toml named in the entry are not in the reviewed snapshot.


6. Cluster internal security

All statements in this section come from docs/status/2026-11-29-cluster-rpc-auth.md and src/config.rs.

  • Shared secret. [cluster] secret (env SYNERGYDB_CLUSTER_SECRET), at least 16 characters, the same on every node.
  • What it protects. Every Raft RPC (votes, log entries, snapshots) starts with a nonce handshake and is sealed with AES-256-GCM under a per-connection key derived from the secret. A peer without the secret cannot forge, alter, replay or read a frame. A node with a secret refuses peers that do not speak the handshake.
  • Enforcement. A node whose cluster port is not bound to loopback refuses to start in cluster mode without a secret. Loopback-only clusters run without one.
  • Before this change the cluster port accepted anything. The entry records that three forged vote packets moved a test cluster to a new term, and that anyone reaching the port could write to or replace the database.
  • Upgrade note. Nodes with and without a secret cannot talk to each other; upgrade all nodes together.

Limits:

  • The secret protects cluster traffic only. Client wires still need [tls].
  • The two-phase-commit RPC listeners have the same unauthenticated framing. Nothing starts them today, and they refuse non-loopback addresses. (source: this entry; docs/status/2026-11-29-auth-hardening.md)
  • Cluster mode is a preview. Sharded mode and cross-shard 2PC are not tested; follower reads have no staleness bound. (source: README.md, "Known gaps")
  • ALTER ROLE ... PASSWORD on the leader did not reach followers until a fix on 2026-11-30, so an old password stayed valid on one follower after a rotation. After the fix, rotation takes effect on every node. (source: docs/status/2026-11-30-alter-role-name-index.md)

7. Network hardening

The operator checklist is deploy/security/network.md. Its main points (source: deploy/security/network.md):

  • Never expose a wire to the internet. Treat every wire as a plaintext internal service even though each is authenticated.
  • Reach. Either bind each tenant to a WireGuard interface address so only mesh peers can connect (preferred for remote clients), or bind to a private VPC address with a security-group allowlist of customer networks on the tenant's exact port range, default deny for everything else.
  • Never set bind_address = "0.0.0.0" on a host with a public IP, and never pass --bind-all.
  • SSH only from a bastion, or use SSM with no port 22. Egress 443 to the backup and monitoring endpoints, preferably through VPC endpoints.
  • TLS on per tenant with a per-tenant certificate. Clients connect with sslmode=require (PG), --ssl (MySQL), tls:// (Redis).
  • SYNERGYDB_DEV_INSECURE_AUTH unset or 0. The systemd unit sets it to 0. (also deploy/systemd/synergydb@.service)
  • No passwordless superuser. Each tenant gets a strong random superuser password; rotate with ALTER ROLE ... PASSWORD.
  • Blast radius. One process per tenant with separate ports, directories and a memory cap. There is no in-engine multi-tenant isolation. A customer that needs a hard boundary should get its own VM.

Additional points from other files:

  • There is no server-wide connection limit. Limit connections at the load balancer (for example HAProxy maxconn) or firewall. (source: docs/status/2026-11-29-preauth-body-limits.md; docker/synergydb.prod.toml)
  • Kafka has no authorizer: the ACL APIs answer SECURITY_DISABLED. Any authenticated Kafka user with the wire role has full Kafka access. (source: README.md, "Known gaps"; docs/status/2026-11-29-nonsql-wire-privileges.md)
  • Loopback-open wires (section 1) are reachable by any process on the same host. Turn off wires you do not use: in a config file, a wire whose port key is missing is off. (source: README.md, "Run it")
  • The systemd unit runs as a dedicated synergydb user with NoNewPrivileges=true and ProtectSystem=strict. The Kubernetes manifests and Helm chart set runAsNonRoot and a read-only root filesystem. The container image runs as user synergydb, and its base images are pinned by digest. (source: deploy/systemd/synergydb@.service; deploy/kubernetes/statefulset.yaml; deploy/helm/synergydb/values.yaml; Dockerfile; docs/status/2026-11-29-preauth-body-limits.md)
  • The Helm chart defaults are tls.enabled: false and auth.enabled: false. Set both for any real deployment. (source: deploy/helm/synergydb/values.yaml)

8. Secrets hygiene

On 2026-11-29 the team removed committed credentials from the repository. (source: docs/status/2026-11-29-remove-committed-credentials.md)

What was done:

  • Two demo directories and one demo source file carried the passwords and addresses of three external source databases used to record demos. These were replaced with placeholders and reserved .invalid hostnames. Real values now come from environment variables.
  • A local tool settings file holding the same credentials was deleted.
  • docker-compose.yml no longer has a default superuser password (SYNERGYDB_SUPERUSER_PASSWORD must be set) and publishes its ports on loopback only.
  • A Windows start script no longer contains a superuser password and exits unless the variable is set.
  • A git grep confirmed no password or address of the three servers remains in tracked files.

What is still open, as the entry states:

  • The removed passwords remain in git history. The entry says they must be rotated on those servers; removing them from the tree does not make them safe. Not verified: No reviewed file records that the rotation was done.
  • Three demo compose files still default to throwaway demo passwords with ports on all interfaces.
  • deploy/kubernetes/secret.yaml still ships placeholder values. It defines an Opaque secret with two keys (admin-password, replication-password) and a TLS secret with empty tls.crt and tls.key. Replace every value before use; the server refuses the known placeholder superuser passwords on a non-loopback bind (section 1). (source: deploy/kubernetes/secret.yaml; docs/status/2026-11-29-auth-hardening.md)

Related controls:

  • The generated superuser password goes to an owner-only file in the data directory, not to the container log. (source: docs/status/2026-11-29-preauth-body-limits.md)
  • The Helm chart takes the superuser password from an existing secret, from auth.adminPassword, or generates a random one kept across upgrades. (source: deploy/helm/synergydb/values.yaml; docs/status/2026-11-24-config-env-tls-protected-mode.md)
  • The audit HMAC key is read from the environment or a key file and is never stored in the config. (source: src/config.rs)
  • A [secrets] section accepts backends environment, vault, kubernetes, aws, azure and gcp. Not verified: No status entry tests any secrets backend.

Not verified: A comment in deploy/helm/synergydb/values.yaml says that with auth disabled the container prints a generated password once in the pod log. The 2026-11-29 entry says the entrypoint no longer does this unless the data volume is not writable. The comment appears stale.


9. Compliance status and HIPAA

Certifications and audits

SynergyDB has not been certified under SOC 2, HIPAA, HITRUST, ISO 27001 or any other framework. No reviewed file mentions:

  • a SOC 2 report;
  • a HIPAA attestation or third-party HIPAA audit;
  • an external penetration test.

The phrase "for compliance (SOC 2, HIPAA)" appears as a comment above the [audit] section of docker/synergydb.prod.toml. It describes the purpose of the audit log, not a certification. (source: docker/synergydb.prod.toml; searched STATUS.md, README.md, ROADMAP.md and docs/status/*.md)

HIPAA compliance depends on how a covered entity or business associate deploys and operates a system, not on the database alone. The controls below can support a HIPAA program. They do not make a deployment compliant by themselves.

Controls that can support HIPAA technical safeguards

Need SynergyDB control Default Source
Unique user identification Per-user roles on every wire; wire roles for non-SQL wires On README.md; 2026-11-29-nonsql-wire-privileges.md
Access control GRANT, column grants, database ownership, SET ROLE, RLS, Redis/MongoDB/Cassandra native permission models On (native models opt-in) Section 2
Audit controls (45 CFR 164.312(b), as cited by the entry) Hash-chained, HMAC-signed JSONL audit log on every wire, 6-year default retention, audit verify Off 2026-11-30-hipaa-audit-rls-tls.md
Integrity of audit records HMAC chain, checkpoints, tamper drills 5/5 Off with the audit log 2026-11-30-hipaa-audit-rls-tls.md
Person or entity authentication Passwords (Argon2id storage), SCRAM on PG and MongoDB, SigV4 on S3/DynamoDB, failed-login delay On Section 1
Transmission security TLS on listed wires, require_tls Off Section 3
Encryption at rest AES-256-GCM over data files, WAL, Raft log and snapshots Off 2026-11-30-encryption-at-rest.md

What is not in place

  • No certification, attestation, third-party audit or external penetration test (above).
  • TLS (in release builds; debug builds turn it on), require_tls, encryption at rest and audit logging are all off by default and must be turned on. (sources in sections 3 to 5)
  • Unauthenticated loopback access on Memcached and Schema Registry, and the open health and welcome routes on CouchDB, InfluxDB and the HTTP API. The entry says health-data deployments must turn those wires off or require auth (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md). Redis fails closed by default in the code (section 1).
  • Audit records are not fail-closed; gRPC and Snowflake audit hooks were not tested end to end. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • RLS gaps for UPDATE ... FROM and DELETE ... USING; no row-level policies on non-SQL wires. (source: docs/status/2026-11-30-hipaa-audit-rls-tls.md)
  • No in-engine multi-tenant isolation; separate tenants need separate processes or VMs. (source: deploy/security/network.md)
  • Encryption at rest excludes file metadata, the generated TLS key, the initial superuser password file, slow-query and debug logs, and memory. (source: docs/status/2026-11-30-encryption-at-rest.md)
  • No mTLS test on record (section 3).
  • Several items are listed under "Not validated end to end" in the README, including restore from backup as a live operation and the migration tool. (source: README.md, "Engine features")

Not verified: docs/security/hipaa-audit.md, which the HIPAA entry says contains a HIPAA mapping and checklist, is not in the reviewed snapshot. This page does not reproduce or rely on that mapping.


10. License

SynergyDB is proprietary software. "All rights reserved." No rights are granted without a separate written agreement; the LICENSE file has the full terms and licensing contact. (source: README.md, "License")

SynergyDB is written in Rust and built with third-party open-source crates from crates.io (for example tonic, rustls, aes-gcm, argon2, tokio-postgres and tantivy). Those crates carry their own licenses. (source: Cargo.toml)

Not verified: No software bill of materials or third-party license inventory was found in the reviewed files. Reviewers who need one should request it.


11. Known security gaps (summary)

Collected from the sections above. Each item names its source.

Gap Source
Loopback clients reach Memcached and Schema Registry without a login; CouchDB / and /_up, InfluxDB /ping, /health, /ready and the HTTP health routes answer anyone 2026-11-29-open-wires-fail-closed.md; src/protocol/couchdb/mod.rs, handle_inner; src/protocol/influxdb/mod.rs, route_request
README says Redis is open by default; the code fails closed (test_no_password_configured_fails_closed) README.md; src/protocol/redis/commands.rs
gRPC refuses Bearer tokens; Snowflake Authorization: Basic never succeeds src/protocol/grpc/interceptors.rs; src/protocol/snowflake/mod.rs
Debug builds turn TLS on with a self-signed certificate src/config.rs, TlsConfigFile
--dev --bind-all starts on all interfaces with a well-known superuser password src/main.rs
TLS (in release builds), require_tls, encryption at rest and audit logging are off by default src/config.rs
No PostgreSQL channel binding; first PG login after a password change uses the password exchange 2026-11-30-pg-scram.md
mysql_native_password (SHA1) verifier stored for every role 2026-11-29-preauth-body-limits.md
No server-wide connection limit 2026-11-29-preauth-body-limits.md
Some HTTP wires (Gremlin, Prometheus, Schema Registry, S3) read bodies before checking credentials 2026-11-29-preauth-body-limits.md
Kafka has no authorizer README.md
Non-SQL wires other than Redis, MongoDB and Cassandra: all-or-nothing access per wire 2026-11-29-nonsql-wire-privileges.md
Tables with no owner record are open to every SQL role 2026-11-29-nonsql-wire-privileges.md
Functions and sequences carry no privileges; non-owners can create tables in another role's database 2026-11-30-db-privileges-owner-to.md
RLS not checked on joined tables in UPDATE ... FROM / DELETE ... USING; pg_policies empty 2026-11-30-hipaa-audit-rls-tls.md, 2026-11-30-set-role-identity.md
Session-level SET ROLE not undone by a rolled-back transaction 2026-11-30-set-role-identity.md
Audit log not fail-closed 2026-11-30-hipaa-audit-rls-tls.md
No in-engine multi-tenant isolation deploy/security/network.md
Previously committed credentials remain in git history 2026-11-29-remove-committed-credentials.md
No SOC 2 report, HIPAA attestation, third-party audit or external penetration test on record Section 9

Note on STATUS.md

STATUS.md still lists TLS/mTLS, RLS, column masking and audit logging under "Untested major systems". The status entries dated 2026-11-29 and 2026-11-30 report tests for TLS, RLS and audit logging, so that section is out of date for those three. It is not superseded for mTLS or column masking. (source: STATUS.md; status entries cited above)