Commit ee1ff0d
authored
Add Principal to the base HistoryEvent (#733)
<!-- Describe what has changed in this PR -->
**What changed?**
Added a `Principal` message to `temporal.api.common.v1` and a principal
field on the base `HistoryEvent` proto to support server-computed caller
identity on history events.
The change is already tested with the server PR. Here’s a sneak peek at
the history event with the principal set:
```
{
"eventId": "5",
"eventTime": "2026-03-18T02:09:49.481998Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED",
"taskId": "1048704",
"principal": {
"type": "jwt",
"name": "signal-sender"
},
```
<!-- Tell your future self why have you made these changes -->
**Why?**
Today, the identity field on history events is client-supplied and can
be set to any value, making it unsuitable for auditing. Principal
Attribution attaches a server-computed, immutable identifier derived
from trusted authentication context (JWT claims, mTLS certificates) to
history events, enabling reliable answers to "who did this?" for
compliance, security auditing, and root cause analysis.
<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
None. This is a purely additive proto change.
<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
N/A1 parent db5f593 commit ee1ff0d
4 files changed
Lines changed: 45 additions & 0 deletions
File tree
- openapi
- temporal/api
- common/v1
- history/v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13044 | 13044 | | |
13045 | 13045 | | |
13046 | 13046 | | |
| 13047 | + | |
| 13048 | + | |
| 13049 | + | |
| 13050 | + | |
13047 | 13051 | | |
13048 | 13052 | | |
13049 | 13053 | | |
| |||
14634 | 14638 | | |
14635 | 14639 | | |
14636 | 14640 | | |
| 14641 | + | |
| 14642 | + | |
| 14643 | + | |
| 14644 | + | |
| 14645 | + | |
| 14646 | + | |
| 14647 | + | |
| 14648 | + | |
| 14649 | + | |
| 14650 | + | |
| 14651 | + | |
| 14652 | + | |
| 14653 | + | |
| 14654 | + | |
14637 | 14655 | | |
14638 | 14656 | | |
14639 | 14657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10193 | 10193 | | |
10194 | 10194 | | |
10195 | 10195 | | |
| 10196 | + | |
| 10197 | + | |
| 10198 | + | |
| 10199 | + | |
10196 | 10200 | | |
10197 | 10201 | | |
10198 | 10202 | | |
| |||
11727 | 11731 | | |
11728 | 11732 | | |
11729 | 11733 | | |
| 11734 | + | |
| 11735 | + | |
| 11736 | + | |
| 11737 | + | |
| 11738 | + | |
| 11739 | + | |
| 11740 | + | |
| 11741 | + | |
| 11742 | + | |
| 11743 | + | |
| 11744 | + | |
| 11745 | + | |
11730 | 11746 | | |
11731 | 11747 | | |
11732 | 11748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
249 | 258 | | |
250 | 259 | | |
251 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1136 | 1136 | | |
1137 | 1137 | | |
1138 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
1139 | 1141 | | |
1140 | 1142 | | |
1141 | 1143 | | |
| |||
0 commit comments