anon
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_anon | 3.2.3 | SEC | PostgreSQL | Rust |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 7070 | anon | 否 | 是 | 是 | 是 | 否 | 否 | anon |
ALTER EXTENSION UPDATE is unsupported; follow the upstream drop/recreate and masking-rule migration guide for 3.2.
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 3.2.3 | 1817161514 | pg_anon | - |
| RPM | PIGSTY | 3.2.3 | 1817161514 | pg_anon_$v | - |
| DEB | PIGSTY | 3.2.3 | 1817161514 | postgresql-$v-pg-anon | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 3.2.3 el8.x86_64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el8.x86_64.rpm
| PIGSTY 3.2.3 el8.x86_64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el8.x86_64.rpm
| PIGSTY 3.2.3 el8.x86_64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el8.x86_64.rpm
| PIGSTY 3.2.3 el8.x86_64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el8.x86_64.rpm
| PIGSTY 3.2.3 el8.x86_64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 3.2.3 el8.aarch64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el8.aarch64.rpm
| PIGSTY 3.2.3 el8.aarch64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el8.aarch64.rpm
| PIGSTY 3.2.3 el8.aarch64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el8.aarch64.rpm
| PIGSTY 3.2.3 el8.aarch64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el8.aarch64.rpm
| PIGSTY 3.2.3 el8.aarch64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 3.2.3 el9.x86_64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el9.x86_64.rpm
| PIGSTY 3.2.3 el9.x86_64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el9.x86_64.rpm
| PIGSTY 3.2.3 el9.x86_64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el9.x86_64.rpm
| PIGSTY 3.2.3 el9.x86_64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el9.x86_64.rpm
| PIGSTY 3.2.3 el9.x86_64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 3.2.3 el9.aarch64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el9.aarch64.rpm
| PIGSTY 3.2.3 el9.aarch64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el9.aarch64.rpm
| PIGSTY 3.2.3 el9.aarch64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el9.aarch64.rpm
| PIGSTY 3.2.3 el9.aarch64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el9.aarch64.rpm
| PIGSTY 3.2.3 el9.aarch64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 3.2.3 el10.x86_64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el10.x86_64.rpm
| PIGSTY 3.2.3 el10.x86_64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el10.x86_64.rpm
| PIGSTY 3.2.3 el10.x86_64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el10.x86_64.rpm
| PIGSTY 3.2.3 el10.x86_64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el10.x86_64.rpm
| PIGSTY 3.2.3 el10.x86_64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 3.2.3 el10.aarch64.pg18 : pg_anon_18 pg_anon_18-3.2.3-1PGSTY.el10.aarch64.rpm
| PIGSTY 3.2.3 el10.aarch64.pg17 : pg_anon_17 pg_anon_17-3.2.3-1PGSTY.el10.aarch64.rpm
| PIGSTY 3.2.3 el10.aarch64.pg16 : pg_anon_16 pg_anon_16-3.2.3-1PGSTY.el10.aarch64.rpm
| PIGSTY 3.2.3 el10.aarch64.pg15 : pg_anon_15 pg_anon_15-3.2.3-1PGSTY.el10.aarch64.rpm
| PIGSTY 3.2.3 el10.aarch64.pg14 : pg_anon_14 pg_anon_14-3.2.3-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 3.2.3 d12.x86_64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~bookworm_amd64.deb
| PIGSTY 3.2.3 d12.x86_64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~bookworm_amd64.deb
| PIGSTY 3.2.3 d12.x86_64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~bookworm_amd64.deb
| PIGSTY 3.2.3 d12.x86_64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~bookworm_amd64.deb
| PIGSTY 3.2.3 d12.x86_64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 3.2.3 d12.aarch64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~bookworm_arm64.deb
| PIGSTY 3.2.3 d12.aarch64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~bookworm_arm64.deb
| PIGSTY 3.2.3 d12.aarch64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~bookworm_arm64.deb
| PIGSTY 3.2.3 d12.aarch64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~bookworm_arm64.deb
| PIGSTY 3.2.3 d12.aarch64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 3.2.3 d13.x86_64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~trixie_amd64.deb
| PIGSTY 3.2.3 d13.x86_64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~trixie_amd64.deb
| PIGSTY 3.2.3 d13.x86_64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~trixie_amd64.deb
| PIGSTY 3.2.3 d13.x86_64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~trixie_amd64.deb
| PIGSTY 3.2.3 d13.x86_64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 3.2.3 d13.aarch64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~trixie_arm64.deb
| PIGSTY 3.2.3 d13.aarch64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~trixie_arm64.deb
| PIGSTY 3.2.3 d13.aarch64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~trixie_arm64.deb
| PIGSTY 3.2.3 d13.aarch64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~trixie_arm64.deb
| PIGSTY 3.2.3 d13.aarch64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 3.2.3 u22.x86_64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~jammy_amd64.deb
| PIGSTY 3.2.3 u22.x86_64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~jammy_amd64.deb
| PIGSTY 3.2.3 u22.x86_64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~jammy_amd64.deb
| PIGSTY 3.2.3 u22.x86_64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~jammy_amd64.deb
| PIGSTY 3.2.3 u22.x86_64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 3.2.3 u22.aarch64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~jammy_arm64.deb
| PIGSTY 3.2.3 u22.aarch64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~jammy_arm64.deb
| PIGSTY 3.2.3 u22.aarch64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~jammy_arm64.deb
| PIGSTY 3.2.3 u22.aarch64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~jammy_arm64.deb
| PIGSTY 3.2.3 u22.aarch64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 3.2.3 u24.x86_64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~noble_amd64.deb
| PIGSTY 3.2.3 u24.x86_64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~noble_amd64.deb
| PIGSTY 3.2.3 u24.x86_64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~noble_amd64.deb
| PIGSTY 3.2.3 u24.x86_64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~noble_amd64.deb
| PIGSTY 3.2.3 u24.x86_64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 3.2.3 u24.aarch64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~noble_arm64.deb
| PIGSTY 3.2.3 u24.aarch64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~noble_arm64.deb
| PIGSTY 3.2.3 u24.aarch64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~noble_arm64.deb
| PIGSTY 3.2.3 u24.aarch64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~noble_arm64.deb
| PIGSTY 3.2.3 u24.aarch64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 3.2.3 u26.x86_64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~resolute_amd64.deb
| PIGSTY 3.2.3 u26.x86_64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~resolute_amd64.deb
| PIGSTY 3.2.3 u26.x86_64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~resolute_amd64.deb
| PIGSTY 3.2.3 u26.x86_64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~resolute_amd64.deb
| PIGSTY 3.2.3 u26.x86_64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 3.2.3 u26.aarch64.pg18 : postgresql-18-pg-anon postgresql-18-pg-anon_3.2.3-1PGSTY~resolute_arm64.deb
| PIGSTY 3.2.3 u26.aarch64.pg17 : postgresql-17-pg-anon postgresql-17-pg-anon_3.2.3-1PGSTY~resolute_arm64.deb
| PIGSTY 3.2.3 u26.aarch64.pg16 : postgresql-16-pg-anon postgresql-16-pg-anon_3.2.3-1PGSTY~resolute_arm64.deb
| PIGSTY 3.2.3 u26.aarch64.pg15 : postgresql-15-pg-anon postgresql-15-pg-anon_3.2.3-1PGSTY~resolute_arm64.deb
| PIGSTY 3.2.3 u26.aarch64.pg14 : postgresql-14-pg-anon postgresql-14-pg-anon_3.2.3-1PGSTY~resolute_arm64.deb
|
构建
您可以使用 pig build 命令构建 pg_anon 扩展的 RPM / DEB 包:
安装
您可以直接安装 pg_anon 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
使用 pig 或者是 apt/yum/dnf 安装扩展:
预加载配置:
创建扩展:
用法
来源:
- PostgreSQL Anonymizer 3.2.3 README
- Masking functions
- 3.2.3 changelog
- Official documentation
- 3.2.3 upgrade guide
- 3.2 series release announcement
anon 是 PostgreSQL Anonymizer,它应用声明式的遮掩规则以实现受保护查询的访问,并生成匿名化数据集。同时提供伪名化和随机响应辅助功能。在必须保持现实数据有用性而不暴露原始敏感值时使用它;将遮掩策略、角色授权以及未遮掩数据库的访问视为安全边界的一部分。
核心工作流程
在目标数据库会话中加载 anon,安装扩展并启用透明动态遮掩。新连接会自动获取数据库级别的设置。
将登录标记为被遮掩,并将遮掩规则附加到敏感列上:
以 reporting 身份执行的查询会看到变换后的值。特权用户仍然可以看到原始值,因此不要授予被遮掩的角色绕过策略的路径。
遮掩策略
- 动态遮掩 对标记为
MASKED的角色转换结果而无需重写表。 - 静态遮掩 永久性地重写选定的数据,并适用于一次性开发或测试副本。
- 匿名导出和复制体 生成经过净化的导出或下游副本。
- 遮掩视图和数据包装器 展示一个故意减少或转换后的投影。
- 伪名化 在必须保持一致性的连接或重复值时使用确定性变换。
关键对象
anon.dummy_*、anon.random_*和anon.partial(...)生成或部分遮掩值。anon.hash(text)和anon.digest(text, text, text)提供确定性转换。在 3.1.2 版本中,它们被标记为RESTRICTED以限制暴力破解暴露。anon.ldp_grrm(value, epsilon, max_v)和anon.ldp_grrm_pttt(value, truth_probability, max_v)实现了局部差分隐私的通用随机响应。anon.ldp_truth_probability(...)和anon.ldp_lie_probability(...)用于检查随机响应概率。- 角色和列上的安全标签定义谁被遮掩以及每个值如何转换。
运营注意事项
anon 是超级用户安装且不可重定位的。使用与预期消费者相同的授权和连接路径测试每项策略。随机化不是自动确定性的;当需要稳定相等时,请使用确认的伪名化函数。静态匿名化是破坏性的,因此在副本上运行它并在之后验证约束条件和应用程序行为。
3.2.0 引入可本地化的确定性 anon.seeded_* 函数,旧的 anon.pseudo_* 系列已弃用。该版修复了上游报告的三项安全漏洞,并默认拒绝由超级用户执行脱敏操作;应改用专用的非超级用户脱敏角色。将 anon.nosuperuser 设为 false 会撤销这一屏障,不是推荐的升级路径。脱敏规则 JSON 格式已改变,升级后应重新导出规则。本文描述发布版 3.2.3。
3.2.3 是针对 CVE-2026-97469 的安全更新:动态脱敏现在会检查子查询中的 RESTRICTED 函数。升级已安装的库,然后在各数据库按上游流程删除并重新创建扩展;不支持 ALTER EXTENSION ... UPDATE。重新创建前应保存并迁移脱敏规则;应检查此前通过子查询访问受限函数的脱敏角色查询。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)