@moq/net cannot identify a refused or revoked configured token

未关闭
#10,331 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
34/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Start by tracing Connection, Connection.answered(), connection.auth, and Handle.add() in the Rust client, then inspect how configured tokens are presented across reconnects and how SETUP credentials are handled. The issue gives an in-memory lite-07 relay reproduction at commit 62c0ec81fa to use as a starting point. Done means each configured token exposes pending, granted, refused, or revoked state without revealing token bytes in errors or logs.

由索引模型根据 Issue 内容生成。

描述

A client can share one lite-07 connection across several independently authorized subscriptions by passing a Signal<readonly string[]> to Connection. It needs to replace a credential the peer refuses or revokes while the other subscriptions keep their access.

Connection.answered() rejects with the first error for the set, and connection.auth exposes the union of live grants. Neither identifies which configured token was refused. The answer also latches, so a revocation after a successful answer does not change it. Handle.add() returns a per-token credential, but presents an additional AUTH stream when used to observe a token the connection already presents.

I reproduced this with an in-memory lite-07 relay at 62c0ec81fa:

  1. Connect with configured tokens [primary, alpha, beta]. Grant the connection credential for the primary path and leave both additional tokens pending.
  2. Refuse alpha with Unauthorized and leave beta pending. Repeat on a fresh connection with the two roles swapped.
  3. Both runs leave the connection connected, grant only primary, and reject answered() with the same error. The client cannot tell which token to replace.

A configured token needs an observable pending, granted, refused, or revoked state across reconnects, including when it is the SETUP credential. The application should be able to identify the affected input without putting token bytes in errors or logs.

(Written by GPT-6.2 Sol with xhigh)

主要语言
Rust
星标
1.6k
派生
251
平均合并
10 小时 10 分钟
30 天内合并 PR
832

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

moq-dev/moq 的其他 Issue

查看 moq-dev/moq 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。