Elasticsearch Object Storage

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up elasticsearch object storage by linking a cloud bucket as a snapshot repo. The cluster then writes index segments to that bucket for backup or cold storage. Most teams start by creating a storage role with read and write rights. If those rights are too broad, a single mistake can wipe out old backups. Broad roles also let users pull sensitive production logs back into test clusters. How elasticsearch object storage works in practice Elasticsearch uses local disks for hot data that

Elasticsearch Security + Insecure Direct Object References (IDOR): the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up elasticsearch object storage by linking a cloud bucket as a snapshot repo. The cluster then writes index segments to that bucket for backup or cold storage. Most teams start by creating a storage role with read and write rights. If those rights are too broad, a single mistake can wipe out old backups. Broad roles also let users pull sensitive production logs back into test clusters.

How elasticsearch object storage works in practice

Elasticsearch uses local disks for hot data that changes often. Local SSDs are fast, so they handle fresh writes and heavy search traffic well. Over time, log data grows huge and costs too much on fast local disks. That is where remote cloud buckets step in to lower your storage bill.

You first create a bucket in your cloud provider and set up access credentials. Next, you register that bucket inside the cluster as a snapshot repo. The cluster nodes use those credentials to write compressed index files to the bucket. Each snapshot only copies new segments that are not in the bucket yet.

Modern clusters can also search those remote buckets without full restores. You assign older data to warm, cold, or frozen storage tiers. Index lifecycle rules move older indices from local disks into the remote bucket. When a user runs a search, the cluster fetches only the needed data blocks. A small local cache holds recent reads so repeat queries stay fast.

What native storage roles solve and what they miss

Native cloud roles and cluster privileges control which nodes and admins manage repos. You can give a production cluster write access and a staging cluster read access. Inside the cluster, role settings decide which users can run snapshot or restore calls. This setup stops unauthorized staff from deleting buckets or adding fake repos.

Still, storage and cluster roles only check who logs in at the start. They do not inspect what individual search queries or admin calls do in flight. An engineer with snapshot restore rights can pull customer records into an unsafe index. Once an index is mounted, anyone with read rights can query every field inside.

Elasticsearch Security + Insecure Direct Object References (IDOR): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Cold and frozen indices often hold years of old app logs and user events. Those old logs frequently contain raw emails, phone numbers, card numbers, or national IDs. Native bucket permissions cannot hide those fields when a developer runs a broad search. Teams also lack a clear audit trail tying each search request to a user. Without query-level checks, one wide search can expose years of archived personal data.

Managing lifecycle rules and restore access

To keep risk low, split your buckets by data sensitivity and environment. Never let a test or staging cluster write to a production snapshot bucket. Give each cluster its own cloud role scoped to a single bucket path. Review your index lifecycle rules so sensitive indices expire on a strict schedule.

You should also restrict who can mount searchable snapshots or change repo settings. Keep admin rights limited to automated deployment tools and a small on-call group. When engineers need to debug old data, check every query they send. Apply data masking to rewrite emails and card numbers in the search results. This keeps archived data useful for debugging while keeping sensitive fields safe.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Can Elasticsearch run directly on object storage without local disks?

No, nodes still need local disks for hot writes and temporary cache files. Remote buckets store snapshots and back cold or frozen tiers to cut disk costs.

How does searching data in a remote bucket affect query speed?

Queries against remote buckets take longer than queries on local SSDs. The cluster downloads required data blocks on demand and caches them on local disk.

How do we protect sensitive fields stored in old snapshots?

Encrypt the cloud bucket at rest and limit who can mount or restore snapshots. Use query-level masking to rewrite emails, phone numbers, and card numbers in search results.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.