Commit d9d55c2
committed
refactor(credentials): drop the principal abstraction, keep the identity fixes
#6201 introduced a ServiceAccountPrincipal union mirrored centrally into audit
and blob metadata, and replaced 21 provider-named audit keys with uniform ones.
Nothing reads any of it. It was built for an identity UI that was deliberately
not shipped, and the audit-key rename is a breaking change for anything
consuming those rows.
The gap it was meant to close needed a fraction of that: Atlassian already
resolved its accountId, it just was not recorded where every other provider
records its identifier.
Removes principal.ts, the required-nullable field on all three registry result
types, and the central mirroring. Restores the per-provider audit keys, so the
only breaking change in #6201 is undone. 14 validators, both registry
server.ts files, errors.ts, Zoom, Zoho Desk and 12 test files are byte-identical
to main again — each verified as a pure principal swap with no fix inside.
Keeps every bug fix: atlassianAccountId + email, googleClientEmail/projectId and
slackBotUserId now land in auditMetadata alongside the existing keys; Box and
Salesforce log identity-lookup failures (neither file had a logger, so a
degraded connect left no trace); Shopify no longer rejects a working credential
on a partial-scope error; Google/Slack rotation still re-labels and records the
new identity.
Also drops providerFailureReason, which became dead code once the minters were
rebuilt on main's shape.1 parent 03333ce commit d9d55c2
43 files changed
Lines changed: 160 additions & 475 deletions
File tree
- apps/sim/lib/credentials
- client-credential-accounts
- minters
- orchestration
- token-service-accounts
- validators
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | | - | |
89 | | - | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 109 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 110 | | |
129 | 111 | | |
130 | 112 | | |
| |||
136 | 118 | | |
137 | 119 | | |
138 | 120 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 121 | | |
144 | 122 | | |
145 | 123 | | |
| |||
Lines changed: 20 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | | - | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 27 | | |
37 | | - | |
38 | 28 | | |
39 | 29 | | |
40 | 30 | | |
| |||
67 | 57 | | |
68 | 58 | | |
69 | 59 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 60 | + | |
| 61 | + | |
73 | 62 | | |
74 | 63 | | |
75 | 64 | | |
76 | 65 | | |
77 | 66 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 67 | + | |
| 68 | + | |
87 | 69 | | |
88 | | - | |
89 | | - | |
| 70 | + | |
90 | 71 | | |
91 | 72 | | |
92 | 73 | | |
93 | 74 | | |
94 | | - | |
| 75 | + | |
95 | 76 | | |
96 | 77 | | |
97 | 78 | | |
98 | | - | |
| 79 | + | |
99 | 80 | | |
100 | 81 | | |
101 | 82 | | |
102 | | - | |
| 83 | + | |
103 | 84 | | |
104 | | - | |
105 | | - | |
| 85 | + | |
106 | 86 | | |
107 | 87 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 88 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
123 | 98 | | |
124 | 99 | | |
125 | 100 | | |
126 | | - | |
| 101 | + | |
127 | 102 | | |
128 | 103 | | |
129 | 104 | | |
130 | | - | |
| 105 | + | |
131 | 106 | | |
132 | 107 | | |
133 | 108 | | |
| |||
Lines changed: 3 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
| 96 | + | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
105 | 100 | | |
106 | 101 | | |
| 102 | + | |
107 | 103 | | |
108 | 104 | | |
109 | 105 | | |
| |||
263 | 259 | | |
264 | 260 | | |
265 | 261 | | |
266 | | - | |
| 262 | + | |
267 | 263 | | |
268 | 264 | | |
269 | 265 | | |
| |||
275 | 271 | | |
276 | 272 | | |
277 | 273 | | |
278 | | - | |
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
282 | 277 | | |
283 | 278 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | 279 | | |
303 | 280 | | |
304 | 281 | | |
| |||
0 commit comments