Skip to content

Commit a2bf34a

Browse files
Add missing docs for Oracle Rootless Password Rotation for Vault 1.19, 1.20 (#1062)
2 parents ba82dca + 4b18a45 commit a2bf34a

File tree

4 files changed

+142
-2
lines changed

4 files changed

+142
-2
lines changed

content/vault/v1.19.x/content/api-docs/secret/databases/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ this in order to know the password.
551551
- `self_managed_password` `(string)` – <EnterpriseAlert product="vault" inline />
552552
The password corresponding to the username in the database. Required when using
553553
the Rootless Password Rotation workflow for static roles. Only enabled for select
554-
DB engines (Postgres). This parameter is deprecated in favor of `password`.
554+
DB engines (Postgres, Oracle). The `self_managed_password` parameter is deprecated in favor of `password`.
555555

556556
- `db_name` `(string: <required>)` - The name of the database connection to use
557557
for this role.

content/vault/v1.19.x/content/docs/secrets/databases/oracle.mdx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,76 @@ you will need to enable ipc_lock capabilities for the plugin binary.
158158

159159
See the [Commands](/vault/docs/commands#files) docs for more details.
160160

161+
### Rootless configuration and password rotation for static roles
162+
163+
@include 'alerts/enterprise-only.mdx'
164+
165+
The Oracle database plugin supports static roles (including password rotation)
166+
with a rootless DB connection configuration.
167+
168+
With a rootless configuration you can onboard static DB users and use static
169+
role rotation through Vault without requiring privileged root accounts for
170+
connection configuration. Instead of using a single root connection, each static
171+
role has multiple dedicated connections to the database. We highly recommend
172+
onboarding database users as static roles with the minimum set of privileges
173+
possible. Each static role opens a new connection into the database and granting
174+
minimum privileges helps Vault avoid creating multiple, highly-privileged
175+
connections to an external system.
176+
177+
With rootless connections, Vault can become out of sync with the database user
178+
if out-of-band password rotations occur. To resolve the associated rotation
179+
errors, you need to manually update the password in your external Oracle
180+
database.
181+
182+
Vault does not support dynamic roles/credentials with rootless DB connections.
183+
184+
## Setup
185+
186+
1. Enable the database secrets engine if it is not already enabled:
187+
188+
```shell-session
189+
$ vault secrets enable database
190+
Success! Enabled the database secrets engine at: database/
191+
```
192+
193+
By default, the secrets engine will enable at the name of the engine. To
194+
enable the secrets engine at a different path, use the `-path` argument.
195+
196+
1. Configure a connection to your database without root credentials and enable
197+
the rootless workflow using the `self_managed` parameter. For example:
198+
199+
```shell-session
200+
$ vault write database/config/my-oracle-database \
201+
plugin_name="oracle-database-plugin" \
202+
allowed_roles="my-role" \
203+
connection_url="{{username}}/{{password}}@//localhost:1521/database-name" \
204+
self_managed=true
205+
```
206+
207+
1. Configure a static role that creates a dedicated connection to a user in
208+
the Oracle database with the `password` parameter. For example:
209+
210+
```shell-session
211+
$ vault write database/static-roles/my-role \
212+
db_name="my-oracle-database" \
213+
username="staticuser" \
214+
password="password" \
215+
rotation_period="1h"
216+
```
217+
218+
1. Verify the new static credentials with `vault read`. For example:
219+
220+
```shell-session
221+
$ vault read database/static-creds/my-role
222+
Key Value
223+
--- -----
224+
last_vault_rotation 2024-09-11T14:15:13.764783-07:00
225+
password XZY42BVc-UO5bMsbgxrW
226+
rotation_period 1h
227+
ttl 59m55s
228+
username staticuser
229+
```
230+
161231
### Connect using SSL
162232

163233
If the Oracle server Vault is trying to connect to uses an SSL listener, the database

content/vault/v1.20.x/content/api-docs/secret/databases/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ this in order to know the password.
551551
- `self_managed_password` `(string)` – <EnterpriseAlert product="vault" inline />
552552
The password corresponding to the username in the database. Required when using
553553
the Rootless Password Rotation workflow for static roles. Only enabled for select
554-
DB engines (Postgres). This parameter is deprecated in favor of `password`.
554+
DB engines (Postgres, Oracle). The `self_managed_password` parameter is deprecated in favor of `password`.
555555

556556
- `db_name` `(string: <required>)` - The name of the database connection to use
557557
for this role.

content/vault/v1.20.x/content/docs/secrets/databases/oracle.mdx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,76 @@ you will need to enable ipc_lock capabilities for the plugin binary.
158158

159159
See the [Commands](/vault/docs/commands#files) docs for more details.
160160

161+
### Rootless configuration and password rotation for static roles
162+
163+
@include 'alerts/enterprise-only.mdx'
164+
165+
The Oracle database plugin supports static roles (including password rotation)
166+
with a rootless DB connection configuration.
167+
168+
With a rootless configuration you can onboard static DB users and use static
169+
role rotation through Vault without requiring privileged root accounts for
170+
connection configuration. Instead of using a single root connection, each static
171+
role has multiple dedicated connections to the database. We highly recommend
172+
onboarding database users as static roles with the minimum set of privileges
173+
possible. Each static role opens a new connection into the database and granting
174+
minimum privileges helps Vault avoid creating multiple, highly-privileged
175+
connections to an external system.
176+
177+
With rootless connections, Vault can become out of sync with the database user
178+
if out-of-band password rotations occur. To resolve the associated rotation
179+
errors, you need to manually update the password in your external Oracle
180+
database.
181+
182+
Vault does not support dynamic roles/credentials with rootless DB connections.
183+
184+
## Setup
185+
186+
1. Enable the database secrets engine if it is not already enabled:
187+
188+
```shell-session
189+
$ vault secrets enable database
190+
Success! Enabled the database secrets engine at: database/
191+
```
192+
193+
By default, the secrets engine will enable at the name of the engine. To
194+
enable the secrets engine at a different path, use the `-path` argument.
195+
196+
1. Configure a connection to your database without root credentials and enable
197+
the rootless workflow using the `self_managed` parameter. For example:
198+
199+
```shell-session
200+
$ vault write database/config/my-oracle-database \
201+
plugin_name="oracle-database-plugin" \
202+
allowed_roles="my-role" \
203+
connection_url="{{username}}/{{password}}@//localhost:1521/database-name" \
204+
self_managed=true
205+
```
206+
207+
1. Configure a static role that creates a dedicated connection to a user in
208+
the Oracle database with the `password` parameter. For example:
209+
210+
```shell-session
211+
$ vault write database/static-roles/my-role \
212+
db_name="my-oracle-database" \
213+
username="staticuser" \
214+
password="password" \
215+
rotation_period="1h"
216+
```
217+
218+
1. Verify the new static credentials with `vault read`. For example::
219+
220+
```shell-session
221+
$ vault read database/static-creds/my-role
222+
Key Value
223+
--- -----
224+
last_vault_rotation 2024-09-11T14:15:13.764783-07:00
225+
password XZY42BVc-UO5bMsbgxrW
226+
rotation_period 1h
227+
ttl 59m55s
228+
username staticuser
229+
```
230+
161231
### Connect using SSL
162232

163233
If the Oracle server Vault is trying to connect to uses an SSL listener, the database

0 commit comments

Comments
 (0)