pgsodium(即将弃用):加密功能
Supabase 不推荐使用 pgsodium,因为它将被弃用。请改用 Supabase Vault。
🌐 Supabase does not recommend the usage of pgsodium as it will be deprecated. Use Supabase Vault instead.
一旦淘汰过程开始,我们会联系受影响项目的负责人,协助他们从 pgsodium 迁移。
🌐 We will reach out to owners of impacted projects to assist with migrations away from pgsodium once the deprecation process begins.
Vault 和 pgsodium 是独立的扩展。Vault 不依赖 pgsodium,不会受到这次废弃的影响。
🌐 Vault and pgsodium are separate extensions. Vault doesn't depend on pgsodium and is not affected by this deprecation.
Vault 是自包含的,不依赖于 pgsodium。它共享同一个每项目的 根密钥(格式和位置相同),但提供自己的接口 —— vault.secrets 表和 decrypted_secrets 视图 —— 因此切换到 Vault 并不会改变你管理密钥的方式。
🌐 Vault is self-contained and doesn't depend on pgsodium. It shares the same per-project root key (same format and location) but exposes its own interface - the vault.secrets table and decrypted_secrets view - so switching to Vault does not change how your key is managed.
pgsodium 是一个 Postgres 扩展,它提供对 libsodium 高级加密算法的 SQL 访问。
Supabase 之前记录了两个来源于 pgsodium 的功能,具体是 服务器密钥管理 和 透明列加密。目前,我们不建议在 Supabase 平台上使用这两个功能,因为它们操作复杂,且配置错误的风险较高。
🌐 Supabase previously documented two features derived from pgsodium. Namely Server Key Management and Transparent Column Encryption. At this time, we do not recommend using either on the Supabase platform due to their high level of operational complexity and misconfiguration risk.
请注意,Supabase 项目默认情况下在静态存储时是加密的,这可能已经足够满足你的合规需求,例如 SOC2 和 HIPAA。
🌐 Note that Supabase projects are encrypted at rest by default which likely is sufficient for your compliance needs e.g. SOC2 & HIPAA.
获取你 Supabase 项目的根加密密钥 #
🌐 Get the root encryption key for your Supabase project
加密需要密钥。把密钥和加密数据存放在同一个数据库中是不安全的。Supabase Vault 和 pgsodium 共享相同的每个项目根加密密钥;关于如何管理它的更多信息,请参见 加密密钥位置。这个密钥用于解密存储在 Supabase Vault 中的值以及使用透明列加密加密的数据。
🌐 Encryption requires keys. Keeping the keys in the same database as the encrypted data would be unsafe. Supabase Vault and pgsodium share the same per-project root encryption key; for more information about managing it see encryption key location. This key is required to decrypt values stored in Supabase Vault and data encrypted with Transparent Column Encryption.
资源 #
🌐 Resources
- Supabase Vault
- 在博客文章中了解更多关于 Supabase Vault 的信息
- GitHub上的Supabase Vault
- 官方
pgsodium文档