Thanks for your reply.
Let me speak on behalf of Shyam as I'm pairing with him on this.
Shyam's question is not regarding to the integration between vault and the Liquibase application as this part is already done by using spring-cloud-vault-config-database. It's working as expected very similar to what you've described about consult-template.
The issue is related on how database migrations can be applied to a given database schema with a randomly database user created by vault-plugin-database-oracle.
Given the scenario below and let's take out of the picture the liquibase application as it does not make a difference for this scenario:
(1) Enabled database backend:
vault mount database
(2) Register the plugin
vault write sys/plugins/catalog/vault-plugin-database-oracle \
sha_256=<plugin-sha256> \
command=vault-plugin-database-oracle
(3) Configure a connection
vault write database/config/oracle \
plugin_name=vault-plugin-database-oracle \
connection_url="system/Oracle@localhost:1521/OraDoc.localhost" \
allowed_roles="*"
(2) Add role
vault write database/roles/oracle-role \
db_name=oracle \
creation_statements="CREATE USER {{name}} IDENTIFIED BY {{password}}; GRANT CONNECT TO {{name}}; GRANT CREATE SESSION TO {{name}};" \
default_ttl="1h" \
max_ttl="24h"
(3) Query credentials
vault read database/creds/oracle-role
Key Value
--- -----
lease_id database/creds/oracle-role/2f6a614c-4aa2-7b19-24b9-ad944a8d4de6
lease_duration 1h0m0s
lease_renewable true
password 8cab931c-d62e-a73d-60d3-5ee85139cd66
username v-root-e2978cd0
Now, let's say there is already a database schema created MY_SCHEMA and we want to create a table in that schema:
CREATE TABLE PERSON (ID NUMBER(5) PRIMARY KEY, NAME VARCHAR2(15) NOT NULL)
We want to execute that SQL with the v-root-e2978cd0 user that was created by vault. However, that user does not have permissions to create tables under the MY_SCHEMA schema. So we're looking for any recommendation about addressing this scenario properly with the vault-plugin-database-oracle.