How to update the encrypted data in MySQL after the Vault key is reset when the Vault encrypted data is persisted to MySQL?

How to update the encrypted data in MySQL after the Vault key is reset when the Vault encrypted data is persisted to MySQL?

When you say “Vault key is reset” do you mean that the old key was lost and a new one was generated? If so, there’s no way to get it back.

If it’s a new version of the same key, you should be able to read the data encrypted with the old version and re-encrypt it – see the rewrap endpoint for a way to do this that doesn’t expose the ciphertext. Or if you want to migrate between different keys but have the old one, you can do that rewrap workflow manually.