Elasticsearch Config Auditor
Your elasticsearch.yml decides who can read, write and delete everything in the cluster, which networks can reach it, and whether node-to-node traffic runs in plaintext. Read it before a scanner does.
An Elasticsearch config audit is a static review of the elasticsearch.yml file — authentication, networking, TLS, and cluster settings checked line by line against known good practice, without running a cluster. Paste your config here and this auditor reads it in the browser — it never uploads it — flagging security off, network.host 0.0.0.0, TLS off on either layer, anonymous access, wildcard index deletion, CORS open to every website, and a reindex whitelist of *, and scoring it from 0 to 100. The companion article Elasticsearch Config Security Audit Guide explains each check. See also the MongoDB Config Auditor and the Redis Config Auditor.
Last updated:
1. Audit a config
Results
🔒 The audit runs entirely in your browser. Your config is never uploaded, stored, or sent anywhere. Configs name network bindings, file paths and access rules — that is exactly why they should stay on your machine.
What elasticsearch.yml is
Elasticsearch config (elasticsearch.yml) is a flat YAML file of dotted settings. xpack.security.enabled, network.host, cluster.name, discovery.seed_hosts — one key: value per line, with # comments and quoted values allowed. The same setting can also be written as nested YAML (xpack: under which security: sits). The auditor reads both spellings as the same setting. Lists use - item or inline [a, b] form, and YAML forbids tabs for indentation.
The settings fall into four concerns. Who can connect (xpack.security.enabled, anonymous access), which networks can reach the cluster (network.host, http.port, TLS on both layers), what a client can destroy (action.destructive_requires_name, CORS, the reindex whitelist), and how the cluster forms (discovery.seed_hosts, cluster.initial_master_nodes, discovery.type). The auditor reads all four with the same scoring.
The most important fact about elasticsearch.yml is the default. On Elasticsearch 7.x and earlier, security is OFF unless you turn it on. A fresh 7.x install with no xpack.security.enabled line accepts every connection and lets it read, write and delete everything — the misconfiguration behind the waves of open Elasticsearch clusters that scanners found, wiped, and left with a ransom note. On Elasticsearch 8.x the default changed to on. That is why the auditor treats a missing line as a warning naming the version split, and an explicit false as an error.
Two things the auditor deliberately does not follow. Config is YAML, and the parser only covers the subset real configs use — anchors, multi-line blocks and tags are reported as unparseable rather than silently misread — and a running cluster is out of scope. GET /_nodes/settings can show different values from the file on disk, and the auditor never connects to a cluster. Heap size lives in another file, jvm.options, which this tool does not read.
What this auditor does — and does not do
It parses the config in the browser — dotted keys and their nested equivalents, comments, quoted strings, booleans, numbers, lists — and applies 32 rules to the settings. xpack.security and anonymous access, network.host and http.port, TLS on the HTTP and transport layers (including keystore and truststore paths), certificate verification mode, destructive_requires_name, cluster bootstrap, CORS, the reindex whitelist, inline scripting, memory locking and the system-call filter, cluster and node names, audit logging, data and log paths, the fielddata cache and thread-pool queue sizes. Scoring starts at 100. Each error costs 10 points (capped at 50), each warning 4 (capped at 28), each info 1 (capped at 10). Bands: 90+ Excellent, 70–89 Good, 50–69 Needs work, below 50 Poor. One info is noted only and never costs points: xpack.security.audit.enabled being on.
It does not run a cluster, check file permissions, or read live values. It reads only the text you give it. Because it cannot see the Elasticsearch version, a missing xpack.security.enabled is reported with the 7.x/8.x split rather than as a conclusion. It cannot see live values (GET /_nodes/settings), real network exposure, keystore file permissions on disk, TLS certificate validity, heap size in jvm.options, or the users and roles in the native realm. A finding is a pattern, not a verdict — a default port behind a firewall that allows only localhost is a different risk from the same line on a public server. Read each finding with its evidence and judge it in your context.
The broken demo is a small elasticsearch.yml built to trip the rules — security off, network.host 0.0.0.0, TLS off on both layers, anonymous access on, wildcard index deletion allowed, CORS open to every website, a reindex whitelist of *, no seed hosts and no initial master nodes, inline scripting allowed by default, relative data and log paths — scoring 18 (Poor), with 21 findings across all three severities. The hardened demo is the same shape with every finding fixed, scoring 100.
Honest about what a static audit cannot see
This audit reads text. It cannot see the values a running cluster actually runs on — the config file on disk and a running cluster can drift apart across a missed restart — the Elasticsearch version and whether it is end-of-life, real network exposure, keystore file permissions on disk, TLS certificate validity, heap size in jvm.options, or the users and roles in the native realm. It cannot see files that are not in the config. The people who can actually log in live in the cluster, not in elasticsearch.yml.
And a high score does not mean a safe Elasticsearch. The rules encode widely agreed practice — Elastic's own secure-cluster, security-settings and important-settings pages — but they are a checklist, not a penetration test. "No findings" means no dangerous pattern was found in this text, not that the cluster behind it is safe.
Key facts
| xpack.security.enabled | The setting that turns Elasticsearch authentication and authorization on. Off by default on 7.x and earlier. Without it, anyone who can reach port 9200 can read, write and delete everything. On by default on 8.x. The one line that decides whether a cluster is open to the internet. |
| network.host | The setting that picks which network interfaces Elasticsearch listens on. 127.0.0.1 or _local_ means local clients only, 0.0.0.0 means every interface (including the public internet if the host is exposed), and _site_ and _global_ bind site-local and all addresses. Combined with security off, it is the classic open-cluster exposure. |
| xpack.security.http.ssl.enabled | Whether the HTTP layer — the REST API on port 9200 — encrypts client connections. Off means credentials and data flow in plaintext. On without an xpack.security.http.ssl.keystore.path is a contradictory config — the node will not start without a keystore. |
| xpack.security.transport.ssl.enabled | Whether node-to-node traffic is encrypted. Off means cluster traffic — replicated data included — flows in plaintext between nodes. On needs a keystore or truststore path, and verification_mode none (accept any certificate) is worse than off in one respect: it looks encrypted while a man in the middle can sit between the nodes. |
| action.destructive_requires_name | Whether DELETE requests must name an index explicitly. When false, one DELETE /* deletes every index in the cluster. The default has been true since 7.x. The auditor flags only an explicit false. |
| http.cors.enabled / http.cors.allow-origin | Whether the REST API answers cross-origin requests from browsers. With allow-origin "*", any website a visitor opens can call the cluster API from that visitor's browser. Restrict allow-origin to exactly the origins you need, or turn CORS off. |
| discovery.seed_hosts / cluster.initial_master_nodes | How a cluster forms: seed_hosts is the list of nodes a new node contacts to join, initial_master_nodes is the list of master-eligible nodes that take part in the first election. A multi-node cluster with neither risks split-brain and bootstrap failure, and a single initial master is a single point of failure. |
| Format reference | Elastic docs — Secure your cluster · Elastic docs — Security settings · Elastic docs — Important Elasticsearch configuration |
Frequently asked questions
Why does the audit run in my browser instead of on a server?
Because a config can say things you do not publish: network bindings, file paths, keystore locations, internal hostnames. Sending it to a server to audit would create the very exposure the audit is meant to find. Parsing it locally means the config never leaves your machine.
My config has findings — is my Elasticsearch unsafe?
Not necessarily. A finding is a matched pattern, and some matches are intended: a default port behind a firewall that allows only localhost, a single-node cluster for development. Fix the errors first — security off, a public bind, anonymous access, CORS open to every website — then the warnings, and treat the infos as a list of defaults worth setting explicitly.
I set xpack.security.enabled: true — is authentication done?
No — that turns authentication on, but users are still needed. With security on and no users in the native realm, nobody can log in until the first user is created, yourself included. And TLS is a separate step: turning security on encrypts nothing — the HTTP and transport layers each need their own SSL settings and keystores. The auditor checks the config side. The users live in the cluster, which a static audit cannot see.