知识卡片

普通读书笔记卡 · 3278

授权还需核对对象与功能

理解等级:高级

接口授权要同时检查调用者是否能操作某个对象,以及是否能执行该功能。只核对令牌有效或接口级 scope,可能让用户通过改对象 ID 访问他人数据,或调用仅管理员可用的操作。每个端点都应在实际资源上下文做权限判断。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      BOLA is when a user is able to request information for an object that they should not have access to, often discovered by tampering with a resource ID. Broken Function Level Authorization is when the user can perform tasks they are not authorized to do, for example executing an administration-only endpoint as a standard user.

    参考来源

    - 位置:《Mastering API Architecture》第7章《API Authentication and Authorization》之《Authorization Enforcement》(源文件:_epub-src/OEBPS/ch07.xhtml) - 结论依据:原文分别解释对象级授权失效和功能级授权失效,并强调每个端点在满足请求前都要授权检查。 - 原始内容:BOLA is when a user is able to request information for an object that they should not have access to, often discovered by tampering with a resource ID. Broken Function Level Authorization is when the user can perform tasks they are not authorized to do, for example executing an administration-only endpoint as a standard user.