When OpenBao static roles rotate existing database passwords
A static role maps one existing database account to a password that OpenBao rotates on a set period. Teams reach for it when an application must keep connecting as a named account that cannot be replaced by dynamic users, for example because the account owns tables, is referenced by grants in other systems, or is hard-coded in a vendor package. OpenBao keeps the account name and changes only its password, so the application never sees a new username. Dynamic credentials work differently: OpenBao creates a new database user for each request, attaches a lease to it, and revokes the user when the lease ends, as described in What is OpenBao. That model is cleaner, but it only fits when the application can handle new usernames and reconnect as leases change. Static roles are the fallback for the cases where it cannot.
The trade-off is that a static role reduces exposure without removing the shared account. Anyone who can read the current password can use the account until the next rotation, and the audit trail identifies the account name, which does not identify the person or service instance that used it. Before you commit, confirm three things in the OpenBao documentation for the version you run: which database plugins support static roles, how the rotation period is set and whether rotation can be triggered on demand, and how the credential OpenBao uses to change passwords is stored and rotated. Those answers decide whether the design satisfies your access review requirements. Plugin coverage can differ by release, so check it against your own version rather than assuming it carries over from an older one.
Plan the rollout as a short sequence. First, list each fixed account, its owner, the applications and jobs that use it, and whether a dynamic role could replace it. Second, create the static role in a non-production cluster, point one application at the password it reads from OpenBao, and confirm the application reconnects cleanly after a rotation, because reconnect behavior is usually where the work lies. Third, restrict who can read the current password with policies that grant that path only to the workloads that need it, and review those reads through your audit device. When you request a quote, ask for the testing to be scoped per database and application pair, since each one needs its own reconnect check.
Options for static roles and when each fits
This table compares the configuration choices a team makes when mapping an OpenBao static role to an existing database account, and the workloads each choice suits. Read each row as a decision: the option, what it changes for the application and the operator, and the condition that favors it. The main takeaway is that static roles keep the existing account and shift rotation work to OpenBao, while dynamic users fit only where the application can accept new credentials per lease.
| Decision | What it changes | When it fits |
|---|---|---|
| Rotation period | Sets how often OpenBao changes the account password. Shorter periods reduce the window a leaked password stays valid but require every consumer to re-read the secret on time. | Choose a period that matches the application's ability to pick up new passwords. Confirm the exact setting names and any minimums in the OpenBao database secrets docs. |
| Target database account | The role points to one existing account. Any other system using that account must also receive the rotated password, so shared accounts need a complete inventory first. | Use when a legacy application or vendor tool requires a fixed username that cannot be changed to a generated one. |
| Who can read the current password | Read access to the role's credential path controls who sees the live password. Grant it to the workload that connects, not to people who only need to run rotations. | Separate operator permissions (configure, rotate) from consumer permissions (read credential) so that a human with admin rights does not automatically hold the password. |
| Static role versus dynamic user | Static roles keep one long-lived account that OpenBao rotates. Dynamic users create a new account per lease and revoke it at expiry. | Prefer dynamic users when the application can reconnect with new credentials and the database plugin supports them. Use static roles when the account must stay the same. |
| Application connection handling | With rotation, the application must fetch the new password and reconnect the pool without a restart. Connection pools that cache the old password fail after rotation. | Confirm the application or its driver can reload credentials. Test a rotation in staging before enabling it in production. |
| Database plugin support | Not every database plugin supports static roles. Support depends on the plugin and version, so the choice is limited to what the plugin documents. | Check the plugin's documentation for static role support before designing around it. Confirm the target database version is supported by that plugin. |
Setting up a static role against an existing database account
This sequence maps an existing database account to an OpenBao static role, so OpenBao rotates its password on a schedule and serves the current value to an approved identity. The result is a tested rotation path that your application can read without a manual password change.
Confirm the database and plugin prerequisites
Before enabling anything, the database owner and the platform team confirm the database type, version and the OpenBao database plugin that matches it. Check the OpenBao database secrets documentation for your release to confirm that the plugin supports static roles, because not every plugin does. Confirm that the target account is a login role that can be altered, that no other system resets its password on its own schedule, and that the application can tolerate a password change. Done when the team has written down the plugin name, the target account and the rotation owner.
Enable the database secrets engine
A platform administrator enables the database secrets engine at a mount path that matches your naming convention, such as one mount per database environment. Keep this mount separate from key/value storage so that policies can be scoped to it. Check that the mount appears in the list of enabled secrets engines and that its configuration is empty before you add any connection. Done when the mount exists and an administrator can see it in the engine list.
Create a rotation account in the database
The database administrator creates a dedicated account that OpenBao uses to connect and change the password of the target account. Grant it only the privilege needed to alter the passwords of the accounts it manages, and do not reuse the application's login or a shared administrator account. Store its credentials in a secure location, not in a configuration file. Check that the rotation account can log in from the network path that OpenBao uses and that it cannot perform unrelated administrative actions. Done when the database administrator confirms the grants in writing.
Configure the database connection
The platform administrator writes the connection configuration in the database mount, supplying the connection string, the rotation account credentials and the list of roles allowed to use this connection. Confirm that the plugin reports a successful connection and that reading the connection configuration does not reveal the rotation password. If the connection fails, check network reachability, TLS settings and the grants from the previous step before changing the configuration. Done when the connection test succeeds and the configuration read omits secret values.
Create the static role for the existing account
The platform administrator creates a static role that names the existing database account and sets the rotation period, which OpenBao uses to schedule password changes. The username must match the account exactly, because OpenBao will not create it. Choose the rotation period with the application owner, since it determines how often the application must refresh its credential. Check the role definition to confirm the username, the period and the connection it uses. Done when reading the role returns the intended account and period.
Confirm the first rotation and the application reconnect
Trigger or wait for the first rotation, then confirm in the database that the password changed and that the previous password no longer works. Test that the new password works with the target account. The application owner must confirm that the application re-reads the password from OpenBao and reconnects without a manual change, because the old password stops working at rotation. Check the application logs for authentication errors after a forced rotation in a non-production environment. Done when the team has seen one successful rotation and one successful reconnect.
Restrict reads with a policy and verify access
The security team writes a policy that grants read access to the static role's credential path only to the identity the application uses, such as a specific AppRole or Kubernetes service account. Keep administrators who manage the mount from reading the current password unless there is a documented need. Test the policy by attempting a read with another identity, which should be denied, and by reviewing the audit log entry for the permitted read. Done when the denied attempt and the logged allowed read both appear as expected.
How a static role rotates a database password
The diagram starts with the database secrets engine in OpenBao, which holds a static role that maps to an existing database account. A rotation credential stored in OpenBao sets a new password on that account at each rotation period, and the database account itself is never recreated. The consuming application reads the current password through the static role, and only a token whose read policy allows that path can do so. Check that the rotation credential has only the rights rotation needs, and that the policy scopes reads to the specific role.
Rotation loop and read path across the OpenBao and database trust boundaries.
Which database plugins support static roles
Static role support is set per database plugin, not per OpenBao release, so a plugin that rotates credentials on one engine may not do so on another. The cards below cover what to confirm in the docs for your exact OpenBao version and what the database account needs before a static role can change its password.
Confirm the plugin and its version
Start by naming the exact database plugin and version your OpenBao cluster loads, such as the built-in plugin for your engine or a plugin installed from openbao-plugins. Support for static roles is documented per plugin, so a general statement that OpenBao supports database secrets is not enough. Record the plugin name and version in your change ticket so the check can be repeated during upgrades.
OpenBao overviewRead the plugin's own page
Open the documentation for the database secrets plugin you run and look for the static role section. Note which configuration keys, rotation fields and statements it describes, and whether those match the plugin version in your cluster. Where the page does not mention static roles, treat the plugin as unconfirmed and ask the project or your vendor before you build on it.
Check database-side permissions
The plugin's connection account must be allowed to change the password of every account it rotates, which usually means a database role with password-change rights on those users. Confirm these grants in a non-production database first, because a missing grant often shows up only at the first scheduled rotation. Ask your database team to review the grant scope so the account cannot change unrelated users.
Test rotation on a staging database
Create one static role against a staging copy of the target account and trigger a rotation manually. Confirm that the new password works for the application, that the old password is rejected, and that the stored value can be read by the intended identities. Run this test again after each OpenBao or plugin upgrade, since rotation behavior can change with the plugin version.
Ask vendors about managed databases
Managed database services often restrict which accounts can change passwords and may limit the statements a plugin can run. Ask your managed database provider whether the connection account you plan to use can rotate passwords, and whether the provider documents any limits on password changes. Put the answer in writing before you rely on a static role for a production account.
Static roles versus dynamic users: the trade-offs
A static role is the right compromise when the application cannot be changed to request credentials from OpenBao at runtime, but the team still wants OpenBao to own the password and rotate it on a schedule. The trade-off is that the database account still exists permanently and is shared by every process that uses it. Dynamic users give each consumer its own short-lived account that expires with its lease, so a leaked credential has a bounded life and can be traced to one workload. A static role does neither. Push for dynamic users first where the database plugin supports them and the application can read credentials from OpenBao, such as through an agent or template. Accept a static role when a vendor product, legacy service or shared reporting tool only accepts a fixed username and password.
Rotation changes the password on the database, so every client that holds the old value must pick up the new one. Connection pools are the usual failure point: an open pool keeps authenticating with credentials that were valid when each connection was created, and new connections fail once the old password is gone. Before setting a rotation period, confirm with each application owner how the application reads its password, whether it caches the value in memory, and whether it can reload settings without a restart. Plan a rotation window that matches the slowest consumer, and test the rotation in a non-production copy of the database first. Confirm the exact behavior of your database plugin and version in the OpenBao documentation before you rely on it.
The operational cost sits mostly with the application teams. If an application reads its password once at startup, each rotation requires a coordinated restart, and that restart has to be scheduled, monitored and reversible. Changing the application to fetch the password through OpenBao Agent or a similar client is often a larger task than the database work itself, and it needs owner time, code review and a rollback path. Ask each team to estimate that change in writing, and treat a static role as a stepping stone when the change is deferred. Record the accounts that stay static, the reason for each, and the date someone will revisit the decision, so that a compromise does not become a permanent design.
Security and operational considerations
A static role moves a database account's password under OpenBao's control, which makes OpenBao itself a high-value target and a single point of failure for rotation. The cards below cover the credential that performs rotation, what happens when rotation fails, how connection pools behave around a password change, the seal and backup state of the cluster, and who can read passwords and how those reads are logged.
Protect the rotation credential
OpenBao must log in to the database as a user with the privilege to change other accounts' passwords, so that account is the most sensitive secret in the design. Create a dedicated rotation account with only the grants needed for the target accounts, do not reuse an administrator login, and store its initial password only in OpenBao's root configuration path. Confirm with the database vendor's documentation which privilege is required for password changes on your engine version.
Handle failed rotations
If OpenBao cannot reach the database or the change is rejected, the static role keeps the last password it successfully set, and applications may still depend on it. Decide in advance how a failed rotation is detected, which error paths raise an alert, and who can read the role status to confirm the last rotation time. Test the failure case on a non-production database by blocking the rotation account and checking what your monitoring reports.
Plan connection pool behavior
A password change does not close connections that are already open, but new connections made after the change need the new password. Applications that cache the password, or pools that reconnect only on restart, can fail at the moment of rotation. Choose a rotation period longer than your pool's maximum connection lifetime, have the application re-read the secret on authentication failure, and test a rotation under load before enabling it for production accounts.
Back up and check seal state
A sealed OpenBao cannot rotate passwords or serve the current value to applications, so an outage of the cluster becomes an outage of every service that reads a static role. Confirm which unseal method the cluster uses, that unseal keys or the cloud key reference are held by separate people or systems, and that backups of the storage backend are taken and restored in a test. Record the seal state as a monitored signal.
Restrict and audit password reads
Anyone whose policy allows reading the static role's credential path receives the current database password, and that read is the event a security team most needs to explain later. Limit the read capability to the specific service identities that need it, separate it from the capability to manage the role, and confirm that the audit device records each read with the requesting identity. Review audit logs for reads from unexpected identities as part of routine monitoring.
Questions teams ask before setting up static roles
How much does it cost to set up OpenBao static roles for existing database accounts?
Cost depends on how many database accounts you rotate, how many database platforms are involved, and how much of the surrounding work you hand over. Setup is usually a one-time cost covering design, configuration, testing and handover. Ongoing costs are your own staff time for reviewing rotation failures, plus any retainer you choose for upgrades and monitoring. No supplied figures set a price for this work, so ask for a quote built from a written scope that lists each database, each account and each application that reads the password. DeployOpen does not publish a price list; a quote follows from the written scope.
How long does it take to set up static roles?
Duration depends on the number of accounts, the number of applications that read each password, and how quickly your teams can approve changes to those applications. Work usually splits into discovery of existing accounts, a rotation design, a test environment run, and a production cutover per account. No supplied timeline applies to this topic, so ask for a schedule in the written scope with a milestone for each database and each consuming application. Confirm dependencies on change windows and on the owners of each application before agreeing a date.
What do we need from our database and security teams?
The database team must confirm which plugin matches each database, create or designate the account that OpenBao uses to rotate passwords, and grant that account the privileges it needs to change other users' passwords. The security team must approve the rotation period, decide who may read the current password, and review the audit log settings. Application owners must confirm how they read the secret and whether they can pick up a new password without a restart. Agree these responsibilities in writing before work starts.
Can our internal team set up static roles without a partner?
Yes, a team with database administration and OpenBao experience can set up static roles alone, provided it has a test environment and clear rotation rules. The harder parts are usually coordinating application changes and confirming that every consumer handles a rotated password correctly. Teams new to OpenBao often benefit from a partner for the design review and the first rollout. Check your team's time against the number of accounts before deciding.
What drives the effort up or down?
Effort rises with the number of database platforms, the number of accounts, shared accounts used by several applications, applications that cache passwords for long periods, and any database that needs special privileges for rotation. Effort falls when accounts are already documented, applications read secrets through a common client, and a test database mirrors production. Confirm which databases and plugins are supported before you plan, because support differs by plugin.
Which database plugins support static roles?
Support for static roles depends on the database plugin in your OpenBao version, so confirm the supported list against the OpenBao database secrets documentation for the release you plan to run. Do not assume that a database supported for dynamic credentials also supports static roles. Ask for this check to appear as a step in the design phase with a written result for each database.
What should we request in a written scope?
Ask for a list of each database and account in scope, the plugin for each database, the rotation period for each role, the reader list for each secret, and the audit logging settings. Also request the test plan, the cutover steps for each application, the rollback method if a rotation fails, and the handover documents. Include acceptance criteria that state who signs off each stage and how retesting is handled. DeployOpen delivers fixed-scope engagements with scope, deliverables and timelines agreed in writing before work starts.
How DeployOpen scopes and delivers static role rotation
DeployOpen plans, builds, tests and hands over OpenBao static role rotation inside your own infrastructure, starting from an inventory of the existing database accounts that applications depend on. Each engagement is fixed-scope, so the accounts, rotation periods, reader permissions and verification steps are agreed in writing before any production password changes.
How we scope
- We inventory which existing database accounts applications use and which of them can tolerate rotation.
- We record the database engine, plugin, and version each static role will target, confirmed against OpenBao's documentation.
- We agree the rotation period, the policy on who may read current passwords, and the audit expectations in the written scope.
How we build
- We configure the database connection, the rotation statements and the static roles in a non-production OpenBao environment first.
- We test that rotation completes, that applications reconnect with the new password, and that failed rotations raise alerts.
- We set access policies so only named identities can read current passwords, and we test those policies with negative cases.
How we hand over
- We deliver configuration as code, runbooks for rotation failures, and a record of each static role and its owners.
- We document the cutover sequence, rollback steps and the application changes needed to read credentials from OpenBao.
- We walk your platform, security and database teams through the operating model and the evidence their reviews will request.
How we support
- Ongoing support, OpenBao upgrades and continuous testing are available as retainers after the initial handover.
- Retainers can cover review of new static roles, plugin version changes and periodic access reviews of role readers.
- Ask any provider, including DeployOpen, to confirm in writing who responds to rotation failures and within what window.

