← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 10296.b.1.c.1.c.4.b · 生成模型:未记录

清楚声明认证授权机制

理解等级:中级

OpenAPI 用 security scheme 列出可用凭据或机制,在全局与各操作的要求处声明适用条件。API key 常用于标识应用,mTLS 互验双方证书,OAuth2 委托资源权限,OIDC 在其上验证终端用户身份。静态规则可以检查操作是否有声明,公开登录或注册等例外应独立评审和保护。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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.