Commit 1848d18
authored
[external API] Add created time to webhook secret views (#8100)
When a webhook secret is created, it is assigned a UUID. In the API,
secrets are always referenced by UUIDs, and do not have names. This is
fine for programmatic access to secrets, such as when a receiver
implementation adds or rotates its secrets automatically. However, it's
less useful for a human user creating or deleting secrets in the UI, as
they would have to keep the various UUIDs straight, which can be
challenging. See discussion in #8083.
While we _could_ add names to the secret resource so that human users
can identify them more easily, this is not ideal either. Secrets, unlike
other resouces, are basically fungible: the only thing a user would
really ever do with them is rotate them, and they have no real semantic
meaning beyond being "the old secret" or "the new secret". Therefore,
giving them names basically just forces the user to come up with a
unique string like "secret1" and "secret2" and so on, which is a bit
unfortunate.
Instead, we should display the creation timestamps of secrets in the UI.
This way, users need not come up with unique names for every secret, but
they can distinguish them beyond their UUID, and the timestamp
communicates the one thing about webhook secrets that the user will
actually care about: is it "the old one" or "the new one"?
This branch updates the external API view for webhook secrets to add a
`time_created` field. The view type itself is renamed from
`WebhookSecretId` to just `WebhookSecret`, since it now contains more
than an ID.
Fixes #80831 parent 6e3fe96 commit 1848d18
7 files changed
Lines changed: 54 additions & 35 deletions
File tree
- nexus
- db-model/src
- external-api/src
- src
- app
- external_api
- tests/integration_tests
- types/src/external_api
- openapi
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 44 | + | |
50 | 45 | | |
51 | 46 | | |
52 | 47 | | |
| |||
156 | 151 | | |
157 | 152 | | |
158 | 153 | | |
159 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
160 | 164 | | |
161 | | - | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3690 | 3690 | | |
3691 | 3691 | | |
3692 | 3692 | | |
3693 | | - | |
| 3693 | + | |
3694 | 3694 | | |
3695 | 3695 | | |
3696 | 3696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | 474 | | |
476 | 475 | | |
477 | 476 | | |
478 | 477 | | |
479 | | - | |
| 478 | + | |
| 479 | + | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8089 | 8089 | | |
8090 | 8090 | | |
8091 | 8091 | | |
8092 | | - | |
| 8092 | + | |
8093 | 8093 | | |
8094 | 8094 | | |
8095 | 8095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | | - | |
| 1082 | + | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | | - | |
| 1096 | + | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1100 | 1104 | | |
1101 | | - | |
| 1105 | + | |
| 1106 | + | |
1102 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1103 | 1111 | | |
1104 | 1112 | | |
1105 | 1113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12692 | 12692 | | |
12693 | 12693 | | |
12694 | 12694 | | |
12695 | | - | |
| 12695 | + | |
12696 | 12696 | | |
12697 | 12697 | | |
12698 | 12698 | | |
| |||
25949 | 25949 | | |
25950 | 25950 | | |
25951 | 25951 | | |
25952 | | - | |
| 25952 | + | |
25953 | 25953 | | |
25954 | 25954 | | |
25955 | 25955 | | |
| |||
26026 | 26026 | | |
26027 | 26027 | | |
26028 | 26028 | | |
26029 | | - | |
| 26029 | + | |
| 26030 | + | |
26030 | 26031 | | |
26031 | 26032 | | |
26032 | | - | |
26033 | | - | |
26034 | | - | |
| 26033 | + | |
| 26034 | + | |
| 26035 | + | |
| 26036 | + | |
| 26037 | + | |
| 26038 | + | |
| 26039 | + | |
| 26040 | + | |
| 26041 | + | |
26035 | 26042 | | |
26036 | 26043 | | |
26037 | 26044 | | |
26038 | | - | |
| 26045 | + | |
| 26046 | + | |
26039 | 26047 | | |
26040 | 26048 | | |
26041 | | - | |
26042 | | - | |
| 26049 | + | |
26043 | 26050 | | |
26044 | 26051 | | |
26045 | | - | |
26046 | | - | |
26047 | | - | |
| 26052 | + | |
| 26053 | + | |
| 26054 | + | |
26048 | 26055 | | |
26049 | 26056 | | |
26050 | 26057 | | |
26051 | | - | |
| 26058 | + | |
26052 | 26059 | | |
26053 | 26060 | | |
26054 | 26061 | | |
| |||
26058 | 26065 | | |
26059 | 26066 | | |
26060 | 26067 | | |
26061 | | - | |
| 26068 | + | |
26062 | 26069 | | |
26063 | 26070 | | |
26064 | 26071 | | |
| |||
0 commit comments