Elastic Security for Enterprises: Architecture, Deployment, and Hardening Guide
Prerequisites
- Working knowledge of Elasticsearch and Kibana
- Access to Linux servers and enterprise PKI
Steps
Elastic Security combines SIEM, endpoint protection, threat hunting, and analytics on the Elastic Stack. This guide explains enterprise architecture, deployment steps, hardening controls, and operational practices for running Elastic Security at scale.
Overview
Elastic Security is the security operations and analytics layer built on Elasticsearch, Kibana, Elastic Agent, and optional endpoint capabilities. Enterprises use it to centralize telemetry, detect threats across endpoints, cloud, identity, and network sources, and investigate incidents with fast search, correlation rules, and case management.
Its core purpose is to unify data ingestion and detection engineering on a scalable search platform. In practice, teams adopt Elastic Security when they need flexible data onboarding, strong detection content, multi-tenant visibility, and the ability to retain large security datasets for hunting and compliance.
Architecture
A typical enterprise deployment includes Elasticsearch data nodes, Kibana, Fleet Server, Elastic Agents, and integrations for cloud, identity, and network telemetry.
View as text
[Endpoints] ---- 1. telemetry ----> [Elastic Agent] [Cloud APIs] ---- 2. logs ----> [Fleet Server] [Elastic Agent] ---- 3. ingest ----> [Elasticsearch Ingest Nodes] [Fleet Server] ---- 4. policy/artifacts ----> [Elastic Agent] [Elasticsearch Ingest Nodes] ---- 5. index ----> [Hot Data Nodes] [Hot Data Nodes] ---- 6. lifecycle ----> [Warm/Cold Nodes] [Kibana] <---- 7. query/search ----> [Elasticsearch Cluster] [Analysts] ---- 8. investigate ----> [Kibana]
Core components
- Elasticsearch: storage, indexing, correlation, and search.
- Kibana: Security app, detections, timelines, dashboards, and cases.
- Fleet Server: centralized agent enrollment and policy management.
- Elastic Agent: collects logs, metrics, endpoint, and integration data.
- Detection Engine: scheduled rules, ML jobs, and alert enrichment.
Deployment models
- Elastic Cloud: fastest path, managed upgrades, built-in TLS.
- Self-managed: full control for regulated environments.
- Hybrid: cloud-hosted control plane with on-prem data collection.
Data flow considerations
- Use ingest pipelines for normalization and enrichment.
- Apply Index Lifecycle Management for cost control.
- Separate hot, warm, and cold tiers for retention efficiency.
Implementation Guide
- Install Elasticsearch and Kibana on Ubuntu:
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update && sudo apt-get install -y elasticsearch kibana
sudo systemctl enable --now elasticsearch kibana
- Generate enrollment tokens and verify cluster health:
sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200/_cluster/health?pretty
- Install Fleet Server or enroll an Elastic Agent:
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.14.3-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.14.3-linux-x86_64.tar.gz
cd elastic-agent-8.14.3-linux-x86_64
sudo ./elastic-agent install --url=https://fleet.example.com:8220 --enrollment-token=<token>
- Enable Security integrations in Kibana: navigate to Fleet, add Windows, Linux, AWS, Microsoft 365, Okta, and firewall integrations.
- Create ILM and data stream policies for security telemetry retention.
- Enable prebuilt detection rules and tune rule schedules, exceptions, and risk scores.
Code Examples
# /etc/elasticsearch/elasticsearch.yml
cluster.name: sec-prod
node.name: es-data-01
network.host: 0.0.0.0
xpack.security.enabled: true
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/http.p12
discovery.seed_hosts: ["10.0.1.10","10.0.1.11"]
cluster.initial_master_nodes: ["es-master-01","es-master-02","es-master-03"]
{
"policy": {
"phases": {
"hot": {"actions": {"rollover": {"max_primary_shard_size": "50gb","max_age": "7d"}}},
"warm": {"min_age": "7d","actions": {"forcemerge": {"max_num_segments": 1}}},
"delete": {"min_age": "180d","actions": {"delete": {}}}
}
}
}
from elasticsearch import Elasticsearch
es = Elasticsearch("https://es.example.com:9200", basic_auth=("soc_reader", "REDACTED"), ca_certs="/etc/ssl/certs/http_ca.crt")
resp = es.search(index="logs-*,endgame-*", query={"match": {"host.name": "srv-fin-01"}}, size=5)
for hit in resp["hits"]["hits"]:
print(hit["_index"], hit["_source"].get("@timestamp"), hit["_source"].get("event", {}).get("action"))
Security Hardening
- Enforce TLS on HTTP and transport layers with enterprise-issued certificates.
- Use SAML, OIDC, or LDAP for analyst authentication; avoid local superuser accounts for daily operations.
- Apply role-based access control with separate roles for SOC analysts, detection engineers, and platform admins.
- Restrict Fleet enrollment tokens and rotate service account credentials.
- Enable audit logging in Elasticsearch and Kibana.
- Isolate ingest, master, and data roles; place Fleet Server behind a load balancer with restricted ingress.
- Use snapshot repositories with immutable object storage and tested restore procedures.
Comparison
| Feature | Elastic Security | Microsoft Defender XDR | Splunk Enterprise Security |
|---|---|---|---|
| Pricing | Resource and ingestion based; flexible for self-managed or cloud | Bundled with Microsoft security licensing; favorable in Microsoft-centric estates | Typically premium ingestion pricing; can be costly at scale |
| Deployment | Elastic Cloud, self-managed, hybrid | SaaS-first | Self-managed and cloud |
| Scalability | Strong horizontal scaling with tiered storage | High in Microsoft ecosystem, less flexible for custom data pipelines | Strong but often requires careful infrastructure sizing |
| Security | Fine-grained RBAC, TLS, audit logs, endpoint integration | Deep identity and endpoint integration with Microsoft stack | Mature SIEM controls and app ecosystem |
Troubleshooting
1. Agent enrollment failure
Log sample:
{"log.level":"error","@timestamp":"2026-11-14T09:21:33.144Z","message":"fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority","component":{"binary":"elastic-agent"}}
Fix: import the Fleet Server CA to the host trust store or enroll with --certificate-authorities /path/ca.crt.
2. Kibana cannot query Elasticsearch
Log sample:
[2026-11-14T09:28:02.511+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. self signed certificate in certificate chain
Fix: set elasticsearch.ssl.certificateAuthorities in kibana.yml and verify hostname SANs in the Elasticsearch certificate.
3. Shard pressure and rejected writes
Log sample:
{"type":"server","timestamp":"2026-11-14T10:02:19,991Z","level":"WARN","component":"o.e.c.r.a.DiskThresholdMonitor","cluster.name":"sec-prod","message":"high disk watermark [90%] exceeded on [es-data-02] free: 45gb[8.7%], shards will be relocated away from this node"}
Fix: add storage, reduce shard counts, tune ILM rollover, and move older indices to warm or cold tiers.
Best Practices
Do
- Normalize high-value sources first: endpoint, identity, cloud control plane, DNS, and firewall logs.
- Tune prebuilt rules with environment-specific exceptions, for example excluding approved admin tools from noisy process rules.
- Use dedicated data tiers and snapshots for long retention.
- Validate detections with attack simulation and purple-team exercises.
Don’t
- Don’t send every verbose log source before defining retention and use cases.
- Don’t grant
superuserto SOC analysts; create least-privilege roles. - Don’t keep default rule thresholds unchanged in high-volume environments.
- Don’t ignore ingest pipeline failures; monitor
logs-elastic_agent*and dead-letter patterns.
Have a project in mind?
Get an instant AI price estimate for it, or talk directly to our team.
One email a month on what we learn building with AI