How to turn off key versioing

I turn on vault key versioning with vault kv enable-versioning secrets, which, I believe, cause the secrets fetching path to change. I want to turn off versioning so all of the apps could work again. Can you help me?

H’m, I think it’s a one-way feature: once enabled, you can’t go back to plain kv v1; I may be mistaken, though.

But I would’ve thought your calls/commands would still work. Can you share an example of what isn’t working now?

Thank you. The vault kv get and http api is working fine, but I’m using vault with vault-env from banzai, and it keep throwing error like

time="2020-12-04T10:57:10Z" level=warning msg="app-secrets/foo/bar: Invalid path for a versioned K/V secrets engine. See the API docs for the appropriate API endpoints to use. If using the Vault CLI, use 'vault kv get' for this operation." app=vault-env
time="2020-12-04T10:57:10Z" level=fatal msg="failed to inject secrets from vault: key 'PRIVATE_KEY' not found under path: app-secrets/foo/bar" app=vault-env

as soon as I enabled key-versioning
I have already open an issue on their repo, here’s the link https://github.com/banzaicloud/bank-vaults/issues/1204,

Ah, I see. I’m not familiar with bank-vaults. Hopefully they’ll address the issue!

This can be roll back. We did successfully roll back. We were using vault with consul as backend.

We take snapshot/back up of consul

We enable versioning in vault.

for restore we stopped Vault and restored old snapshot which we take before enabling versioning in vault.

After that just start your vault server and unseal it !!! You are done with roll back :slight_smile:

Naturally, anything can be rolled back if you do a full restore to a previous backup.

That doesn’t change the correct advice given above, that reverting the operation is not natively possible in Vault.

Rolling a Vault back to a previous backup is generally a disruptive operation of last resort, and of course, relies on you having taken a backup at the exact point you want to roll back to.

Yes Agreed to your point maxb.

But in our scenario we do not change data too much and also we have taken a back up for restore point.

With above steps we came out of trouble as our application was facing issue fetching data after enabling versioning