知识卡片
入口校验不能替代服务校验
网关按 API 契约拦截格式错误的请求,可在入口减少攻击面,但后端仍要校验和安全处理输入。服务可能被内部链路调用,契约也未必表达所有业务限制;数据库访问还需使用适当参数化方式。防护应有多层独立检查。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
It is worth mentioning that although input validation is valuable when conducted at the API gateway, it does not mean you can omit further input validation and sanitization within the backend services; trust, but verify!
参考来源
- 位置:《Mastering API Architecture》第6章《Operational Security: Threat Modeling for APIs》之《Step 4: Identify Threats—Taking This in Your STRIDE》(源文件:_epub-src/OEBPS/ch06.xhtml)
- 结论依据:原文明确指出网关输入验证有价值,但不能省去服务内验证与清理,并以预编译语句说明第二层防护。
- 原始内容:It is worth mentioning that although input validation is valuable when conducted at the API gateway, it does not mean you can omit further input validation and sanitization within the backend services; trust, but verify!