Clarify Principal Attribution vs application identity propagation and execution authorization

未关闭 适合新手
#5,451 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Duncanma 已经在做这个了。

开始于 2026年11月23日。

  • #5796 来自 @Duncanma —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript
领域
documentation

调研方向

先阅读 Principal Attribution 和 Context Propagation 文档页面,然后比较它们对身份和授权范围的描述。添加简洁的注释或交叉链接,明确指出历史归属和传播的应用身份并不能保证对后续 Activity 副作用的当前授权。当两个主题都清楚说明这一区别,且没有暗示 Temporal 会自动重新授权 Activities 时,即为完成。

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

描述

Temporal now documents several adjacent identity/security mechanisms that are easy to mentally collapse:

  • Authorizer / ClaimMapper decide whether incoming Temporal API calls are allowed.
  • Principal Attribution can stamp the Principal returned by the Authorizer onto Event History events.
  • Context Propagation / Interceptors can carry application metadata such as user/tenant/auth values across Client -> Workflow -> Activity boundaries.

For long-running workflows and agent-style execution, I think it would help to document one explicit non-equivalence:

Principal Attribution
!= application identity propagation
!= current authorization for an external Activity side effect

Example:

user U starts a workflow at t1
-> history is attributed to U
-> U is propagated in app context
-> workflow waits/retries
-> U loses permission at t2
-> a side-effecting Activity attempt runs at t3

The historical Principal and propagated application identity can both remain U, while the application's current authorization at t3 may have changed.

I am not suggesting Temporal should automatically re-authorize every Activity or that current behavior is insecure. This is mainly a scope/documentation question: does Principal Attribution intentionally mean only audit attribution of Temporal API/history events, with business/tool authorization continuity remaining application-defined?

If yes, a short cross-link/note near Principal Attribution and Context Propagation could prevent users building durable agents from treating an attributed Principal as an end-to-end authorization guarantee.

I wrote the distinction out in a source/docs-reviewed note here:

https://github.com/hippoley/ClawManager/blob/main/docs/notes/temporal-principal-attribution-vs-execution-authority.md

Given the recent focus on agent security / identity propagation, this seems like a useful boundary to make explicit before stronger execution-authorization semantics are added.

主要语言
JavaScript
星标
177
派生
339
平均合并
2 天 8 小时
30 天内合并 PR
194

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

temporalio/documentation 的其他 Issue

查看 temporalio/documentation 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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