Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
浏览器实测(Playwright + CDP 虚拟认证器,真实前后端)抓到一个真问题:注册时用户句柄取自 Redis 里的登录快照、 登录时取自库,两边不一致就永远登不上。改成注册时从库里读(包 bypass_data_scope,否则 STAFF 这类连自己都查不到), 补了复现测试,两处变异各自红。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ADME Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
用指纹 / 面容 / 设备 PIN 代替密码登录(WebAuthn,可发现凭据,要求用户验证 UV)。默认关闭:
.env里配齐PASSKEY_RP_ID+PASSKEY_ORIGINS才开启,没配时登录页不出按钮。sys_user_passkey表 + 迁移av000000userpasskey;passkey_service(Redis 一次性挑战 GETDEL · 签名计数 · userHandle 核对 · 每人上限 10);接口/auth/passkey/{enabled,options,login}(匿名、限流)、/sys/users/me/passkeys*(本人增删改查)、DELETE /sys/users/{pk}/passkeys(超管清除);数据变更审计登记;生产配置检查(只配一个 / IP / localhost / 非 HTTPS / 域名不匹配都拦)webauthn>=3.0.1(py_webauthn)app/admin分册新增一节(设计取舍 ·localhost不能换127.0.0.1· Redis 快照 uuid 那个坑);文档站登录安全 / 安全配置 / 总览 + 两份 README怎么验证的
test_passkey.py28 条:软件认证器(P-256 + CBOR)真走注册和登录;挑战一次性、断言回放、origin / UV / 计数器倒退 / userHandle 不符、重复添加、上限、越权 404、停用账号、跳过 MFA、失败只计 IP、超管清除、审计记录、生产检查。12 处变异全部当场红test_mfa·test_auth·test_data_change·security/·test_i18n·test_wire_format·test_migrations(PostgreSQL 私有库,迁移 up → down → up)127.0.0.1打开给域名提示 → 删除 → 删掉后再登录给同一句「无效」tsc(platform / web)· eslint ·arch:check·i18n:check/i18n:jsx·ctx:check· 文档站构建(链接 0 断链 · 标题 · 字阶)没验证的
🤖 Generated with Claude Code