← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3512.g.1

BFF把后端凭据留在服务端

理解等级:高级

手机或单页应用可把用户令牌发给面向前端的后端BFF,由BFF验证用户,再使用后端所需的API密钥或令牌调用。若前后端API理解同一用户体系,也可由客户端直接带用户令牌调用,省去专门BFF。两者都必须在可信端授权,BFF的主要价值是隔离秘密与整合安全交互,不是让客户端声明的身份天然可信。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 宏观架构中的安全 · 查看原书依据

      In the figure, we pass Bob’s token to the BFF and verify the validity of the token to authenticate users. To call the API from the BFF, we can either use API keys, Bob’s token, or an exchanged token, based on what is required by the backend APIs.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第08章《宏观架构中的安全》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch08.xhtml) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:In the figure, we pass Bob’s token to the BFF and verify the validity of the token to authenticate users. To call the API from the BFF, we can either use API keys, Bob’s token, or an exchanged token, based on what is required by the backend APIs.