知识卡片
对象授权须逐请求校验
调用者有访问某个操作的权限之后,还要验证其对本次请求目标对象的访问权限。契约 lint 可推动使用不易猜测的标识,但标识形式仅降低被随意枚举的机会。对象权限应在服务实现明确,并由受控的防御性检查核对授权策略。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 自定义 Lint 与安全检查 10.2 Automated security review of your API definitions · 查看原书依据
You can see from the results that several of the endpoints are using numeric identifiers, which can be guessable. To mitigate this, the design of the endpoints should be changed to use a Universally Unique Identifier (UUID) instead. Table 10.1 summarizes this vulnerability and how it can be detected with linting.
参考来源
- 位置:《Automating API Delivery APIOps with OpenAPI》《第 10 章 自定义 Lint 与安全检查》(10.2 Automated security review of your API definitions;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-10.xhtml#p101)
- 结论依据:原文以标识符类型作为设计检查信号,紧接着说明还要验证对象级授权。
- 原始内容:You can see from the results that several of the endpoints are using numeric identifiers, which can be guessable. To mitigate this, the design of the endpoints should be changed to use a Universally Unique Identifier (UUID) instead. Table 10.1 summarizes this vulnerability and how it can be detected with linting.