OpenBao Proxy for applications that call the API directly

OpenBao Proxy runs beside an application that already speaks the OpenBao or Vault API, so the app keeps its code while the proxy handles authentication and caching. This page covers how to set it up, the trade-offs, and when Agent is the better choice.

On this page

What OpenBao Proxy does for applications that call the API directly

An application that already calls the OpenBao or Vault API can keep its existing client code and still avoid carrying login logic of its own. OpenBao Proxy is the component that handles this. It runs as a separate process next to the application, listens on a local address, and forwards each request it receives to the OpenBao server. Because the application talks to the local listener instead of the cluster, the team does not have to add an auth method, token renewal or retry handling to the application code. The Proxy obtains a token through its configured auto-auth method, attaches that token to forwarded requests, and can cache responses so repeated reads do not each travel to the server. The exact listener settings, auto-auth blocks and cache options are defined in the OpenBao documentation, so the team should read the Proxy configuration reference for the version it plans to run before writing its own file.

Teams usually reach for Proxy when they have several services or a legacy application that already uses the API, and changing each one to log in separately would cost more than the value it adds. The decision is usually between Proxy and OpenBao Agent. Agent can also authenticate and render secrets, but it is built around files and templates for configuration. Proxy fits better when the consumer is an HTTP client that issues its own API calls. Before committing, confirm three things in your own environment: that every client can be pointed at a local address without hard-coded cluster URLs, that the token Proxy holds has only the policies the consumer needs, and that the cache setting is acceptable for each path it will serve. A cached response for a path that changes often can return stale data, so cache rules should be set per use case and tested.

The main risk is that the Proxy becomes a shared identity. Anyone or anything able to reach its listener can use the token it holds, so the listener should be bound to an address reachable only by the local consumer, and each host or pod should run its own Proxy with its own auto-auth identity. Ask your security team to review the listener binding, the policy attached to the auto-auth role, and where Proxy writes its token and logs. Plan a test that confirms a request without the expected identity is refused and that a revoked credential stops working through the Proxy. Those checks, along with the list of which clients use which Proxy, are what an auditor or incident responder will ask for first.

How requests flow from the app through Proxy to OpenBao

The flow starts with the application sending ordinary OpenBao or Vault API calls to a Proxy listener on the same host. Proxy uses auto-auth to obtain and renew a token, which it attaches to each forwarded request, and it can answer repeated reads from its cache before anything leaves the host. Check the boundary where requests cross from the host into the cluster, because that is where TLS, network policy and token scope must hold.

Proxy sits beside the app, and the host-to-cluster boundary is where requests leave the host.

Proxy options and when each one fits

This table compares the main Proxy settings for an application that already calls the OpenBao or Vault API directly. Read each row as a question: which option fits your application's token handling, caching needs and network layout, and what risk it adds if you enable it. The main takeaway is that the proxy removes token handling from application code, but every shortcut it offers moves risk to the proxy host and its configuration.

OptionWhere it fitsRisk to plan for
Auto-auth token useApplication sends requests without a token and the proxy logs in with a chosen method and injects its own tokenThe proxy host becomes a credential holder; confirm which auth method and token sink you will use and who can read the sink file
Forcing the proxy token on client requestsApplications that send their own token header can be overridden so every call uses the proxy token and its policiesClients lose the ability to act under their own identity in OpenBao audit logs; review policies before forcing the token
Response cachingApplications repeatedly read the same leased secrets or tokens and you want fewer calls to the clusterCached responses persist beyond intended lifetimes if caching is persistent; confirm cache location, permissions and behavior on restart
Listener and TLS settingsLocal listeners on a loopback or pod-local address let applications reach the proxy without exposing it to the networkA plaintext or unauthenticated listener exposes secrets to any process that can reach it; confirm bind address and TLS for every listener
Template or sink usageApplications read secrets from files or templated output the proxy writes, instead of calling the API themselvesWritten files outlive the process and can be read by other users; confirm file modes, ownership and cleanup
Agent instead of ProxyApplications need rendered files, environment variables or process supervision that the Proxy does not provideAgent adds configuration surface; confirm which features you need before choosing it over Proxy

Choosing Proxy or Agent for a given application

Applications that already use the OpenBao or Vault HTTP API, through an SDK or hand-written requests, are the strongest case for Proxy. The application keeps its client code and points its address at a local listener. Proxy handles authentication and token renewal, so the code does not need to know how the token was obtained. Changes in the application are usually limited to configuration, but that depends on whether the client library lets you set the address and token source.

  • Minimal code change: The application sends requests to a local address, and Proxy forwards them to the cluster.
  • Token handling in one place: Proxy performs auto-auth and keeps the token renewed, so the application carries no login logic.
  • Caching for repeated reads: Proxy can cache responses for leased secrets and tokens when the application reads the same values often.
  • SDK behavior: Confirm that your SDK version lets you override the address and does not set its own token header in a way that conflicts with the proxy token.

Check whether the client library accepts a configurable address and whether it sends its own token, because that decides whether the proxy token can be forced.

Setting up Proxy beside an application step by step

This sequence takes an application that already calls the OpenBao or Vault API and places OpenBao Proxy beside it, so the application reaches the cluster through a local address with a token the proxy manages. Each step ends with a check you can run before moving on.

  1. Confirm cluster version and auth method

    Before changing anything, record the OpenBao cluster version and the auth method the application's workload will use, such as AppRole, Kubernetes, JWT/OIDC or a token file. The auth methods documentation lists what the project supports, and the releases page shows which minor line you are running. Confirm with the platform team that the auth method is enabled and that a role or policy exists for this application with only the paths it needs. Done when you can log in with that method from the host using a test call, and the response returns a client token with the expected policies.

  2. Configure auto-auth in the proxy

    Write the proxy configuration file with an auto_auth block that names the chosen method and its mount path and role. Set the sink that writes the token to a file readable only by the application's service account, since that file is what the proxy uses to attach credentials to forwarded requests. Keep role identifiers and secret IDs in files with restricted permissions, not in the configuration itself. Done when the proxy starts, logs a successful authentication, and the sink file exists with the expected file mode and owner.

  3. Define the listener and token handling

    Add a listener block that binds the proxy to a loopback or private address that only the application host can reach, and set whether the proxy forces its own token onto forwarded requests. Forcing the proxy token prevents the application from sending a different token, which keeps credential use inside the proxy's policy. Enable caching only after you have confirmed the application's request pattern. Confirm the exact configuration keys against the Agent and Proxy documentation for your version, since names can differ between releases. Done when the proxy listener accepts connections and a request without a token returns the proxy-injected result rather than an authentication error.

  4. Point the application at the local address

    Change the application's configured OpenBao or Vault address to the proxy listener, for example in an environment variable or configuration file, and remove any hard-coded token that the proxy now supplies. Keep TLS settings aligned with the listener so the client trusts the local endpoint. Restart the application in a test environment first. Done when the application starts without errors and its startup log shows it reading the address you configured, not the cluster address.

  5. Verify requests succeed

    Exercise the paths the application uses in normal operation, including one read of a secret it depends on and any dynamic credential request. Check the proxy access log and the cluster audit log to confirm each request arrived through the proxy and was authorized under the expected policy. Also test one path the role should not reach, which should be denied. Done when the permitted calls succeed, the denied call fails with a permission error, and the audit entries identify the application's role.

  6. Verify tokens renew and recover

    Check that the proxy renews its token before expiry and re-authenticates when renewal is no longer possible. Look for renewal entries in the proxy log and confirm the token's remaining time keeps resetting over a period longer than the token's initial TTL. Then restart the proxy and confirm the application's next request still succeeds without manual intervention. Confirm the expected renewal behavior with your cluster's token and lease settings. Done when renewal and re-authentication are visible in logs and the application continues to work after a proxy restart.

  7. Document and hand over the configuration

    Record the proxy version, auth method, role name, policy, listener address, sink path and the checks you ran in the runbook for this application. Store the configuration in version control with secret material excluded, and note who owns the role and how credentials are rotated. Confirm with the operations team which alerts they will watch, such as failed authentication or token renewal errors. Done when the runbook lists these items and a second engineer can reproduce the setup from it.

Security and operational considerations for the proxy token

OpenBao Proxy holds or forwards a token that can read secrets on behalf of every application behind it, so its own credentials, the files it writes and the responses it caches all carry the access. The cards below cover one risk and one control each, and they are the items to review before the proxy goes into a shared network segment.

Protect the auto-auth credential

The auto-auth method, such as AppRole or a Kubernetes service account, is the secret that lets the proxy log in. Anyone who can read its role ID and secret ID or its mounted token can act as the proxy. Restrict the file permissions on the credential, limit the policy attached to the proxy's role to the paths the applications need, and confirm that the credential is delivered by a trusted process rather than baked into an image.

Lock down the token sink

The token sink is the file where the proxy writes the token that applications use. Any process on the host that can read that file can use the token, so the file should be owned by the proxy's service account and readable only by the applications that must call the API. On shared hosts, check the directory mode as well as the file mode, because a readable parent directory can expose a token that is correctly protected.

Limit what the forced token can do

A forced token is a token the proxy applies to every request an application sends, regardless of what the application asks for. Attach a narrow policy to the token role and test it with the exact paths each application calls. Treat any path that the policy allows as reachable by every client behind the proxy, because the proxy does not separate callers.

Cache only what can be cached

The proxy's cache keeps tokens and leased secrets in memory, and an optional persistent cache can write them to disk. A cached lease that a client receives is valid until it expires or is revoked, so a revoked credential may still be served from cache. Decide which request paths are cached, keep the persistent cache off unless it is needed, and check that revocation of a lease reaches the proxy's cache before relying on it for incident response.

Control what the proxy logs

Proxy logs record requests, errors and token events, and a debug setting can expose more detail than operators expect. Confirm that log output does not include tokens, secret values or full response bodies, and that log files have restricted permissions and retention that matches your policy. Send the logs to a central store that your security team reviews, and test that a sample request leaves no secret in the output.

Plan for proxy restart

When the proxy restarts, it loses in-memory cache entries and must authenticate again before it can serve requests, so applications may see a short period of errors. If the cache is persistent, leases written to disk survive the restart and must be reviewed. Rehearse a restart in a test environment, confirm that the applications retry on failure, and record how long the proxy takes to become ready again in your environment.

Questions teams ask before setting up OpenBao Proxy

What drives the cost of setting up OpenBao Proxy?

The main cost driver is how many applications, environments and auth paths the proxy must serve, not the proxy binary itself. Cost is mostly people time: designing the auth method and token policies, configuring the proxy beside each application, testing that clients still work with a proxy token, and wiring caching and monitoring. Ask any partner to price these as separate line items, and ask what is one-time (design, build, handover) and what recurs (upgrades, policy changes, support). A quote should follow from a written scope that lists the applications and environments in play.

How long does an OpenBao Proxy setup take?

Duration depends on scope: the number of applications that call the API directly, whether the auth method already exists, and how many environments need the same pattern. A single application on an existing OpenBao cluster with an auth method in place is a much smaller piece of work than a fleet across several environments with new auth methods. Ask for a timeline tied to the written scope, with the dependencies listed (cluster access, approvals, test environments) so delays are visible early.

What must our team supply before the work starts?

Plan to supply four things: a running OpenBao or Vault-compatible cluster your team can reach, a chosen auth method for the machines that will run the proxy (AppRole, Kubernetes, JWT or another method your environment supports), network paths from application hosts to the proxy listener and from the proxy to the cluster, and a list of applications with their secret paths and policies. Access to test environments and a named owner for approvals reduce the most common delays.

Can our own engineers set up OpenBao Proxy in-house?

Yes, if your team already runs OpenBao or Vault, understands token lifecycles and policies, and can test application behavior against a proxy. The work is not large in isolation, but mistakes in token handling, policy scope or caching can expose secrets or break applications in ways that only appear under load or during restarts. In-house teams should confirm the proxy listener is reachable only from the intended hosts and that tokens are not logged. Team capacity, not technical access, is usually the limiting factor.

When is outside help worth it for an OpenBao Proxy setup?

Outside help is worth considering when the setup spans many applications, when your cluster is still being built or migrated, when auditors or security reviewers need documented controls, or when no one on the team has run a proxy beside an application before. DeployOpen implements, hardens and documents self-hosted open-source platforms in your own infrastructure, and most engagements are fixed-scope with scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not issue audit reports or certifications; independent auditors do that.

Does OpenBao Proxy make applications more secure by itself?

No. The proxy reduces how often applications handle long-lived credentials, but its security depends on the auth method, the scope of the token it uses, the policies behind it and where its listener is exposed. Teams should confirm that the proxy token is limited to the paths each application needs, that the listener binds only to local or tightly controlled addresses, and that caching does not keep secrets longer than intended. Security testing of the setup is a separate piece of work that can be scoped alongside the build.

What operational work continues after OpenBao Proxy goes live?

Expect recurring work on OpenBao version upgrades, policy changes as applications are added or retired, auth method maintenance, token and lease monitoring, and checking that cache behavior still matches the application's expectations after restarts. Ask whether the proposal includes runbooks, alerts on proxy failures and a handover session. Ongoing support, upgrades and continuous testing are available as retainers, and the retainer scope should be written so it is clear who handles each recurring task.

Should we choose OpenBao Proxy or OpenBao Agent for our applications?

Choose Proxy when applications already speak the OpenBao or Vault API and can be pointed at a local address without changes to how they fetch secrets. Choose Agent when you want secrets rendered into files, environment variables or Windows services, or when you need the client to handle templating and process supervision. Confirm which pattern each application needs before scoping, since mixing both across many services adds configuration and support work that is easier to plan up front.

How DeployOpen scopes and delivers OpenBao Proxy work

DeployOpen plans, builds, documents and supports OpenBao Proxy inside your own infrastructure, so the proxy sits beside your existing applications with token handling, caching and access rules that your security and platform teams can review. Engagements start with a written scope that names the applications, the auth path and the evidence you will receive.

How we scope

  • We inventory each application that calls the OpenBao or Vault API directly and record its endpoints, token use and retry behavior.
  • We agree the auto-auth method, token sink location and which applications will reach OpenBao only through the proxy.
  • Engagements are fixed-scope, with deliverables and timelines confirmed in writing before any build work begins.

How we build

  • We deploy the proxy in your environment and configure listeners, auto-auth and forced proxy token use for each application.
  • We set cache behavior and test that leased secrets and tokens renew, expire and revoke as the policies intend.
  • We test failure paths, including proxy restart, expired tokens and unreachable OpenBao nodes, and fix what the tests expose.

How we hand over

  • You receive configuration, policy files and a runbook covering each application's proxy path and its fallback behavior.
  • We document the decision between Proxy and Agent for each workload so future teams can see why a choice was made.
  • We walk your platform and security engineers through the setup and the verification steps they need to repeat.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Support can cover OpenBao version upgrades, including checks of proxy configuration against each new release notes.
  • Ask any provider to confirm in writing who maintains the proxy configuration after handover and how changes are tested.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.