Repository navigation
fix(dsh-oidc): 刷新未续签 ID Token 时静默重认证 - #314
Closed
SHOscarChen wants to merge 3 commits into
Closed
SHOscarChen wants to merge 3 commits into
SHOscarChen wants to merge 3 commits into
Conversation
OIDC 允许刷新响应省略 ID Token。签发方省略时,远程访问在中继断开后只能 要求重新登录。现在: - 刷新请求携带已授权 scope,并在严格签发方拒绝时回退为原请求; - ID Token 临近到期且刷新未续签时,桌面端用 prompt=none 静默重认证一次, 单飞、15 分钟冷却,失败仍回退现有错误; - 静默重认证只能续接同一身份,回调不向浏览器输出登录页。
SHOscarChen
marked this pull request as draft
November 12, 2026 04:31
SHOscarChen
marked this pull request as ready for review
November 12, 2026 07:35
Member
|
感谢对 ID Token 续期问题的排查和修复尝试。维护侧已确认,本次学校服务场景的问题已在 OIDC 服务端解决:刷新授权时会续签 ID Token,现有客户端可接收并使用新的 Token。 因此这次不再引入额外的浏览器重认证兜底,关闭本 PR,不作合并;关联问题 #313 一并按已解决关闭。感谢贡献! |
Closed
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.
Refs #313
OIDC 允许刷新响应省略 ID Token。签发方省略时,远程访问在中继断开后只能
要求重新登录。现在:
问题与修改
机构 OIDC 模式下,远程访问约一个 ID Token 有效期(实测约 10 小时)后中继断开,设置页显示“登录已过期”;期间主界面模型连接正常。中继独立校验 ID Token 的签名与
exp,不能放宽;OIDC Core §12.2 允许刷新响应省略 ID Token,而客户端当时保留旧 Token,到期后只能要求重新登录。本次修改(仅
packages/dsh-oidc):openid);签发方以 400 拒绝时回退到原刷新请求,不影响现有网关。prompt=none静默重认证一次:复用现有 loopback 回调,单飞(并发请求共享同一次)、15 分钟冷却;失败仍回退现有oidc_identity_token_unavailable。sub,不一致时拒绝并撤销新凭据;回调返回 204,不向浏览器输出登录页。Web 传输不启用静默路径(renewIdentity默认返回 false)。验证
node scripts/packages/manage.mjs check dsh-oidc:通过(147 项测试,0 失败)。prompt=none下是否静默返回(需本地联调);系统浏览器短暂弹出的实际观感;完整 10 小时周期;macOS。bad port),随后直接全量测试与再次运行包检查均通过,与本次改动无关。兼容性与后续事项
renewIdentity、renewIdentitySession)与可选参数。dsh-oidc 版本号与 npm 发布在发行阶段由维护者确认,本 PR 不含版本变更。core.lock.json更新、Release notes 与桌面 Release 分别按各自流程处理。