知识卡片
清楚声明认证授权机制
OpenAPI 用 security scheme 列出可用凭据或机制,在全局与各操作的要求处声明适用条件。API key 常用于标识应用,mTLS 互验双方证书,OAuth2 委托资源权限,OIDC 在其上验证终端用户身份。静态规则可以检查操作是否有声明,公开登录或注册等例外应独立评审和保护。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 自定义 Lint 与安全检查 10.2.3 API2:2023 - Broken Authentication · 查看原书依据
A security mechanism is a method or procedure for achieving a security requirement and enforcing a security policy. For APIs, this will be some defined method for authenticating and authorizing requests to the API, and the API definition is the place to communicate this to consumers.
参考来源
- 位置:《Automating API Delivery APIOps with OpenAPI》《第 10 章 自定义 Lint 与安全检查》(10.2.3 API2:2023 - Broken Authentication;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-10.xhtml#p107)
- 结论依据:原文定义安全机制和 OpenAPI security scheme 并列举可声明的机制。
- 原始内容:A security mechanism is a method or procedure for achieving a security requirement and enforcing a security policy. For APIs, this will be some defined method for authenticating and authorizing requests to the API, and the API definition is the place to communicate this to consumers.