知识卡片
异步认证通知只是一环
登录服务可发出事件,由独立处理器生成并登记验证码、发送通知,让页面交互不必阻塞于短信链路。这个拆分只组织工作,不证明认证安全。原示例random.randint不适于安全随机码;应使用密码学安全随机源,并另行设计身份绑定、有效期、尝试限制、单次消费和重复事件处理,不能直接部署书中示例。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 9. Functions and Event-Driven Processing · 查看原书依据
A better option is to register a FaaS to asynchronously generate the random number, register it with the login service, and send the number to the user’s phone. In this way, the login server can simply fire an asynchronous web-hook request to a FaaS, and that FaaS can
参考来源
- 位置:《Designing Distributed Systems, 2nd Edition》第09章《Chapter 9. Functions and Event-Driven Processing》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch09.html)
- 结论依据:原文用异步生成登记发送解释解耦;随机数安全由Python官方secrets文档核验,额外防护列为待设计条件。
- 原始内容:A better option is to register a FaaS to asynchronously generate the random number, register it with the login service, and send the number to the user’s phone. In this way, the login server can simply fire an asynchronous web-hook request to a FaaS, and that FaaS can