vault
vault copied to clipboard
pgsodium_crypto_aead_det_decrypt_by_id: invalid ciphertext after compose down & up
Bug report
- [x] I confirm this is a bug with Supabase, not with my own application.
- [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Have a setup with Stripe Wrapper and server
- Add Vault Key for server
- Compose Down docker
- Compose Up
- Any queries against the Foreign Data Tables have the error pgsodium_crypto_aead_det_decrypt_by_id: invalid ciphertext (it will also have an error on supabase studio and in postgres directly running any queries connected to the foreign data tables)
Expected behavior
Screenshots
System information
- OS: macOS development against Ubuntu VPS
- using Brave & Firefox
- supabase/postgres:15.1.0.103 & wrappers extension
Additional context
re-adding the secret and changing the server apikey option fixes it, but it's a hassle
Take a look at #27
Quick fix: https://github.com/supabase/vault/issues/27#issuecomment-1984187441
For anyone coming accross this:
- based on https://github.com/supabase/vault/issues/27#issuecomment-1804197388:
- In your docker compose file:
# ... db: # ... volumes: # ... # pgsodium decryption key - ./volumes/db/pgsodium_root.key:/etc/postgresql-custom/pgsodium_root.key:Z