How to Integrate Metabase and Opensearch Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

You link metabase and opensearch so your team can build charts from search indexes. This setup lets staff query log and event data through a simple web app. Data teams store millions of fast events inside their search clusters every day. Business users want to read and group those events without writing complex search requests. Linking your business charts tool to your search cluster solves this problem well. Yet a bad setup can expose raw private records to the whole company. How metabase an

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You link metabase and opensearch so your team can build charts from search indexes. This setup lets staff query log and event data through a simple web app.

Data teams store millions of fast events inside their search clusters every day. Business users want to read and group those events without writing complex search requests. Linking your business charts tool to your search cluster solves this problem well. Yet a bad setup can expose raw private records to the whole company.

How metabase and opensearch share data and permissions

The chart app talks to the search cluster over a network link. Since the search cluster stores JSON documents, the two tools need a bridge. Most teams use a community driver or a SQL translation plugin for this job. The chart tool sends a query, and the cluster returns matching document rows.

To make this work, the chart app logs in with a cluster user account. This account holds a role inside the search cluster security plugin. The role tells the cluster which indexes the chart app can read. Once the app logs in, it scans the index fields to build a table map. Users then pick fields in the app to build reports and dashboards.

This data flow relies on one central account for many different people. When ten analysts run charts, the search cluster sees only one service user. You must plan your roles with care so users only read safe indexes.

Common risks with shared accounts and broad network rules

Many teams use an admin account when they first link these two tools. An admin account can read every index and change cluster settings. If someone gets into the chart app, they can read or delete all data. Even without a breach, an analyst might run a huge query that crashes nodes.

Another big risk comes from unlogged queries and shared logins. Because the chart app uses one login, cluster logs do not show who ran a query. Security teams cannot trace which person looked at a sensitive customer index. Also, raw search indexes often hold emails, phone numbers, card numbers, or national IDs. If you share the whole index, those fields show up in charts.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix these issues by setting up strict roles in your cluster. Create a dedicated read-only user just for your chart app. Map that user to a role that only reads specific reporting indexes. Block all write, delete, and cluster management rights for that role. You can also use field-level rules in the cluster to hide sensitive columns.

How to lock down network paths and protect fields

Start by putting both tools inside a private network with strict firewall rules. The search cluster should only accept traffic from the exact IP of the chart app. Never expose your search cluster ports to the public internet. Turn on TLS encryption so data stays safe while moving across the network.

Next, clean up your data before it reaches the chart builders. You can run an ingest step that drops or hashes private fields first. Data masking is another strong way to protect your index records. Masking rewrites matched fields in results, such as turning card numbers into stars. This lets analysts count events and spot trends while keeping private details safe.

Finally, set query limits on your search cluster to keep it fast. Limit how many buckets and rows a single query can pull at once. This stops a bad dashboard from using up all the memory on your nodes.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can Metabase connect to OpenSearch out of the box?

No, the base download does not include a built-in driver for this search engine. You must add a community driver plugin or connect through a supported SQL layer.

How do I stop users from changing data through Metabase?

Create a dedicated user in your search cluster with read-only permissions on target indexes. Never give the chart app account any write, delete, or admin cluster roles.

How can I protect private fields inside my search indexes?

Use cluster field-level security to block sensitive columns from the chart app role. You can also apply data masking so queries rewrite emails and phone numbers in results.

The query runs. The emails stay hidden.