ClickHouse security hardening

A fresh ClickHouse install starts with a default user that has every permission. This guide covers the decisions, build sequence, effort drivers and verification needed to harden a self-hosted cluster, and what to hand over.

On this page

Why a default ClickHouse install is too open for regulated data

ClickHouse security hardening means closing the default user, scoping what each account can do in SQL, encrypting traffic on the native and HTTP ports, limiting which networks can reach the server, and keeping evidence that all of this is in place. If your team already runs a working cluster of event, log or telemetry data, that cluster was probably set up for speed of delivery, and it now has to meet the standards that regulated data carries. The server is open source under the Apache License 2.0, so no vendor hands you a hardened configuration by default. The hardening work and the proof that it holds both fall to the operator.

The work is harder than it looks because the controls live in different places. Users, roles, row policies, settings profiles and quotas are defined through SQL-driven access control. TLS for the native and HTTP ports is set in server configuration. Network reach depends on listen settings inside ClickHouse and on firewalls, security groups and load balancers outside it. Backups run through BACKUP and RESTORE statements and write to a destination you choose. Query logs are system tables with their own retention decisions. A change made in one area does not check the others, so a team can finish the user work and still leave transport, logs or backups unaddressed.

The default user is the sharpest example. It starts with all permissions, so any session that authenticates as it can change data, read every table and alter other accounts. Before you restrict it, decide which named administrative accounts will replace it, create them, and confirm they can perform every administrative task your team needs. Then find every application, script and pipeline that connects with the default account and move each to a scoped user. Confirm the exact statements and their behavior against the access control documentation for the version you run, because the default account's privileges and the steps to restrict it should be verified in your own environment, not assumed.

Plan for the evidence from the start. Auditors and assessors will ask for the access configuration, a record of who holds which role, the TLS settings in effect, the network paths that reach the server, and proof that backups restore. The ClickHouse backup documentation warns that a backup never test-restored will probably not restore when needed and recommends regular restore tests on spare clusters. Also confirm that your chosen version receives security updates by checking the ClickHouse security policy, since the supported version list changes over time. Ask your internal or external team to write down who owns each control and how each one is checked.

Which ClickHouse components carry the security surface

A default ClickHouse install trades caution for convenience, so each component below needs a deliberate decision before production traffic arrives. The cards cover access control, listeners, cluster coordination, backups and logs, because a gap in any one of them can expose data even when the others are configured correctly.

Users, roles and access control

ClickHouse access control covers users, roles, row policies, settings profiles and quotas, and it can be managed through SQL statements. The documentation recommends using this SQL-driven workflow and restricting the default user, which starts with all permissions. Check that the default user is disabled or limited, that application accounts receive only the roles they need, and that row policies and quotas are defined for shared tables.

Native and HTTP listeners

The native protocol port and the HTTP interface are the two entry points that clients use to run queries, and each needs its own TLS and authentication decisions. Leaving either listener on plaintext or open to every network segment exposes credentials and query results to anyone who can reach the host. Confirm which ports are enabled, which interfaces they bind to, and whether TLS is required for every client path, including administrative tools and load balancers.

Network exposure and firewall rules

Listener settings decide which addresses ClickHouse accepts connections on, while host and network firewalls decide who can reach them. A cluster that binds to all interfaces and sits in a flat subnet makes the database reachable from workloads that never need it. Review bind addresses, restrict access to known application and bastion networks, and confirm that management ports are not reachable from user-facing segments.

ClickHouse Keeper and inter-node traffic

ClickHouse Keeper coordinates replicated tables, and it replaces ZooKeeper in this role. Keeper nodes and replica-to-replica traffic carry metadata and replicated data, so they need their own network isolation, TLS decisions and host access controls. Confirm that Keeper runs on dedicated hosts with at least three nodes, as the replication guide recommends for production, and that the Keeper ports are reachable only from cluster members.

Backup destinations and encryption

BACKUP and RESTORE can write to local disk, S3-compatible storage or Azure Blob Storage, and each destination has its own credential and access model. A backup written to a bucket with broad read access, or to a local path readable by unrelated system users, leaks the full dataset. Check who holds the storage credentials, whether the destination is encrypted at rest, and whether restores are tested on a spare cluster, since an untested backup may not restore when needed.

Query logs and audit trails

Query logs record which users ran which statements, and they are often the only evidence available after an incident or during an access review. Default retention and access to system log tables can expose sensitive query text, including literal values, to users who should not see them. Decide which roles may read system tables, set retention for log tables, and confirm that logs are shipped or copied to storage the database administrators cannot silently alter.

Which access model and network exposure fit your environment

This table compares the access and exposure choices for a hardened ClickHouse deployment, from local SQL users to external authenticators and from private-only networking to a load balancer in front. Read each row for when the option fits and what it asks of your operations team, such as service account handling, policy upkeep or client changes. The main takeaway is that the cheapest option to start with is often the one that costs the most to maintain once more teams and datasets share the cluster.

DecisionOptionOperational costWhen it fits
User authenticationLocal SQL-managed users with rolesPasswords and service accounts are managed in ClickHouse access control, so every rotation and offboarding is a SQL changeSmall teams, few human users, and environments without a central directory to integrate
User authenticationExternal authenticator (LDAP, Kerberos, X.509 or JWT)Directory group mapping, authenticator configuration and testing; see the SSO topic for identity integration detailsUsers already governed by a central directory and audited joiner-mover-leaver processes
Role granularityBroad roles shared across teamsFew roles to maintain, but any grant widens access for everyone in the role and makes reviews harderSingle-team clusters where all users may read the same datasets
Role granularityPer-dataset roles with explicit grantsMore roles to design and review as schemas change; new tables need new grantsShared clusters holding datasets with different owners or sensitivity levels
Row-level isolationRow policies on shared tablesPolicy expressions must be maintained and tested whenever filter columns change, and they add query logic to reviewMultiple tenants or business units sharing one table where the filter key is stable
Row-level isolationSeparate tables or databases per tenantMore objects, grants and backups to manage, but simpler reasoning about who can read whatStrong separation requirements or datasets with different retention and restore needs
Quota designQuotas per user or per roleEach quota needs owners and periodic tuning against real query patterns; clients may hit limits during spikesProtecting shared capacity from heavy analytical users or runaway ingestion jobs
Network exposurePrivate network only, reached from application subnetsRequires routing, DNS and firewall rules; analysts working remotely need another pathData platforms where all clients run inside the same network boundary
Network exposureVPN or bastion access for people and toolsOperators maintain VPN or bastion accounts and session logging; latency and connection limits can affect large exportsAnalyst access from managed endpoints where interactive use is limited to a known group
Network exposureLoad balancer in front of the native and HTTP portsTLS termination, health checks, source allow-lists and client connection settings must be designed and tested togetherHigh client counts or multiple nodes that need one stable endpoint, with the load balancer owned by the platform team

How to harden a ClickHouse cluster in sequence

This sequence takes a self-hosted ClickHouse cluster from default access settings to a documented, tested configuration. Each step builds on the one before it, so the check at the end of each step confirms that earlier controls still hold. Run it on a pre-production cluster first, then repeat it in production.

  1. Inventory users, listeners and open ports

    Before changing anything, record every user, role, listener and open port on a pre-production cluster that mirrors production. The platform team exports the user and grant lists from the access control tables and compares listening addresses and ports on every node, including Keeper hosts, which are often missed. Confirm each cluster node runs a version listed as supported in the ClickHouse security policy. Note which accounts serve ingestion pipelines, dashboards and administrators. The step is done when you hold a written baseline that names each account, its purpose and its network path, and every unexpected listener has an owner.

  2. Restrict or disable the default user

    The default user starts with all permissions, so it is the first account to address. Decide with the security team whether to disable it or reduce it to a minimal, non-administrative account, and confirm the exact approach against the access control documentation for your version. Apply the change through configuration and test it on pre-production first. The check: attempt a login as the default user from a host that should have no access and confirm it is refused. Then confirm that the named administrative sessions you set up in the next step are not affected by the change.

  3. Create named accounts and grant roles

    Create one named account for each administrator and one for each application or pipeline, then define the access through SQL statements so the configuration can be reviewed and version controlled. Assign privileges to roles, and grant each role only the databases and tables its work requires. Map administrators to a role that can change grants, and keep it separate from the roles used by applications. The check: log in as an application account and run a query against a table outside its grants. The query must be denied. Then log in as an administrator and confirm the statements that role needs still succeed.

  4. Add row policies for isolation

    For multi-tenant or multi-region datasets, add row policies so each role reads only its own rows. Agree the filter expression with the data owner first, because an incorrect expression either leaks rows to the wrong tenant or hides data from valid users. Apply the policies to a copy of representative data before production. The check is a comparison: run the same query as a tenant account and as an administrator, then compare the row counts and sample values for the tenant account against the expected figures from the data owner. Any row from another tenant or region in the tenant result means the step has failed.

  5. Apply settings profiles and quotas

    Settings profiles set limits on resources such as memory and query time, and quotas cap how much work a role can do within a time window. Map profiles to account types, such as interactive analysts and service pipelines, and set quotas that match agreed usage. Confirm the setting names and quota behavior against the documentation for your version before applying them. The check: run a deliberately heavy query under a restricted account and confirm the profile limit stops it. Then run enough queries under a quota to exceed it and confirm the usage is recorded as exceeded and that the account is refused until the window resets.

  6. Enable TLS on native and HTTP ports

    Enable TLS on both the native and HTTP ports, using certificates issued by your internal certificate authority. Decide whether clients must present certificates or whether server-side TLS with password or external authentication is enough, and document the choice. Update every client, driver and pipeline to use the encrypted endpoint, and turn off plaintext listeners wherever your version allows it. Confirm the exact certificate and port settings against the current ClickHouse documentation. The check: connect with a client still configured for plaintext and confirm it fails, then connect over TLS and confirm the certificate chain validates.

  7. Restrict listeners, firewalls and backup encryption

    Bind listeners only to the network interfaces that need them, then limit access with firewall rules that allow known application subnets, administrative hosts and Keeper peers. Configure encryption for backup destinations, whether local disk, S3-compatible storage or Azure Blob Storage, and confirm the exact settings against the current backup documentation. Keep backup credentials out of shared configuration files. The check: attempt a connection from a host that is not on the allow list and confirm the network layer refuses it. Then run a test backup, restore it to a spare cluster and confirm the restore succeeds from the encrypted destination.

  8. Enable query logs and run verification

    Enable query logging and set a retention period that meets your audit requirements, confirming the setting names and retention behavior against the documentation for your version. Where your monitoring stack supports it, ship logs to storage that cluster administrators cannot quietly alter. Then rerun every verification check from the earlier steps on the pre-production cluster and record the results. The check: generate a failed login and a denied query, then confirm both appear in the query logs with the user and client address. Have someone other than the person who made the changes sign off the results before the configuration is promoted to production.

ClickHouse security hardening controls to set and verify

Each control below closes a specific path to data loss, unauthorized access or service disruption. For every control, the evidence column tells you what to collect for an auditor or security reviewer. Identifiers, certificate formats and setting names change between releases, so confirm each one in the release notes and documentation for the version you run.

Restrict the default user

ClickHouse ships with a default user that starts with all permissions, so it is the first account an attacker would test. Set a strong password or disable the account, then create named administrators through the SQL-driven access control workflow. The failure this prevents is an unauthenticated or shared administrative login reachable from the network. Evidence includes the server configuration showing the default account's state, the user list, and a login attempt from outside the approved network that fails. Confirm the configuration keys for your version in the current documentation.

Scope roles and row policies

Grant each analyst, dashboard, pipeline and service account a role that contains only the databases, tables and statements it needs. Add row policies where one dataset holds records for several tenants or business units, so each role sees only its own rows. The failure this prevents is an ingestion job or a dashboard login that can drop tables, change users or read unrelated data. Evidence includes the grant statements per role, the account-to-role map, row policy definitions, and test queries run as each role showing filtered results.

Limit load with profiles and quotas

Settings profiles set limits on query resources and behavior for groups of users, and quotas cap total usage over defined time intervals. Together they stop one runaway query, a large export or a compromised account from consuming the cluster or pulling data at scale. The failure this prevents is a single caller degrading the service for everyone or copying a full dataset unnoticed. Evidence includes the profile and quota definitions, their assignment to roles, and query log entries from testing that show a limit being triggered.

Encrypt ports and restrict exposure

Enable TLS on the native port used by clients and on the HTTP interface used by tools and integrations, using certificates issued by your internal certificate authority. Then allow-list the source subnets that may reach these ports, and keep Keeper ports reachable only from ClickHouse nodes. The failure this prevents is credentials and query results crossing the network in plaintext, or a cluster port reachable from a flat corporate network. Evidence includes listener settings, certificate issuer and expiry records, firewall rules, and a scan from an unapproved network showing closed ports.

Protect passwords and certificates

Keep user passwords out of plaintext configuration files, and use the password storage options your version supports or an external authenticator such as LDAP, Kerberos or JWT where the identity system already manages accounts. Store TLS private keys with restricted file ownership and permissions, and rotate them on a schedule. The failure this prevents is a leaked configuration backup, repository or host image exposing working credentials or keys. Evidence includes the credential storage method, file permission listings, vault or secrets manager records, and rotation logs.

Encrypt backup storage

ClickHouse BACKUP and RESTORE can write full and incremental backups to local disk, S3-compatible storage or Azure Blob Storage, and replication does not protect against human error or corruption. Encrypt the destination with the storage platform's controls or a key you manage, and give the backup writer its own narrowly scoped credentials. The failure this prevents is backup copies readable by anyone with bucket access, or backups that cannot be restored. Evidence includes encryption and key configuration, bucket policies, and logs from restore tests on a spare cluster. Confirm the supported encryption options in the backup documentation for your version.

How to audit ClickHouse query logs without drowning in them

Query logs answer four questions: who ran a statement, from which host and address, when, and whether it succeeded or was denied. ClickHouse writes these facts to system log tables. The query log records each executed statement, including the exceptions it raised, and the session log records logins and authentication failures. Incident responders need these records to reconstruct what happened, and compliance reviewers use them as evidence that access controls operate as designed. The logs only help if they are complete enough to answer those questions and small enough to search.

Start by deciding which tables to keep. The query log and session log cover most access questions, so enable them first. Enable other system logs only when a specific question needs them, and record that reason. Set retention per table in line with the retention policy defined in the implementation plan. Confirm the time-to-live setting for each log table in your ClickHouse version, because defaults and option names change between releases. Keep a short window on the cluster and copy the records to a central store that is outside the cluster's control plane, so older evidence survives a cluster rebuild.

The people you monitor must not be able to read, change or delete the audit trail. Grant read access to the log tables through a dedicated audit role, assign that role to a small named group, and keep it away from application roles and the administrative accounts used for daily work. Confirm that the default user has been restricted and that no settings profile or quota lets an ordinary user alter log tables. The shipping agent should have write access only to its destination, with its own credentials. The central store should accept appends and keep deletions under a separate approval path.

A review routine works best with a short alert list. Start with three alerts. The first flags denied queries, grouped by user and host, so repeated attempts stand out. The second flags administrative actions such as user, role, grant and settings changes, and any DROP or ALTER against databases that hold regulated data. The third flags logins from hosts outside an allowlist of application and administrator networks. Illustrative example: a reporting account that suddenly queries from an unlisted host triggers the third alert and a ticket for review. Tune thresholds during pre-production, then add alerts only when a finding justifies them.

Volume is the main way audit programs fail. Every dashboard refresh and scheduled job adds query log rows, so measure daily volume in pre-production with representative queries before setting retention. Control growth by shipping only the fields your alerts and investigations use, filtering routine internal queries where your policy allows, and reviewing growth each month. Ask any implementer for a written scope covering retention per table, storage location, shipping method, the alert list, who holds read access and how the review is documented. One-time work covers the pipeline and alert tuning. Recurring cost covers log storage and the time someone spends reviewing alerts.

How ClickHouse security hardening differs by deployment model

On a single node there is no replica traffic to protect, so hardening centers on client connections, the default user and the host or cloud firewall in front of the server. Most of the work sits in the server configuration and in the access control SQL, and the perimeter is usually a security group or host firewall that you control directly.

  • Inter-node traffic: none exists between replicas, so the encryption target is client traffic on the native secure port and the HTTPS port.
  • Certificates: one server certificate and key, stored on the host with restricted file permissions and referenced from the server configuration. Confirm whether your version reloads certificates without a restart.
  • Backups: BACKUP can write to local disk, but a copy on the same disk offers little recovery value. Send backups to S3-compatible or Azure Blob storage through an endpoint you control, then run restore tests on a spare instance.
  • Network exposure: restrict the native and HTTP ports to known application subnets, and confirm that the default user has been restricted before any client connects.

Confirm the exact port and TLS setting names for your ClickHouse version before you change the server configuration.

What drives ClickHouse security hardening effort

This table lists the factors that raise or lower the effort of hardening a self-hosted ClickHouse deployment, with the reduction levers for each and who typically pays for that part of the work. Use it to see which drivers apply to your environment before asking for a fixed-scope quote, since the written scope should itemize each driver with counts.

DriverWhy it changes effort and costHow to keep it downWho is paid for the work
Users and connecting servicesEach human user, dashboard and service account needs a role, a credential and a tested grant set. Shared or unmanaged accounts add review and cleanup work.Define standard role templates, retire the default user early, and issue one account per service. Ask for an inventory of accounts in the scope.Client organization for inventory and ownership decisions; partner for role design and migration of accounts
Tenants or datasets needing row policiesEach tenant or sensitive dataset needs a row policy that is tested for leakage, including through views and joins. Policy count grows test effort faster than user count.Reuse one tested policy pattern across tables, and limit the number of distinct policy shapes. Confirm which tables carry tenant data.Partner for policy design and leakage tests; client for confirming data ownership rules
Client languages and toolsDrivers, BI tools and scripts each hold their own connection settings. Moving them to TLS, new credentials or a new port means changing and retesting each one.Fix the shared client connection library or configuration first, then roll out per tool. List every client in the scope with its owner.Client for application owners to deploy changes; partner for library fixes and connection tests
EnvironmentsDevelopment, pre-production and production each need the same controls, and drift between them is a common source of rework. Pre-production should hold representative data and queries.Build hardening as code or scripted config once and apply it to every environment. Confirm how many environments are in scope.Partner for configuration and parity checks; client for environment access and change approval
Existing identity providerConnecting LDAP, Kerberos, X.509 certificates or JWT authentication requires directory group mapping, service account handling and failover testing. Without one, local users must be managed by hand.Map existing directory groups to a short list of roles before build. Confirm which external authenticators the organization already runs.Client for directory and identity administration; partner for authenticator configuration and mapping
Backup destinationsEncrypted backups to local disk, S3-compatible storage or Azure Blob Storage each need key handling, access policies and restore tests. Each destination is a separate control surface.Limit to one or two approved destinations and reuse one key and access pattern. Plan at least one restore test on a spare cluster.Client for storage accounts and key custody; partner for backup configuration and restore testing
Compliance frameworks in scopeEach framework adds evidence requirements such as access reviews, audit log retention and change records. Mapping controls to evidence is often the largest hidden task.Agree the framework list and control mapping before build, and reuse one evidence set across frameworks. Confirm the assessor's expectations early.Client for assessor relationship and attestation; partner for control mapping and evidence preparation. Audit reports come from independent auditors.
Query log audit and retentionAuditing query logs requires deciding what is captured, where it is stored, who reviews it and how long it is kept. Each decision adds storage and review work.Agree a fixed set of logged events and a retention period in the scope. Confirm log storage capacity with the client team.Client for log storage and review process; partner for logging configuration and sample reviews

How to prove ClickHouse security hardening works and fails safely

A hardening change is only finished when a test shows it blocks what it is meant to block. For a self-hosted ClickHouse cluster, that means writing checks for each control and running them against the live configuration after every change, not just reviewing the settings files. Start with access. Confirm that the default user cannot log in from a remote address, that a restricted account receives an error when it queries a table outside its grants, and that a second account only sees rows allowed by its row policy. Run each check as the account it describes, and record the exact error or result returned, because a silent empty result can hide a broken policy.

Next, test the transport and network controls. Connect with a plaintext client to every listener that is supposed to be TLS-only, on both the native and HTTP ports, and confirm the connection is refused. From a host that is not on the allowed list, attempt a connection and confirm it fails at the network or server layer. Quotas need a test too: run a deliberately expensive query under a low-limit account and confirm that the quota stops it with the expected error. Then check the audit trail. Denied logins and denied queries should appear in the query and system logs with the user name, client address and time, so ask your team to confirm which tables those entries land in and how long they are kept.

Backups deserve the same scrutiny as access controls. The ClickHouse backup documentation warns that a backup never test-restored will probably not restore properly when it is needed. Take an encrypted backup of a representative database, restore it to a spare cluster built from the same configuration, and compare row counts and checksums against the source. Also confirm that the decryption key is held somewhere other than the backup target and that a restore can be completed by someone other than the person who wrote the runbook. Repeat the restore on a schedule, since a backup that passed once can still fail after a version change or a key rotation.

Failure testing shows whether the cluster degrades safely. Simulate an expired server certificate on a non-production node and confirm that new TLS connections are refused with a clear error, that existing clients are handled according to your runbook, and that the expiry is caught by monitoring before users are affected. Stop one ClickHouse Keeper node and confirm that the quorum holds and replicated tables stay writable, then bring the node back and verify that the recovered replica syncs missing data from a healthy replica without manual steps. Losing Keeper quorum is the more serious case: the expected safe behavior is that writes pause rather than diverge, so test it deliberately and confirm the recovery steps. Agree the expected result for each case in writing before the test runs.

Keep every test script in version control next to the configuration it checks, and tag each run with the ClickHouse version and the commit that was tested. Ask your implementer to show you the pass and fail output from the most recent run and to explain any test that was skipped. These scripts are also your evidence for internal reviews and for independent auditors, who will want to see that controls were exercised rather than described. DeployOpen can prepare and run this test suite as part of a fixed-scope hardening engagement; confirm the exact test list, environments and deliverables in the written scope before work starts.

What buyers ask before hiring help with ClickHouse hardening

How much effort does ClickHouse security hardening take?

Effort depends mostly on how many nodes, identities, client applications and data paths the cluster has today. A single node with a few service accounts is a small job. A multi-node cluster with ClickHouse Keeper, several client applications, dashboards and scheduled backups touches more configuration and more testing. Typical work covers restricting the default user, creating roles and row policies in SQL, setting quotas and settings profiles, enabling TLS on the native and HTTP ports, narrowing network exposure, configuring encrypted backups and reviewing query logs. Each control needs a change, a test against live client connections and a rollback path. Ask any provider to base its estimate on a written inventory of nodes, identities, applications and data classifications, and to show how each control is tested before production.

What drives the cost of hardening a ClickHouse cluster?

Cost follows the amount of work and the people doing it. The main drivers are:

  • Cluster size: the number of replicas, shards and Keeper nodes that need consistent configuration.
  • Identity model: whether you use local users, LDAP, Kerberos, X.509 certificates or JWT, and how many directory groups must map to roles.
  • Client count: each application that connects with the default user needs its own identity and a tested migration.
  • Environments: a pre-production environment with representative data and queries adds testing effort.
  • Evidence needs: control documentation, restore test reports and runbooks add time.

Hardening is mostly one-time work. Recurring costs include reviewing access, rotating certificates, applying supported releases and running restore tests. Ask for a quote that lists each item, who performs it, what you must provide, and which items sit outside the fixed scope.

How long does ClickHouse hardening usually take?

Duration follows the written scope, so treat any general timeframe as a starting point to confirm. Work usually runs in phases: discovery of current settings, a design for users, roles and network access, changes in pre-production with representative queries, a production rollout in an agreed change window, and restore testing. The longest steps are often client migration and the testing that follows, because every application using the default user needs a new identity and a verified connection. Delays also come from approval cycles, certificate issuance and access to test environments. Ask for a plan that names each phase, its dependencies and the change windows you must provide. Be cautious of any duration that is not tied to a named scope.

What does our internal team need to provide for hardening?

The internal team supplies access, decisions and approvals. Expect to provide a named technical owner, administrative access to the cluster and its hosts, and a list of client applications with their current accounts. Identity administrators must support any directory integration, such as LDAP or Kerberos groups, and a certificate authority must issue server and client certificates if you enable TLS. Network or security teams approve changes to exposure and firewall rules. You will also need a pre-production environment, storage and credentials for encrypted backups, and people who can confirm that each application still works after a change. Agree in advance who signs off the production change and who is on call during the change window.

Can our team harden ClickHouse alone using the official documentation?

A capable team can do much of the work with the official documentation. The access control, external authenticator, backup and production FAQ pages describe the settings and their order. The harder parts are judgment calls that documentation cannot settle for your environment: which role model fits your data, how to move applications off the default user without an outage, how TLS changes affect each client library, and how Keeper and replication behave during a change. Restore testing also takes deliberate effort, because the backup documentation warns that a backup never test-restored will probably not restore when needed. Before starting, confirm that the team has time, the skills, a pre-production environment and a rollback plan for each change.

What does a fixed-scope ClickHouse hardening engagement cover?

DeployOpen works mostly on fixed-scope engagements, and the scope, deliverables and timelines are agreed in writing before work starts. A written scope should name the clusters and environments covered, the identity and role model, the TLS and network changes, the encrypted backup configuration, the restore test and the documentation delivered. Typical deliverables include an inventory, a configuration record, a runbook, a restore test report and an evidence pack for assessors. Anything outside the agreed scope, such as ongoing monitoring, upgrades or continuous testing, falls under a separate arrangement. Ongoing support, upgrades and continuous testing are available as retainers. Ask for an exclusions list alongside the deliverables so both sides know the boundary.

Does ClickHouse hardening make us compliant with an audit?

No. Hardening supports controls, but compliance is decided by independent auditors and certification bodies. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Start by asking your assessor which framework and control IDs apply, then map each hardening measure to those controls in your own words. Typical evidence includes access control configurations, TLS settings, network exposure records, backup configuration and restore test results. Ask any provider for a control mapping and an evidence list that match the scope of the assessment, and confirm the final interpretation with your auditor before relying on it.

Which ClickHouse versions should we run while hardening?

Start with the versions that still receive security updates. The ClickHouse security policy lists 26.9, 26.8, 26.7 and 26.3 as currently supported, and all other versions as unsupported. Confirm that list on the policy page before you plan, because support windows change. Choose between monthly stable releases and twice-yearly LTS releases based on how often you can test and upgrade. The production FAQ recommends stable releases for most production use, a pre-production environment with representative data and queries, and reading the changelog before upgrading, since minor backward-incompatible changes can occur. Hardening on an unsupported version leaves known gaps open, so an upgrade is often part of the scope to agree.

Keeping ClickHouse security hardening intact after go-live

Hardening decisions erode quietly once a cluster is in production. The controls that matter most after go-live are the ones that catch drift: a grant added during an incident that never got reverted, a new listener opened for a debugging session, or a TLS certificate that expires on a Sunday night. Set up monitoring for five signals from the start: failed logins against the native and HTTP ports, changes to grants and role membership, new or changed listening endpoints, certificate expiry dates for every TLS-enabled port, and quota breaches recorded for users and profiles. Each signal should have a named owner and a response path, and the alerts should be tested once before go-live so the team knows they fire.

Access review is the second recurring control. Keep an access matrix that lists every user, role, row policy, settings profile and quota, and the business owner who approved it. Review that matrix on a fixed schedule that your security team chooses and records, and remove accounts that no longer have an owner, service accounts whose job has ended, and roles granted for a project that has closed. Confirm that the default user remains restricted after every upgrade or configuration rollout, since a redeployed configuration can reintroduce permissions you removed. Ask whoever runs the review to compare the live grants against the matrix, not against memory, because the matrix is the record an auditor or incident responder will use.

Backups need the same discipline. The ClickHouse backup documentation warns that a backup never test-restored will probably not restore properly when needed, and it notes that replication does not protect against human error or corruption, because a bad delete replicates to every replica. Schedule restore tests on a spare cluster at a fixed interval, restore a representative set of tables and partitions, run the same validation scripts you used at go-live, and record the result in the backup restore record. Confirm that encryption keys and backup storage credentials are included in the restore procedure and rotated under the same change process as other secrets.

The upgrade policy ties these controls together. The ClickHouse security policy lists which versions receive security updates, and that list changes over time, so confirm the current list before each planning cycle rather than relying on the version you deployed. Keep the cluster on a release line that is still supported, and plan upgrades early enough that a security fix does not force an unplanned change. Test each upgrade in pre-production with representative data, read the changelog for backward-incompatible changes, and update the configuration baseline afterward so the documented state matches what runs.

The handover pack is what keeps this work repeatable when people change roles. Hand over five artifacts: the access matrix, the configuration baseline showing the settings and TLS and network decisions made at go-live, the test scripts used for hardening checks and restore validation, the backup restore record with dates and outcomes of each test, and a change log that links every grant, configuration or version change to an approval. Ask the implementation partner to deliver these in editable form, stored in your own repository, with a named owner for each.

How DeployOpen works on this

DeployOpen scopes ClickHouse hardening in writing before any change is made, then works inside your own infrastructure to restrict the default user, set up SQL-driven access control, enable TLS, limit network exposure, protect backups and audit query logs. Each step ends with documented evidence your team can review and keep. Engagements are fixed-scope, and ongoing support is available as a retainer.

How we scope

  • The written scope lists each ClickHouse node, user, role, network path and backup target in the hardening work.
  • Scope confirms how the default user is restricted and which applications keep credentials for their accounts.
  • Scope names the audit evidence, such as query log retention and access reviews, that your team will receive.

How we build

  • Changes are made first in a pre-production environment with representative data, roles and queries.
  • Access is built in SQL-driven RBAC with users, roles, row policies, settings profiles and quotas.
  • TLS is configured on both the native and HTTP ports, with certificate rotation documented for your team.

How we hand over

  • Restore tests run on a spare cluster, because an untested backup may not restore when needed.
  • Handover includes a configuration record, a runbook for role changes and a log of applied settings.
  • You receive the audit query log setup, retention settings and a checklist for reviewing access.

How we support

  • Retainer support can cover version checks against the supported ClickHouse release lines and security updates.
  • Access and role reviews can be repeated as teams, applications and data sources change over time.
  • Retainer work can re-test hardening after upgrades, using the same pre-production steps as the original build.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.