How to Configure Couchbase Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a couchbase audit log by turning on auditing in cluster settings. Then you pick a local folder on each node to store the event files. Most engineering teams start by turning on all cluster events at once. They give database admins broad roles to read and write these settings. When roles are too broad, one person can change rules or delete records. Shared accounts also make it hard to see which person ran a bad query. How the couchbase audit log works across a cluster The database t

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 set up a couchbase audit log by turning on auditing in cluster settings. Then you pick a local folder on each node to store the event files. Most engineering teams start by turning on all cluster events at once. They give database admins broad roles to read and write these settings. When roles are too broad, one person can change rules or delete records. Shared accounts also make it hard to see which person ran a bad query.

How the couchbase audit log works across a cluster

The database tracks actions at the node level across your whole cluster. Each server node watches for login events, role changes, and data reads. When an event happens, the node writes a record to a local file. You must set up a folder path on every node in the cluster. The database rotates these files based on size or time rules you pick. Security teams then run a log shipper on each host machine. This tool reads the local files and sends them to a central store.

You can filter which events the cluster writes to disk. Tracking every single document read creates huge files and slows down disk drives. Most teams choose to log admin changes, failed logins, and query runs. You can also set up a list of ignored users for noisy apps. This stops service accounts from filling up your disk space with routine checks. Still, any user on the ignore list skips the tracking process.

What native logging solves and where gaps remain

Native cluster logs give you a solid record of past server events. They show you when a user logged in and changed a bucket setting. They also help you spot failed login spikes from bad actors. If a node crashes after a setting change, the file shows who did it. This helps teams pass basic audits and fix broken cluster states.

Yet native logs only tell you what happened after the fact. Cluster roles decide who can log in, not what each query does live. If a developer has read rights, they can pull whole buckets of data. The log will record the query, but it will not mask fields. Raw emails, phone numbers, and card numbers still reach the user screen. Also, teams often share one admin login during an urgent outage. The native log only records that shared role name, not the real person.

Audit Log Integrity + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why local node files create extra work for ops teams

Storing event files on each database node adds work for your ops team. If a node runs out of disk space, you lose new event records. Admins with host login rights can also edit or wipe those local files. You have to build and watch a pipeline to move files off nodes. When you add new nodes to scale up, you must set up shipping again. If the shipper breaks on one host, you get blind spots in your records.

To stay safe, teams need a way to check queries before they run. They also need to tie every action to a single person, not a shared key. Rewriting sensitive fields like national IDs in results keeps private data safe during fixes. Stopping bad deletes in flight is much safer than reading about them later.

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 sits inline in the protocol beside each supported service as an open-source proxy, a sidecar for your database or API. For every query or command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.

First, hoop.dev guardrails block banned queries before they run or hold risky ones for review, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Does turning on the couchbase audit log slow down the cluster?

It can if you log every single document read and write event. Most teams only log admin actions, logins, and query runs to save disk speed.

Where does the database save its audit event files?

Each node writes its own event files to a local disk folder you pick. You need a separate tool to move those files to a central server.

Can native database logs hide private data inside query results?

No, native logs only write down that an event happened on the server. They do not change query results or mask fields like emails and card numbers.

The query runs. The emails stay hidden.