为什么需要 KMS 和信封加密

Posted on 六 27 6月 2026 in Tech • Tagged with security, cryptography, kms, envelope-encryption

从数据库泄露、密钥轮换和故障边界说起,解释为什么需要 KMS,以及信封加密如何把密钥管理这件事做得更稳。


Continue reading

一通视频会议骗走 2500 万:当 CFO 的脸也能伪造

Posted on 二 23 6月 2026 in Tech • Tagged with security, deepfake, social-engineering, fraud, ai, qrcode, ai-agent

2024 年初,英国工程公司 Arup 的一名香港员工,在一通"全员都是深度伪造"的视频会议里被骗,分 15 笔转出 2500 万美元。这篇文章拆一拆这起事件的链条,聊聊为什么"看到脸、听到声"已经不再等于"确认身份",为什么坏人没变少只是换了赛道(从扒窃到 deepfake 再到二维码),以及更隐蔽的一层——别盲目相信你自己授权的 AI Agent(OpenClaw "小龙虾"风波),并给出一份可以抄走的反诈核对清单。


Continue reading

给 AI Agent 上把锁:LLM 应用的安全清单

Posted on 六 20 6月 2026 in Tech • Tagged with AI, security, llm, ai-agent, prompt-injection, threat-modeling, methodology

传统软件的攻击面是"代码里的洞",LLM 应用多了一个要命的新洞——模型会"听话"地执行别人塞进来的指令。一个帮你总结网页的 Agent,可能因为网页里藏了一句"把用户的 key 发到我这里"就真的照做。这篇按 Prompt 层、Agent 层、数据层、运营层四层梳理 LLM 应用与 AI Agent 的安全要点,配上几个典型翻车实例、一份行动清单和一份上线检查清单。


Continue reading

授权的领域模型:从 RBAC、ABAC 到 Keycloak、Vault 的一张全景图

Posted on 日 14 6月 2026 in Tech • Tagged with authorization, rbac, abac, rebac, keycloak, vault, opa, security, 授权, 访问控制

授权(AuthZ)先是一个领域建模问题,再是一个选型问题。本文先把授权的领域模型拆成"四元组 + 决策四件套",再说清 ACL / RBAC / ABAC / ReBAC / PBAC 只是同一个模型的不同切法,最后横向对比 Keycloak、HashiCorp Vault、OPA、Casbin、OpenFGA、Cedar 这几个常被混为一谈的实现,并给出一张选型决策表。


Continue reading

PERM 模型与 Casbin:把云端授权从代码里抠出去

Posted on 二 02 6月 2026 in Tech • Tagged with authorization, casbin, perm, go, cloud, security

PERM 元模型把 Policy、Effect、Request、Matchers 四块拼图抽象出来,让一份配置文件就能撑起 ACL、RBAC、ABAC 各种授权花样。Casbin 是这套理论的工程化身,本文用 Go 例子拆开讲它怎么工作,顺便和 OPA 比一比。


Continue reading

用开源组件搭一个 AWS IAM 风格的授权系统

Posted on 三 29 4月 2026 in Tech • Tagged with authorization, IAM, OPA, OpenFGA, Keycloak, STS, SPIFFE, SPIRE, RBAC, ABAC, ReBAC, security

如果要用开源组件搭一个 AWS IAM 风格的授权系统,不能只靠 OpenFGA 或 OPA。更合理的组合是 Keycloak/Dex 做用户身份,SPIFFE/SPIRE 做工作负载身份,STS 服务签发短期角色会话,OpenFGA 表达 trust/resource relationship,OPA 表达 permission policy、condition 和 explicit deny,再由 API Gateway 或服务中间件作为 PEP 执行决策。


Continue reading

Agent Box 初探:从 OpenClaw 小龙虾安全问题谈 Agent Sandbox

Posted on 三 29 4月 2026 in Tech • Tagged with AI Agent, Agent Sandbox, OpenClaw, Kubernetes, Sandbox, gVisor, Kata Containers, Security, RBAC, NetworkPolicy

AI Agent 一旦从“会聊天”走向“会动手”,最大的问题就不再是模型够不够聪明,而是它在哪里动手、能碰什么、出错后谁来收拾。本文结合 OpenClaw 小龙虾近期暴露的 prompt injection、token/credential 暴露、工具权限和本地网关风险,聊聊为什么 Agent 需要一个隔离、持久、可编程的 Sandbox,以及如何用 Sandbox CRD、Template、Claim、WarmPool、KSA/RBAC 和 NetworkPolicy 搭出第一版。


Continue reading

SPIRE 系列之三:安全性分析与加固清单

Posted on 六 25 4月 2026 in Journal • Tagged with SPIRE, SPIFFE, Zero Trust, Security, mTLS, X.509

SPIRE 系列第三篇:从信任链、攻击面、JWT-SVID 风险、Server/Agent 加固和事件响应角度,分析如何把 SPIFFE/SPIRE 用成真正的 Zero Trust 身份层。


Continue reading

安全混沌工程:把安全事故演练成消防演习

Posted on 五 24 4月 2026 in Tech • Tagged with security, chaos-engineering, incident-response, resilience, tabletop-exercise, game-day

混沌工程不该只服务于稳定性。面对密码泄漏、账号被盗、数据外泄、勒索加密等安全事故,团队也需要像消防演习一样,在平时用可控、低风险的方式反复演练发现、响应、隔离、恢复和复盘。


Continue reading

从 AWS KMS 到用户私钥托管:把加密这条链路一次讲清楚

Posted on 三 22 4月 2026 in Journal • Tagged with AWS, KMS, Encryption, Security, Secrets Manager, Private Key

这篇文章把 AWS KMS、data key、encrypted data key、EncryptionContext 以及“为特定用户托管私钥”的工程设计串成一条完整链路,尽量用人话讲清楚它们各自该放在哪里、由谁负责、什么时候该用、什么时候别乱用。


Continue reading

用 Promptfoo 给 AI skill 做体检:评估、测试、质量与安全把关

Posted on 三 15 4月 2026 in Journal • Tagged with Promptfoo, AI, LLM, Agent, Skill, Evaluation, Red Team, Security, CI/CD

很多团队做 AI skill,还停留在“这次跑通了,看起来不错”的阶段。可真正上线之后,问题往往不在第一次回答,而在波动、成本、工具调用路径和安全边界。本文借 Promptfoo 这把尺子,聊聊怎么系统地评估、测试并给 AI skill 做质量与安全把关。


Continue reading

在 Kubernetes 里用 cert-manager + Venafi 自动签发和轮换证书

Posted on 三 15 4月 2026 in Journal • Tagged with Kubernetes, cert-manager, Venafi, TLS, certificate, security, DevOps

很多团队把 TLS 证书当成一次性配置,直到某个周五晚上证书快过期了,才想起这件事不能靠日历提醒。本文以 Kubernetes 服务为例,讲清楚怎么把 cert-manager 当执行层,把 Venafi 当策略和 CA 门卫,做到声明式签发、自动续期、私钥轮转,以及应用侧平滑 reload。


Continue reading

Axios 被投毒:一场教科书级的供应链攻击复盘

Posted on 三 01 4月 2026 in Tech • Tagged with security, supply-chain, npm, axios, RAT, dependency-management

2026 年 3 月 31 日,周下载量过亿的 npm 包 axios 被投毒,两小时内所有 npm install 的机器可能已沦陷。这次事件再次说明:你写的代码也许没有 bug,但你装的依赖里可能藏着一扇后门。


Continue reading

从 LiteLLM 供应链投毒事件聊聊密钥安全

Posted on 六 28 3月 2026 in Tech • Tagged with security, supply-chain, python, secrets-management, LiteLLM

2026年3月,LiteLLM 遭遇供应链投毒,恶意包窃取用户密钥和云凭证。本文从 .pth 文件机制、漏洞根因、密钥不落盘理念到业界通用方案,聊聊 AI 时代的密钥安全。


Continue reading

证书这活儿:PEM/JKS/P12 怎么选、免费证书哪家强、自动轮换怎么搞

Posted on 二 24 3月 2026 in Journal • Tagged with certificate, TLS, SSL, PEM, JKS, PKCS12, Let's Encrypt, cert-manager, security, DevOps

以我自己的个人网站证书过期为引子,讲清楚 Root CA、Intermediate CA、Leaf Certificate 的职责、格式与验证过程,再把 PEM/JKS/P12 的选择和自动轮换这件事说透。


Continue reading

Workload Identity:别再把云上身份塞进 Secret 里了

Posted on 四 19 3月 2026 in Journal • Tagged with journal, blog, security, cloud, kubernetes, iam, workload identity

讲清楚 workload identity 是什么、为什么它比长期凭证更靠谱,以及在 Kubernetes 和云平台里如何落地。


Continue reading

网络安全指北之 Broken Auth and Session Management:登录与会话管理翻车指南

Posted on 五 06 3月 2026 in Tech • Tagged with tech, blog, security, auth, session

认证翻车和会话翻车, 往往不是因为黑客太聪明, 而是我们把"登录态"当成了万能钥匙: cookie 没设好、token 乱放、会话不轮换、登出不失效。本文用人话拆解常见坑, 给出 Java/Go/Python 可直接抄的防护套路与自检清单。


Continue reading

从 RBAC 到 OpenFGA:细粒度授权的架构、落地与取舍

Posted on 四 05 3月 2026 in Tech • Tagged with authorization, rbac, openfga, zanzibar, security, fine-grained-authorization, 授权, 访问控制

RBAC 是授权领域的"老黄牛",简单可靠,但在多租户、层级继承、动态共享等场景下力不从心。OpenFGA 基于 Google Zanzibar 论文,用关系元组(Relationship Tuple)重新定义了授权模型。本文从 RBAC 的局限出发,深入剖析 OpenFGA 的架构设计,探讨商业公司落地的路径与风险,以及开源方案与自研的取舍。


Continue reading

网络安全指北之 CSRF:Cross-Site Request Forgery (跨站请求伪造)

Posted on 一 02 3月 2026 in Tech • Tagged with tech, blog, security

CSRF 不靠"攻破你的网站",它靠的是"借你的登录态办坏事"。这篇文章把 CSRF 的本质讲清楚,顺便给出 Java/Go/Python 里能直接抄的防护做法:token、SameSite、Referer/Origin 校验,以及什么时候该用哪个。


Continue reading

网络安全指北之 IDOR: Insecure Direct Object Reference (对象引用越权)

Posted on 一 02 3月 2026 in Tech • Tagged with tech, blog, security

IDOR 不玄学,就一句话:你用 "id=123" 这种直达链接访问资源时,服务端有没有确认 "你就是 123 的主人"。这篇文章用可抄的例子讲清楚:它怎么发生,怎么被利用,怎么在 Java/Go/Python 里修到位。


Continue reading