Reject requests when translated Namespace is not a valid Cloud Namespace
维护者通常 1 天内回复
@kriyanshii 已经在做这个了。
开始于 2026年11月16日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- go
调研方向
先从 internal/proxy/cloudns.go 中的 cloudNamespaceUnaryInterceptor 和 cloudNamespaceStreamInterceptor 开始,然后阅读 internal/proxy/cloudns_test.go 中的表驱动测试。更新测试,以检查无效的翻译后 namespace 会在转发前被拒绝。完成标准是调用方收到 codes.InvalidArgument,并附带本地和远程 namespace 以及验证错误。
由索引模型根据 Issue 内容生成。
描述
Problem
When an upstream is Temporal Cloud, the proxy checks each request's translated Namespace with cloud.ValidateNamespace. If the check fails, it logs outbound namespace is not valid (at debug level) and forwards the request anyway. Cloud then rejects it, and the caller gets an error that says nothing about the Namespace.
For example, with a suffix rule on a Cloud upstream:
namespaces:
rules:
suffix: .${TEMPORAL_ACCOUNT}
A client that sends the fully-qualified name quickstart.a1b2c has it translated to quickstart.a1b2c.a1b2c. With buf curl, the caller sees:
code: internal
message: stream terminated by RST_STREAM with error code: PROTOCOL_ERROR
The real reason only shows up in the proxy's log, and then, only with --level debug set:
{"level":"debug","component":"translation","localNamespace":"quickstart.a1b2c","remoteNamespace":"quickstart.a1b2c.a1b2c","error":": id: is malformed. Should be <name>.<account-id>","message":"outbound namespace is not valid"}
[!NOTE]
This isn't a regression. It's the same on previous releases (e.g. v1.1.0).
Proposed change
In cloudNamespaceUnaryInterceptor and cloudNamespaceStreamInterceptor, when the translated Namespace fails
cloud.ValidateNamespace, return a codes.InvalidArgument status before calling the invoker or streamer. The message
should name the local and remote Namespaces and include the validation error, so a caller can fix the request without
access to the proxy's logs.
Where to look
internal/proxy/cloudns.go: the two interceptors andlogNonCloudNamespaceinternal/proxy/cloudns_test.go: table-driven tests that currently assert the debug entry and that the call is still forwardedinternal/dataplane/dataplane.go: the only caller, which installs these dial options on Cloud upstreams
- 主要语言
- Go
- 星标
- 32
- 派生
- 14
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 62
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/temporal-proxy 的其他 Issue
-
Reject unknown config keys at startup可能已有人在做 @pseudomuto 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
temporalio/temporal-proxy#330 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 71/100
temporalio/temporal-proxy#329 ·
维护者通常 1 天内回复
-
Don't seal compute provider and scaler details on worker deployment calls可能已有人在做 @rahulsjha 今天认领。 未关闭enhancement good first issue
难度 3/5 1-2 天 新手友好度 68/100
temporalio/temporal-proxy#334 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
temporalio/temporal-proxy#178 ·
维护者通常 1 天内回复
查看 temporalio/temporal-proxy 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
seriousm4x/UpSnap#1786 ·
-
bug feedback ui/ux
难度 2/5 1-3 小时 新手友好度 67/100
peasant-labs/peasant#1307 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
connectrpc/conformance#1211 ·
维护者通常 1 天内回复
-
bug effort:s impact:med raised-by:desk risk:low
难度 2/5 1-3 小时 新手友好度 75/100
medici-finance/assay#8342 · 1 条评论 ·
维护者通常 1 天内回复
-
hardening
难度 2/5 1-3 小时 新手友好度 82/100
inference-sim/inference-sim#2821 ·
维护者通常 1 天内回复