Why OpenBao metrics and audit devices need tight exposure control
Metrics and audit output are sensitive, so their exposure has to be planned before the cluster goes live. Metrics reveal how the cluster is behaving, how many leases and requests it is handling and where capacity is tight, while audit devices record who asked for what, including request paths and parameters that operators would not want copied elsewhere. This page covers the per-listener settings that control whether metrics are served on each listener, how to keep metrics off listeners that face public or wide networks, and how to limit which socket and API-created audit devices can be enabled and where their output goes.
You need this work on any cluster with a listener reachable beyond the operations network, and on any cluster where your compliance team requires audit logging. Teams often find that a listener intended for internal clients is also reachable from a load balancer, a sidecar network or a jump host they did not expect. Review every listener address, its TLS settings and what it serves before you assume metrics stay internal. Also decide who may enable audit devices, since an audit device created through the API is a configuration change that must go through the same review as a file change.
Confirm the exact option names, defaults and behavior before you write configuration. The pillar research for this page does not cover the per-listener metrics settings, the disallow-metrics control or audit device configuration, so do not copy option names from older Vault material without checking them. Read the current OpenBao configuration reference and audit device documentation for the release you run, and test each setting in a non-production cluster. Pair the change with a check that a scrape from an unapproved network fails and that audit output reaches the destination your compliance team has named.
Metrics and audit options and when each fits
This table compares the metrics controls and audit device types you can set on an OpenBao cluster, showing the exposure each creates and where it usually belongs. Read each row as a question to answer for your own listeners and log destinations before you enable it. The main takeaway is that metrics and audit settings are per-listener or per-device choices, so each one needs its own placement decision and its own vendor-doc check.
| Option | Exposure it creates | Typical placement | Confirm in vendor docs |
|---|---|---|---|
| Per-listener metrics_only | Limits a listener to metrics endpoints, so scrapers can reach telemetry without reaching the secrets API | A dedicated internal listener for the monitoring network | Exact endpoints served and how it interacts with the main listener's TLS settings |
| Per-listener disallow_metrics | Blocks metrics on a listener, so a public or client-facing listener does not expose telemetry | Any listener reachable from untrusted networks, including load balancer front ends | Which paths are blocked and whether health checks still respond on that listener |
| Metrics on a public listener | Telemetry about token use, request volume and internal health is readable by anyone who can reach the port | Generally avoid; keep metrics off listeners exposed beyond the trusted network | Whether unauthenticated scrape access is possible on each listener type |
| Socket audit device | Writes audit entries to a local socket, so the receiving process and its permissions define who can read or drop logs | Local agent or log shipper on the same host, with restricted socket file permissions | Socket ownership and failure behavior when the receiver is unavailable |
| File audit device | Writes audit entries to a local file, so file permissions, rotation and disk space determine integrity and availability | Dedicated volume with restricted ownership and a forwarder that reads without modifying | Rotation handling, file mode defaults and what happens when the disk fills |
| API-created audit device | Any caller with the right policy can add or change an audit sink at runtime, which can expand or redirect where secrets-related data is written | Usually restricted to a small set of administrative identities, with the device list reviewed as configuration | Which capabilities govern enabling and disabling audit devices, and whether a sink can be enabled without a matching fail-closed setting |
| Audit device fail behavior | If every audit device fails, requests can be blocked or served unlogged depending on configuration | Keep at least one reliable sink and test the failure path before production | The documented behavior when an audit device cannot write and how it is configured |
How metrics reach a listener and why public listeners are the risk
A listener is the network endpoint OpenBao binds to, and the listener configuration decides which paths it serves. That makes the listener the first place to check when telemetry might reach a client that has no business seeing it. A listener bound to a public address, a shared load balancer or a network segment that application users can reach can expose operational data such as metrics to clients that were never meant to read it. The exposure is a property of where the listener sits, not only of what the client is allowed to do with the API.
The safer pattern is to separate the client-facing API from the operational surface. Application and automation traffic goes to one listener, while operators, monitoring systems such as Prometheus scrapers and health checks use a separate listener or a restricted path on a network you control. Confirm the exact configuration keys for listener addresses, telemetry options and per-listener controls in the OpenBao configuration reference before you write any file, because key names and their behavior change between releases. Your architecture review should record which networks each listener is reachable from and who can route to it.
Treat each listener as a trust boundary. Traffic that crosses from a shared network into the operator network, or from a tenant-facing segment into the cluster, should be a deliberate decision with a named owner. Ask your platform team to diagram every listener, its bind address, its load balancer or ingress rule and the firewall policy around it. Then confirm, in a test environment, that a request to the metrics path from outside the intended network fails. Do not assume a default is safe for your topology; verify it against your own network layout.
Where metrics and audit devices sit in the trust boundary
The diagram starts with clients and monitoring on separate networks. Client applications reach the API listener on the client network, while the monitoring system scrapes the metrics listener only from the operations network. The public listener is the boundary to avoid: nothing should expose metrics there. Audit devices write to a log pipeline that the security team controls, so check that each device path and destination is reviewed and that no client can add devices through the API.
Metrics and audit paths kept separate from client traffic.
How to configure metrics and audit devices on a production cluster
This sequence keeps OpenBao metrics off public listeners and puts every audit device under administrative control, so that exposure and logging gaps are found and closed before go-live. Each step ends with a check you can repeat after every change.
Inventory listeners and network paths
Start by listing every listener block in each node's configuration, including its address, port, TLS settings and whether it is reachable from the public internet, the corporate network or the operations network. Record which load balancers, ingress rules and firewall zones route to each address. Confirm the result with the network team, because a listener that looks internal can still be published through a load balancer. The step is done when you have a written map of listener, network path and intended audience for every node in the cluster.
Decide which listeners serve metrics
Assign metrics to the listener that your monitoring system reaches, typically one on the operations network, and make no other listener serve them. Check the current OpenBao listener documentation for the exact per-listener options, including how metrics-only behavior and disallowed metrics are expressed, and confirm the option names against the release you run. Write the decision next to each listener in your map. The step is done when every listener has an explicit role: client API, cluster traffic, metrics only, or none of these.
Apply per-listener settings to every node
Update the listener blocks on each node so the metrics-only setting applies to the monitoring listener and the disallowed-metrics setting applies to public and client listeners. Apply the same change to every node through your configuration management, and restart or reload each node as your deployment requires. Do not rely on one node having the correct file, because a single misconfigured standby can expose metrics. The step is done when a configuration diff across all nodes shows identical listener roles.
Lock down who can enable audit devices
Review the policies and tokens that can call the audit device endpoints, and remove that capability from everything except a small administrative group. Audit devices can be created through the API as well as in the configuration file, so both paths must be reviewed. Record who holds the capability and how changes are approved. The step is done when a test token without the capability is refused when it attempts to enable an audit device, and the refusal is itself recorded.
Configure file or socket audit output
Enable at least one audit device that writes to a file or socket that your log pipeline collects, and confirm the path, permissions and rotation policy with the team that owns logging. Keep the file or socket writable only by the OpenBao process and the collector, and make sure a failed audit write has a defined response in your runbook. Confirm which fields are hashed or redacted in the output before you rely on it for investigations. The step is done when the device appears in the audit device list on every node.
Probe each listener from each network
From a host on the public network, send an unauthenticated request to each listener and confirm that it is refused or unreachable, and that no metrics endpoint responds. From the operations network, confirm that the metrics endpoint answers with an authenticated or permitted request as your monitoring design requires. Run the same probes against every node, not only the leader. The step is done when a written probe log shows the expected result for each listener and node pair.
Verify audit entries reach the log pipeline
Perform a harmless authenticated request, then search the log platform for the matching audit entry, checking that the timestamp, request path and identifiers are present and that secret values are not. Repeat the check on each node, because each node writes its own audit output. Confirm that the alerting rule for audit gaps fires if the device is disabled in a test window. The step is done when every node's entries appear in the pipeline and the gap alert is confirmed.
Re-verify after every configuration change
Repeat the listener probes, the audit device list check and the pipeline check after each upgrade, configuration change, node addition or network change. Treat a changed load balancer rule or a new listener as a reason to repeat the full sequence, not only the changed item. Store the probe logs with your change records so an auditor or incident responder can see the state at each date. The step is done when the change record links to a fresh set of passing checks for every node.
Socket audit devices versus file audit devices
A socket audit device sends each audit entry to a network or local socket, where a separate process receives and stores it. OpenBao does not store that output for you, so the design depends on the receiver being reachable, running and able to keep up with request volume. Confirm in the OpenBao audit documentation exactly what the server does when the socket is unavailable or the receiver stops reading, because that behavior determines whether requests can be blocked or proceed without a record.
- Receiver ownership: Name the team that runs the receiving process, its service account, and its restart policy.
- Socket availability: Decide whether the socket is a local Unix socket or a network endpoint, and who controls its network path and firewall rules.
- Failure behavior: Confirm, against the current docs and your version, whether requests fail or continue when the socket cannot accept writes. Do not assume either outcome.
- Backpressure testing: Simulate a stopped or slow receiver in a non-production cluster and observe request latency and error rates.
- Receiver storage: Check that the receiver has its own retention, disk capacity and integrity controls, separate from OpenBao's host.
Before production, confirm the failure behavior for your OpenBao version and record the result as part of the audit design.
A file audit device writes entries to a path on the OpenBao host. It removes the dependency on a separate receiver, but it moves risk onto the local disk: a full volume, misconfigured permissions or missing rotation can all lead to lost or exposed audit data. The file also needs to leave the host through a shipping pipeline if the organization expects central retention and tamper resistance.
- Disk capacity: Size the volume for expected request volume and retention, and alert well before it fills.
- Rotation: Plan how files are rotated and whether OpenBao or an external tool handles rotation, then test that rotation does not interrupt logging.
- Permissions: Restrict read and write access to the OpenBao service account and the shipping agent, since audit entries can contain sensitive request metadata.
- Shipping: Choose the agent that moves files off the host, confirm its handling of partial writes and restarts, and monitor its lag.
- Host compromise: Treat the host as a place where local entries can be altered, and forward copies to storage the OpenBao administrators cannot edit.
Test a full disk and a rotation event in staging, and confirm the resulting behavior before relying on the file device.
Most deployments benefit from a documented decision for each audit device: which output type it uses, who owns the receiver or shipping path, and what happens during failure. The choice is less about which type is better and more about which failure modes your team can monitor and recover from. Both types need a written test plan that runs before go-live and after each upgrade.
- Device inventory: List every enabled audit device, including any created through the API, with its type and destination.
- Failure drill: Stop the receiver or fill the disk in staging, then record what OpenBao and clients do.
- Monitoring: Alert on receiver health, socket errors, disk usage and shipping lag.
- Retention: Set retention periods with the compliance owner and confirm they apply to every device.
- Change control: Require review before any new audit device is created, since API-created devices change logging without a configuration file change.
Record the drill results and the owner of each device in your runbook, and repeat the checks after each OpenBao upgrade.
Security risks in metrics and audit exposure
Metrics and audit devices are easy to overlook because they run quietly beside the secrets engine. Each card below names one exposure path that follows from OpenBao's trust model, along with the check to run against your own listener and device configuration.
Metrics expose cluster internals
Metrics describe request rates, seal state, storage behavior and cluster health. Anyone who reads them learns when your cluster is busy, under stress or about to fail, which helps an attacker time activity. Check which listeners answer metrics requests and confirm that none of them is reachable from untrusted networks. Confirm the exact per-listener settings in the OpenBao configuration reference for your version.
OpenBao docsAudit logs hold sensitive requests
Audit logs record requests and responses, and parts of them can contain sensitive values unless OpenBao's HMAC handling covers them. Treat audit output as sensitive data in its own right, with restricted read access, encryption at rest and a defined owner. Confirm which request fields your audit device hashes and which it writes in clear text before you grant anyone log access.
API-created audit devices redirect logging
A token with permission to manage audit devices can enable a new device that writes elsewhere or disable the existing one, which removes accountability for later actions. Limit which policies may touch the audit endpoints and alert on any change to them. Confirm the audit-related capabilities in your policies and which identities hold them.
Socket receivers open a new path
A socket audit device sends logs to a network endpoint, which adds a connection that must be authenticated, encrypted and kept available. If the receiver is down or blocked, the choice of failure behavior decides whether OpenBao keeps serving requests. Document the receiver address, the transport and the failure behavior, and test what happens when the receiver stops.
Log tampering and retention gaps
Audit trails are only useful if they are complete and kept long enough for investigation. Logs written to a host that the same administrators control can be altered without trace, and rotation or shipping gaps can hide activity. Confirm where logs are copied, who can delete them and how long your retention policy requires them to remain available.
Monitoring credentials scoped too broadly
Dashboards and scrapers need to read metrics, but a monitoring token with broad policies can also read secrets or manage the cluster. Give monitoring identities only the metrics or health capabilities they need, and keep them separate from operator and application identities. Confirm the monitoring identity's effective permissions with a policy review before it goes into production.
Why API-created audit devices need change control
Audit devices can be created through the API, so any token that holds the right capability can add a new audit destination or change an existing one. That makes who holds the capability to manage audit devices a security decision, not an administrative detail. A token with that power could add a device that writes audit data somewhere your team never reviews, or alter a device so that audit records stop reaching the system your security operations team watches. Before you deploy, confirm the exact capability names and paths that control audit device management in the OpenBao documentation for your version, and list every policy that grants them.
Treat audit device changes like any other change to a control plane. Keep the capability out of application and pipeline policies, and grant it only to a small, named administrative role. Require that each change to an audit device is requested, reviewed by a second person and recorded with the reason, the destination and the approver. Confirm how your identity provider and auth methods map people to that role, so that a compromised or departed account does not keep the ability to change logging. The policy work itself is covered in the least-privilege policies topic, and the handling of root tokens is covered in the root token topic, so the question here is narrower: who is allowed to change where audit data goes, and who checks it.
Check the audit device list after every deployment, upgrade and scheduled review. Run bao audit list against each cluster and compare the output with an approved inventory that names each device, its type and its intended destination. Flag any device you did not expect, any device whose options differ from the inventory, and any gap where the expected device is missing. Store the output with the change record so that an auditor can see the state of the cluster at a given point. If your review process does not include this comparison, add it as a standing step, because an unexpected device is easy to miss when the cluster is otherwise healthy.
Limits to confirm in your environment
The metrics and audit settings in this topic depend on the OpenBao version you run, the monitoring stack you already operate and the network your cluster sits in. The cards below list what to confirm in your own environment before you treat the exposure as closed.
Exact keys and behavior by version
Confirm the exact listener keys, such as metrics_only and disallow_metrics, against the configuration reference for the OpenBao version you run. Behavior can differ between minor lines, and the 2.7.x line is not the same as the 2.6.x line you may still be on. Test each listener after an upgrade, because a key that worked before may be ignored, renamed or changed in default.
Audit device creation controlled by policy
Determine whether your policies can stop a privileged token from enabling, disabling or listing audit devices through the API. Confirm which paths and capabilities govern audit device management in your version, and test with a non-root token that holds broad but not total access. If policy cannot restrict this path, treat audit device control as an operational procedure that needs monitoring.
Audit output failure behavior
Find out what OpenBao does when an audit device cannot write, such as a full disk, a broken socket or an unreachable log receiver. Whether requests are blocked or continue unlogged decides how much an audit outage affects availability. Test the failure with a staging cluster and record the result in your runbook before relying on any audit device.
Metric names and retention
Map the metric names OpenBao emits to the dashboards and alert rules in your monitoring stack, and confirm how long your platform keeps them. A setting that hides metrics from a public listener does nothing for alerts if your scraper no longer reaches the private listener. Check that scrape jobs, alert queries and retention periods still work after you change the listener settings.
Network placement in your environment
Confirm which networks can reach each listener in your cloud account, data center or air-gapped segment, including load balancers, sidecars and jump hosts that may forward traffic. Security groups, firewall rules and ingress controllers often expose a port that the configuration file never mentions. Verify placement with a scan from outside the intended network, not only with the configuration review.
Audit retention and compliance mapping
Decide how long audit records must be kept and where they are stored, which depends on the frameworks your organization is assessed against. The compliance group covers this mapping in detail, so here confirm only that your audit devices write to the destination that the retention plan names. Confirm the destination's access controls and integrity protection with the team that owns the log platform.
Questions teams ask about metrics and audit exposure
How much does restricting OpenBao metrics and audit exposure cost, and is it one-time or recurring?
The core review and fix is a one-time piece of work, but it is priced from the written scope, and DeployOpen does not publish a price list. The main cost drivers are the number of clusters, the number of nodes per cluster, and how many listeners, log destinations and audit devices each node has. Recurring cost appears when the change is repeated: each new cluster, each new listener, and each upgrade that changes configuration or defaults. Ask the quote to separate the one-time review from any retainer for re-checking after upgrades, and ask what is included in the retest.
How long does a single OpenBao cluster review take?
Duration depends on the cluster's shape and on how quickly the required inputs arrive, so no fixed figure applies. The biggest drivers are the number of nodes, whether metrics are scraped through a shared monitoring path or several, how many audit devices are enabled, and whether socket audit devices forward to a log pipeline that must be traced end to end. Compliance review needs also add time, because evidence must match what an assessor will ask for. Ask for the timeline in the written scope, with the inputs listed as dependencies.
What must our team provide before a metrics and audit review starts?
Expect to supply four kinds of input, and the review moves only as fast as these arrive:
- Network diagrams showing which listeners sit on which network segments, including load balancers and any public path
- The listener and telemetry configuration for each node, including the settings that control metrics exposure and unauthenticated access
- Log pipeline details: where audit logs are written, which agents or collectors read them, retention, and who can read the stored logs
- An access roster of people and service accounts that can query metrics, read audit output or change audit devices
The exact configuration keys are confirmed against the OpenBao version in use.
Can an internal engineer restrict metrics and audit devices alone?
Yes, a capable platform engineer can make the configuration changes alone, provided they can read the OpenBao configuration reference for their version and can test changes in a non-production cluster first. The harder part is the verification and the cross-team work: confirming that monitoring still scrapes what it needs, that audit logs still reach the security team, and that no public path reaches a metrics endpoint. Teams often find that the monitoring owner and the security owner must agree on the change before it is made. An outside review adds an independent check, which compliance teams sometimes require.
Why does an OpenBao upgrade change metrics and audit behavior?
Upgrades can change defaults, add settings, or alter how listeners and audit devices behave, so a configuration that was safe on one minor line can need review on the next. Check the release notes for the target version before upgrading, and do not assume that a setting you previously chose still applies unchanged. After each upgrade, repeat the listener, metrics and audit checks, because the restricted state is only as good as the most recent verified configuration. Keep the check as a repeatable runbook so it is run each time, not only at the first deployment.
How do we verify that metrics and audit exposure is actually restricted?
Verify from outside the cluster as well as from its configuration files. Confirm that metrics endpoints are unreachable from public networks and from clients that should not query them, and that the authorized monitoring path still succeeds. Confirm that every enabled audit device writes records, that socket audit targets are reachable and failing safely, and that API-created audit devices appear in the expected inventory with the expected owner. Record the results as evidence with dates and the version tested, so an assessor or auditor can compare them over time.
Does compliance review change the scope or the cost?
Yes. When an assessment is involved, the work includes mapping the configuration and log handling to the controls the assessor will test, collecting evidence in a form they accept, and keeping that evidence current. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications, which independent auditors and certification bodies provide. Ask the quote to state which framework and which evidence set are in scope, since that changes effort more than the raw node count does.
How DeployOpen scopes and delivers OpenBao hardening
DeployOpen treats metrics exposure and audit device configuration as part of the OpenBao deployment, not an afterthought. We scope the listeners, telemetry endpoints and audit paths in your environment, build and test the restrictions in your infrastructure, and hand over the configuration with evidence your security and compliance teams can review.
How we scope
- Inventory every OpenBao listener and record which ones are reachable from public, partner or internal networks.
- Agree in writing which metrics endpoints are exposed, to whom, and through which scrape path.
- Map each audit device to its destination, owner and retention requirement before any change is made.
How we build
- Apply per-listener metrics settings so telemetry stays on internal listeners and off public ones, then verify each listener separately.
- Review socket and API-created audit devices, restricting who can create or disable them and confirming log destinations are reachable.
- Test negative cases from outside the trusted network to confirm metrics and audit configuration cannot be read or changed by unauthorized clients.
How we hand over
- Deliver the final listener, telemetry and audit configuration files with a record of each setting and its reason.
- Document the test results, including the commands used to confirm restrictions, so your team can rerun them.
- Walk your operators through alerting on audit device failures and on changes to audit or telemetry settings.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ask for a quote based on your written scope, which lists the listeners, audit devices and environments included.
- Ongoing support, upgrades and continuous testing are available as a retainer, including rechecks after OpenBao version changes.

