The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
patch vault docs
Copple2719594bd124
diff --git a/apps/docs/pages/guides/database/vault.mdx b/apps/docs/pages/guides/database/vault.mdxindex 0d32b241104..c986267e4ed 100644--- a/apps/docs/pages/guides/database/vault.mdx+++ b/apps/docs/pages/guides/database/vault.mdx@@ -234,15 +234,24 @@ To encrypt data, you need a _key id_. You can use the default key id created autBoth `vault.create_secret()` and `vault.update_secret()` take an optional fourth `new_key_id` argument. This argument can be used to store a different key id for the secret instead of the default value.```sql-postgres=> select vault.create_secret('another_s3kre3t_key', 'another_unique_name',- 'This is another description', (pgsodium.create_key()).id);+select vault.create_secret(+ 'another_s3kre3t_key',+ 'another_unique_name',+ 'This is another description',+ (pgsodium.create_key()).id+);+```++Result:++```sh-[ RECORD 1 ]-+-------------------------------------create_secret | cec9e005-a44d-4b19-86e1-febf3cd40619```Which roles should have access to the `vault.secrets` table should be carefully considered. There are two ways to grant access, the first is that the `postgres` user can explicitly grant access to the vault table itself.-## Turning off Statement Logging+### Turning off Statement LoggingWhen you insert secrets into the vault table with an INSERT statement, those statements get logged by default into the Supabase logs. Since this would mean your secrets are stored unencrypted in the logs, you should turn off statement logging while using the Vault.@@ -256,7 +265,7 @@ And then restart your project from the dashboard to enable that change.In the future we are researching various ways to refine the way statement logging interacts with sensitive columns.-## Resources+### Resources- Read more about Supabase Vault in the [blog post](https://supabase.com/blog/vault-now-in-beta)- [Supabase Vault on GitHub](https://github.com/supabase/vault)