fix(store-accounts): 按明文存储规则修正密码状态 #21

Merged
WuYongJie merged 11 commits from codex/xuxiake-mainline into main 2026-09-09 11:05:13 +08:00
Owner

passwordConfigured 仍按旧 v1: AES-GCM 格式判断,当前生产已按新规则将密码保存为明文,导致 958 行全部误报为 false。

本次改为按存储值非空判断,兼容任意密码字符及历史读取逻辑;视图仍不返回密码。迁移在事务内校验原字段逐行内容、视图所有者和 ACL 不变,异常时整体回滚。

验证:

  • 隔离 PostgreSQL 集成测试通过,958/958,true/false/null=957/1/0。
  • 包含 +、/、= 的虚构明文密码正确标记并可经受控接口读取。
  • 普通只读角色仍不能读取账号基表、密码列或审计表。
  • 5 个相关套件 45 项测试通过,type-check 和 Prisma validate 通过。

生产密码及银行卡数据不在本迁移中修改。部署前将备份视图定义、ACL/所有者及数据库,发布后使用只读聚合验收。

`passwordConfigured` 仍按旧 `v1:` AES-GCM 格式判断,当前生产已按新规则将密码保存为明文,导致 958 行全部误报为 false。 本次改为按存储值非空判断,兼容任意密码字符及历史读取逻辑;视图仍不返回密码。迁移在事务内校验原字段逐行内容、视图所有者和 ACL 不变,异常时整体回滚。 验证: - 隔离 PostgreSQL 集成测试通过,958/958,true/false/null=957/1/0。 - 包含 `+`、`/`、`=` 的虚构明文密码正确标记并可经受控接口读取。 - 普通只读角色仍不能读取账号基表、密码列或审计表。 - 5 个相关套件 45 项测试通过,type-check 和 Prisma validate 通过。 生产密码及银行卡数据不在本迁移中修改。部署前将备份视图定义、ACL/所有者及数据库,发布后使用只读聚合验收。
WuYongJie added 11 commits 2026-09-09 11:04:46 +08:00
workflow link cells on the oa board detail table now render as anchors when the value is an http(s) url, opening the linked product detail in a new tab with platform link styling and hover underline; empty or non-url text still renders the dash placeholder.
the product list rows gain an abandon action next to edit/copy/delete for admins and product owners (operations brand / spu / appearance / structure / purchase / merchandiser / planner / space owners matched by name); abandoning sets projectStatus to rejected which makes every workspace read-only and the existing daily todo push already skips rejected products, so abandoned products drop out of daily pushes automatically; the server enforces the same permission via a new POST abandon endpoint. Abandoned rows keep the restore action to come back.
# Conflicts:
#	furniture-3d-system/docs/integrations/finance-store-account-password-reveal.md
WuYongJie merged commit f615161d8c into main 2026-09-09 11:05:13 +08:00
Author
Owner

已按用户确认的当前明文存储规则完成生产修复。

  • 根因确认:生产在提交 9965c93c 后已将密码和银行卡号改为明文存储;旧视图仍仅识别 v1: 密文,因此 958 行全部误报 false。
  • 修复定义:passwordConfigured = (passwordCiphertext <> ''),不限制密码字符集,不返回密码。
  • 生产备份完成并通过 pg_restore --list:172751292 字节,SHA-256 ce77c0d6432bbaa161011afd34f0cdf309fa4f7a02f9f248baf427d7770cf4ab。备份保存在生产受限目录,包含明文敏感数据,不进入 Git 或普通日志。
  • 迁移 20260909100000_fix_store_account_password_configured_plaintext 已由 DBA 执行并登记;事务内验证原字段逐行内容、视图所有者和 ACL 不变。
  • PR #21 已合并,远端 main 与生产 REVISION 均为 f615161d8c057e57925e46fc1eee6eb40a08b397。
  • 生产验收:COUNT=958、COUNT(DISTINCT id)=958;passwordConfigured 为末尾 boolean,true/false/null=957/1/0。
  • 以 store_account_reader 身份复核:可读 accounts_v1;账号基表、密码列、审计表均不可读。
  • PM2 online、端口 3001、公网 /api/health 正常。
  • 隔离 PostgreSQL 集成测试覆盖包含 +、/、= 的虚构明文密码;相关 5 套件 45 项测试、type-check、Prisma validate 通过。

未修改任何现有密码、银行卡号、服务令牌或第三方数据库账号。未采用跳过证书验证的接入建议。progress:sync 脚本在当前基线不存在,因此未执行。

这是自审,不是独立复审;结论 passed with warnings,仅保留全仓库既有检查项。

已按用户确认的当前明文存储规则完成生产修复。 - 根因确认:生产在提交 `9965c93c` 后已将密码和银行卡号改为明文存储;旧视图仍仅识别 `v1:` 密文,因此 958 行全部误报 false。 - 修复定义:`passwordConfigured = (passwordCiphertext <> '')`,不限制密码字符集,不返回密码。 - 生产备份完成并通过 `pg_restore --list`:172751292 字节,SHA-256 `ce77c0d6432bbaa161011afd34f0cdf309fa4f7a02f9f248baf427d7770cf4ab`。备份保存在生产受限目录,包含明文敏感数据,不进入 Git 或普通日志。 - 迁移 `20260909100000_fix_store_account_password_configured_plaintext` 已由 DBA 执行并登记;事务内验证原字段逐行内容、视图所有者和 ACL 不变。 - PR #21 已合并,远端 main 与生产 REVISION 均为 `f615161d8c057e57925e46fc1eee6eb40a08b397`。 - 生产验收:COUNT=958、COUNT(DISTINCT id)=958;`passwordConfigured` 为末尾 boolean,true/false/null=957/1/0。 - 以 `store_account_reader` 身份复核:可读 `accounts_v1`;账号基表、密码列、审计表均不可读。 - PM2 online、端口 3001、公网 `/api/health` 正常。 - 隔离 PostgreSQL 集成测试覆盖包含 `+`、`/`、`=` 的虚构明文密码;相关 5 套件 45 项测试、type-check、Prisma validate 通过。 未修改任何现有密码、银行卡号、服务令牌或第三方数据库账号。未采用跳过证书验证的接入建议。`progress:sync` 脚本在当前基线不存在,因此未执行。 这是自审,不是独立复审;结论 passed with warnings,仅保留全仓库既有检查项。
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/furniture-3d-system-Wu#21
No description provided.