@kici-dev/engine 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/access-log-policy.js +4 -1
- package/dist/audit/retention-policy.js +9 -2
- package/dist/index.js +3 -3
- package/dist/metrics/catalog-policy.d.ts +67 -0
- package/dist/metrics/catalog-policy.js +246 -0
- package/dist/metrics/metric-catalog.generated.d.ts +219 -2
- package/dist/metrics/metric-catalog.generated.js +246 -8
- package/dist/protocol/cluster-name.d.ts +35 -0
- package/dist/protocol/cluster-name.js +43 -0
- package/dist/protocol/dashboard-write-operations.d.ts +170 -0
- package/dist/protocol/dashboard-write-operations.js +324 -0
- package/dist/protocol/messages/access-log.d.ts +51 -26
- package/dist/protocol/messages/access-log.js +8 -3
- package/dist/protocol/messages/actor.js +3 -3
- package/dist/protocol/messages/auth.d.ts +25 -0
- package/dist/protocol/messages/capabilities.d.ts +25 -0
- package/dist/protocol/messages/capabilities.js +14 -3
- package/dist/protocol/messages/dashboard.d.ts +311 -10
- package/dist/protocol/messages/dashboard.js +85 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +221 -6
- package/dist/protocol/messages/platform-orchestrator.js +41 -8
- package/dist/protocol/messages/source-registration.d.ts +2 -0
- package/dist/protocol/messages/source-registration.js +21 -0
- package/dist/registration/registerable-trigger-type.d.ts +1 -1
- package/dist/ws/close-codes.d.ts +6 -0
- package/dist/ws/close-codes.js +7 -1
- package/package.json +13 -2
- package/sbom.spdx.json +5 -5
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import "../chunk-gOLHoazu.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/protocol/dashboard-write-operations.ts
|
|
4
|
+
/**
|
|
5
|
+
* Registry of dashboard write operations governed by the per-orch
|
|
6
|
+
* dashboard-write policy.
|
|
7
|
+
*
|
|
8
|
+
* Subpath export: consumers import from
|
|
9
|
+
* `@kici-dev/engine/protocol/dashboard-write-operations`. The file is pure
|
|
10
|
+
* Zod + plain TypeScript with no node built-ins, so it remains
|
|
11
|
+
* browser-safe and is also imported directly by the dashboard SPA for
|
|
12
|
+
* capability rendering.
|
|
13
|
+
*
|
|
14
|
+
* Three audiences read this registry:
|
|
15
|
+
* - Orchestrator: enforces the policy per operation in dashboard.* handlers.
|
|
16
|
+
* - Platform: gates HTTP routes that proxy to the orch.
|
|
17
|
+
* - Dashboard: renders per-control state (enabled / disabled / loading).
|
|
18
|
+
*
|
|
19
|
+
* Adding a new operation: append an entry to `DashboardWriteOperation`
|
|
20
|
+
* (the Zod enum) and `DASHBOARD_WRITE_OPERATIONS` (the descriptor array).
|
|
21
|
+
* The runtime build-time tests on the orchestrator and Platform sides
|
|
22
|
+
* fail until at least one gate handler references the new operation.
|
|
23
|
+
*/
|
|
24
|
+
const DashboardWriteOperation = z.enum([
|
|
25
|
+
"secrets.set",
|
|
26
|
+
"secrets.delete",
|
|
27
|
+
"secrets.scope.create",
|
|
28
|
+
"secrets.scope.rename",
|
|
29
|
+
"secrets.scope.delete",
|
|
30
|
+
"variables.set",
|
|
31
|
+
"variables.delete",
|
|
32
|
+
"environments.create",
|
|
33
|
+
"environments.update",
|
|
34
|
+
"environments.delete",
|
|
35
|
+
"environments.bindings.set",
|
|
36
|
+
"environments.source_overrides.set",
|
|
37
|
+
"environments.source_overrides.delete",
|
|
38
|
+
"held_runs.approve",
|
|
39
|
+
"held_runs.reject",
|
|
40
|
+
"event_dlq.retry",
|
|
41
|
+
"event_dlq.discard",
|
|
42
|
+
"registration.disable",
|
|
43
|
+
"registration.delete",
|
|
44
|
+
"global_workflows.update",
|
|
45
|
+
"backends.sync",
|
|
46
|
+
"backends.sync_one",
|
|
47
|
+
"backends.test"
|
|
48
|
+
]);
|
|
49
|
+
/** Stable list of every operation in enum-declaration order. */
|
|
50
|
+
const DASHBOARD_WRITE_OPERATION_VALUES = Object.freeze([
|
|
51
|
+
"secrets.set",
|
|
52
|
+
"secrets.delete",
|
|
53
|
+
"secrets.scope.create",
|
|
54
|
+
"secrets.scope.rename",
|
|
55
|
+
"secrets.scope.delete",
|
|
56
|
+
"variables.set",
|
|
57
|
+
"variables.delete",
|
|
58
|
+
"environments.create",
|
|
59
|
+
"environments.update",
|
|
60
|
+
"environments.delete",
|
|
61
|
+
"environments.bindings.set",
|
|
62
|
+
"environments.source_overrides.set",
|
|
63
|
+
"environments.source_overrides.delete",
|
|
64
|
+
"held_runs.approve",
|
|
65
|
+
"held_runs.reject",
|
|
66
|
+
"event_dlq.retry",
|
|
67
|
+
"event_dlq.discard",
|
|
68
|
+
"registration.disable",
|
|
69
|
+
"registration.delete",
|
|
70
|
+
"global_workflows.update",
|
|
71
|
+
"backends.sync",
|
|
72
|
+
"backends.sync_one",
|
|
73
|
+
"backends.test"
|
|
74
|
+
]);
|
|
75
|
+
const DashboardWriteCategory = z.enum([
|
|
76
|
+
"Secrets",
|
|
77
|
+
"Variables",
|
|
78
|
+
"Environments",
|
|
79
|
+
"Bindings",
|
|
80
|
+
"Held runs",
|
|
81
|
+
"DLQ",
|
|
82
|
+
"Registrations",
|
|
83
|
+
"Topology"
|
|
84
|
+
]);
|
|
85
|
+
const DashboardWriteSensitivity = z.enum([
|
|
86
|
+
"plaintext",
|
|
87
|
+
"authority",
|
|
88
|
+
"dispatch"
|
|
89
|
+
]);
|
|
90
|
+
const DASHBOARD_WRITE_OPERATIONS = Object.freeze([
|
|
91
|
+
{
|
|
92
|
+
name: "secrets.set",
|
|
93
|
+
wireMessageType: "dashboard.environments.secrets.set",
|
|
94
|
+
category: "Secrets",
|
|
95
|
+
label: "Set secret value",
|
|
96
|
+
sensitivity: "plaintext",
|
|
97
|
+
cliEquivalent: "kici-admin secret set"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "secrets.delete",
|
|
101
|
+
wireMessageType: "dashboard.environments.secrets.delete",
|
|
102
|
+
category: "Secrets",
|
|
103
|
+
label: "Delete secret",
|
|
104
|
+
sensitivity: "authority",
|
|
105
|
+
cliEquivalent: "kici-admin secret delete"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "secrets.scope.create",
|
|
109
|
+
wireMessageType: "dashboard.environments.secrets.scope.create",
|
|
110
|
+
category: "Secrets",
|
|
111
|
+
label: "Create secret scope",
|
|
112
|
+
sensitivity: "authority",
|
|
113
|
+
cliEquivalent: "kici-admin secret scope create"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "secrets.scope.rename",
|
|
117
|
+
wireMessageType: "dashboard.environments.secrets.scope.rename",
|
|
118
|
+
category: "Secrets",
|
|
119
|
+
label: "Rename secret scope",
|
|
120
|
+
sensitivity: "authority",
|
|
121
|
+
cliEquivalent: "kici-admin secret scope rename"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "secrets.scope.delete",
|
|
125
|
+
wireMessageType: "dashboard.environments.secrets.scope.delete",
|
|
126
|
+
category: "Secrets",
|
|
127
|
+
label: "Delete secret scope",
|
|
128
|
+
sensitivity: "authority",
|
|
129
|
+
cliEquivalent: "kici-admin secret scope delete"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "variables.set",
|
|
133
|
+
wireMessageType: "dashboard.environments.variables.set",
|
|
134
|
+
category: "Variables",
|
|
135
|
+
label: "Set variable value",
|
|
136
|
+
sensitivity: "plaintext",
|
|
137
|
+
cliEquivalent: "kici-admin variable set"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "variables.delete",
|
|
141
|
+
wireMessageType: "dashboard.environments.variables.delete",
|
|
142
|
+
category: "Variables",
|
|
143
|
+
label: "Delete variable",
|
|
144
|
+
sensitivity: "authority",
|
|
145
|
+
cliEquivalent: "kici-admin variable delete"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "environments.create",
|
|
149
|
+
wireMessageType: "dashboard.environments.create",
|
|
150
|
+
category: "Environments",
|
|
151
|
+
label: "Create environment",
|
|
152
|
+
sensitivity: "authority",
|
|
153
|
+
cliEquivalent: "kici-admin environment create"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "environments.update",
|
|
157
|
+
wireMessageType: "dashboard.environments.update",
|
|
158
|
+
category: "Environments",
|
|
159
|
+
label: "Update environment",
|
|
160
|
+
sensitivity: "authority",
|
|
161
|
+
cliEquivalent: "kici-admin environment set-policy"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "environments.delete",
|
|
165
|
+
wireMessageType: "dashboard.environments.delete",
|
|
166
|
+
category: "Environments",
|
|
167
|
+
label: "Delete environment",
|
|
168
|
+
sensitivity: "authority",
|
|
169
|
+
cliEquivalent: "kici-admin environment delete"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "environments.bindings.set",
|
|
173
|
+
wireMessageType: "dashboard.environments.bindings.set",
|
|
174
|
+
category: "Bindings",
|
|
175
|
+
label: "Set environment binding",
|
|
176
|
+
sensitivity: "authority",
|
|
177
|
+
cliEquivalent: "kici-admin environment bind"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "environments.source_overrides.set",
|
|
181
|
+
wireMessageType: "dashboard.environments.source-overrides.set",
|
|
182
|
+
category: "Bindings",
|
|
183
|
+
label: "Set source override",
|
|
184
|
+
sensitivity: "authority",
|
|
185
|
+
cliEquivalent: "kici-admin environment source-override set"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "environments.source_overrides.delete",
|
|
189
|
+
wireMessageType: "dashboard.environments.source-overrides.delete",
|
|
190
|
+
category: "Bindings",
|
|
191
|
+
label: "Delete source override",
|
|
192
|
+
sensitivity: "authority",
|
|
193
|
+
cliEquivalent: "kici-admin environment source-override delete"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "held_runs.approve",
|
|
197
|
+
wireMessageType: "dashboard.held-runs.approve",
|
|
198
|
+
category: "Held runs",
|
|
199
|
+
label: "Approve held run",
|
|
200
|
+
sensitivity: "dispatch",
|
|
201
|
+
cliEquivalent: "kici-admin runs approve"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "held_runs.reject",
|
|
205
|
+
wireMessageType: "dashboard.held-runs.reject",
|
|
206
|
+
category: "Held runs",
|
|
207
|
+
label: "Reject held run",
|
|
208
|
+
sensitivity: "dispatch",
|
|
209
|
+
cliEquivalent: "kici-admin runs reject"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "event_dlq.retry",
|
|
213
|
+
wireMessageType: "dashboard.event-dlq.retry",
|
|
214
|
+
category: "DLQ",
|
|
215
|
+
label: "Retry dead-lettered webhook",
|
|
216
|
+
sensitivity: "dispatch",
|
|
217
|
+
cliEquivalent: "kici-admin event-dlq retry"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "event_dlq.discard",
|
|
221
|
+
wireMessageType: "dashboard.event-dlq.discard",
|
|
222
|
+
category: "DLQ",
|
|
223
|
+
label: "Discard dead-lettered webhook",
|
|
224
|
+
sensitivity: "dispatch",
|
|
225
|
+
cliEquivalent: "kici-admin event-dlq discard"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "registration.disable",
|
|
229
|
+
wireMessageType: "dashboard.registration.disable",
|
|
230
|
+
category: "Registrations",
|
|
231
|
+
label: "Disable workflow registration",
|
|
232
|
+
sensitivity: "dispatch",
|
|
233
|
+
cliEquivalent: "kici-admin registration disable"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "registration.delete",
|
|
237
|
+
wireMessageType: "dashboard.registration.delete",
|
|
238
|
+
category: "Registrations",
|
|
239
|
+
label: "Delete workflow registration",
|
|
240
|
+
sensitivity: "dispatch",
|
|
241
|
+
cliEquivalent: "kici-admin registration delete"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "global_workflows.update",
|
|
245
|
+
wireMessageType: "dashboard.global-workflows.update",
|
|
246
|
+
category: "Topology",
|
|
247
|
+
label: "Update global workflow policy",
|
|
248
|
+
sensitivity: "dispatch",
|
|
249
|
+
cliEquivalent: "kici-admin org-settings global-workflows set"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "backends.sync",
|
|
253
|
+
wireMessageType: "dashboard.backends.sync",
|
|
254
|
+
category: "Topology",
|
|
255
|
+
label: "Sync all scaler backends",
|
|
256
|
+
sensitivity: "dispatch",
|
|
257
|
+
cliEquivalent: "kici-admin backend sync"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: "backends.sync_one",
|
|
261
|
+
wireMessageType: "dashboard.backends.sync.one",
|
|
262
|
+
category: "Topology",
|
|
263
|
+
label: "Sync one scaler backend",
|
|
264
|
+
sensitivity: "dispatch",
|
|
265
|
+
cliEquivalent: "kici-admin backend sync --one"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "backends.test",
|
|
269
|
+
wireMessageType: "dashboard.backends.test",
|
|
270
|
+
category: "Topology",
|
|
271
|
+
label: "Test scaler backend",
|
|
272
|
+
sensitivity: "dispatch",
|
|
273
|
+
cliEquivalent: "kici-admin backend test"
|
|
274
|
+
}
|
|
275
|
+
]);
|
|
276
|
+
/** O(1) lookup of a descriptor by operation name. */
|
|
277
|
+
const DASHBOARD_WRITE_OPERATIONS_BY_NAME = new Map(DASHBOARD_WRITE_OPERATIONS.map((d) => [d.name, d]));
|
|
278
|
+
/** O(1) lookup of a descriptor by wire-message type. */
|
|
279
|
+
const DASHBOARD_WRITE_OPERATIONS_BY_WIRE_TYPE = new Map(DASHBOARD_WRITE_OPERATIONS.map((d) => [d.wireMessageType, d]));
|
|
280
|
+
function getDashboardWriteOperationDescriptor(op) {
|
|
281
|
+
const descriptor = DASHBOARD_WRITE_OPERATIONS_BY_NAME.get(op);
|
|
282
|
+
if (!descriptor) throw new Error(`No descriptor registered for dashboard write operation: ${op}`);
|
|
283
|
+
return descriptor;
|
|
284
|
+
}
|
|
285
|
+
function getDashboardWriteOperationsByCategory(category) {
|
|
286
|
+
return DASHBOARD_WRITE_OPERATIONS.filter((d) => d.category === category);
|
|
287
|
+
}
|
|
288
|
+
function getDashboardWriteOperationsBySensitivity(sensitivity) {
|
|
289
|
+
return DASHBOARD_WRITE_OPERATIONS.filter((d) => d.sensitivity === sensitivity);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Validates a sparse policy map. Use this where the value is required
|
|
293
|
+
* but may be empty (e.g. the JSONB column on the orch). For optional
|
|
294
|
+
* fields on outer schemas, embed `dashboardWritePolicyMap` directly
|
|
295
|
+
* with `.optional()` so omission stays as `undefined` rather than being
|
|
296
|
+
* coerced to `{}`.
|
|
297
|
+
*/
|
|
298
|
+
const dashboardWritePolicyMap = z.partialRecord(DashboardWriteOperation, z.boolean());
|
|
299
|
+
const dashboardWritePolicyMapSchema = dashboardWritePolicyMap.default({});
|
|
300
|
+
/**
|
|
301
|
+
* Resolve the effective state of an operation given a (possibly sparse)
|
|
302
|
+
* policy map. Treats `undefined` as enabled by the permissive default.
|
|
303
|
+
*/
|
|
304
|
+
function isDashboardWriteOperationEnabled(policy, op) {
|
|
305
|
+
if (!policy) return true;
|
|
306
|
+
const explicit = policy[op];
|
|
307
|
+
return explicit === void 0 ? true : explicit;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Expand a (possibly sparse) policy map into the full effective state
|
|
311
|
+
* for all 23 operations. Operations the policy doesn't mention come
|
|
312
|
+
* back as `true` (permissive). Used by the orch HTTP admin response,
|
|
313
|
+
* the WS `orch.capabilities` broadcast, and the dashboard's policy
|
|
314
|
+
* page so consumers see the full picture, not the sparse storage shape.
|
|
315
|
+
*/
|
|
316
|
+
function resolveFullPolicyView(policy) {
|
|
317
|
+
const out = {};
|
|
318
|
+
for (const descriptor of DASHBOARD_WRITE_OPERATIONS) out[descriptor.name] = isDashboardWriteOperationEnabled(policy, descriptor.name);
|
|
319
|
+
return out;
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
export { DASHBOARD_WRITE_OPERATIONS, DASHBOARD_WRITE_OPERATIONS_BY_NAME, DASHBOARD_WRITE_OPERATIONS_BY_WIRE_TYPE, DASHBOARD_WRITE_OPERATION_VALUES, DashboardWriteCategory, DashboardWriteOperation, DashboardWriteSensitivity, dashboardWritePolicyMap, dashboardWritePolicyMapSchema, getDashboardWriteOperationDescriptor, getDashboardWriteOperationsByCategory, getDashboardWriteOperationsBySensitivity, isDashboardWriteOperationEnabled, resolveFullPolicyView };
|
|
323
|
+
|
|
324
|
+
//# sourceMappingURL=dashboard-write-operations.js.map
|
|
@@ -42,6 +42,8 @@ export declare const AccessLogTargetType: z.ZodEnum<{
|
|
|
42
42
|
held_run: "held_run";
|
|
43
43
|
access_log: "access_log";
|
|
44
44
|
event_dlq: "event_dlq";
|
|
45
|
+
org_settings: "org_settings";
|
|
46
|
+
cluster_meta: "cluster_meta";
|
|
45
47
|
}>;
|
|
46
48
|
export type AccessLogTargetType = z.infer<typeof AccessLogTargetType>;
|
|
47
49
|
/**
|
|
@@ -49,6 +51,11 @@ export type AccessLogTargetType = z.infer<typeof AccessLogTargetType>;
|
|
|
49
51
|
* row uses one of these values; a new handler means adding a new entry here.
|
|
50
52
|
*/
|
|
51
53
|
export declare const AccessLogAction: z.ZodEnum<{
|
|
54
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
55
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
56
|
+
"registration.disable": "registration.disable";
|
|
57
|
+
"registration.delete": "registration.delete";
|
|
58
|
+
"global_workflows.update": "global_workflows.update";
|
|
52
59
|
"run.detail.read": "run.detail.read";
|
|
53
60
|
"run.payload.read": "run.payload.read";
|
|
54
61
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
@@ -85,8 +92,6 @@ export declare const AccessLogAction: z.ZodEnum<{
|
|
|
85
92
|
"held_run.approve": "held_run.approve";
|
|
86
93
|
"held_run.reject": "held_run.reject";
|
|
87
94
|
"registration.list.read": "registration.list.read";
|
|
88
|
-
"registration.disable": "registration.disable";
|
|
89
|
-
"registration.delete": "registration.delete";
|
|
90
95
|
"diagnostics.read": "diagnostics.read";
|
|
91
96
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
92
97
|
"scaler.agents.read": "scaler.agents.read";
|
|
@@ -96,18 +101,18 @@ export declare const AccessLogAction: z.ZodEnum<{
|
|
|
96
101
|
"backend.sync.one": "backend.sync.one";
|
|
97
102
|
"backend.test": "backend.test";
|
|
98
103
|
"global_workflows.get.read": "global_workflows.get.read";
|
|
99
|
-
"
|
|
104
|
+
"org_settings.dashboard_write_policy.update": "org_settings.dashboard_write_policy.update";
|
|
105
|
+
"cluster_name.update": "cluster_name.update";
|
|
100
106
|
"access_log.list.read": "access_log.list.read";
|
|
101
107
|
"event_dlq.list.read": "event_dlq.list.read";
|
|
102
|
-
"event_dlq.retry": "event_dlq.retry";
|
|
103
|
-
"event_dlq.discard": "event_dlq.discard";
|
|
104
108
|
archive_chunk: "archive_chunk";
|
|
109
|
+
purge_chunk: "purge_chunk";
|
|
105
110
|
}>;
|
|
106
111
|
export type AccessLogAction = z.infer<typeof AccessLogAction>;
|
|
107
112
|
/**
|
|
108
113
|
* Single row as surfaced to the dashboard / CLI. Includes optional
|
|
109
114
|
* displayName/email for `user` and `platform_operator` actors — those are
|
|
110
|
-
* resolved Platform-side by joining `actor_id` against the
|
|
115
|
+
* resolved Platform-side by joining `actor_id` against the Keycloak-backed
|
|
111
116
|
* `users` table. The orchestrator never returns them; it emits a minimal
|
|
112
117
|
* row and Platform enriches before forwarding to the browser.
|
|
113
118
|
*/
|
|
@@ -127,6 +132,11 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
127
132
|
actorEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
133
|
actorDisplayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
134
|
action: z.ZodEnum<{
|
|
135
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
136
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
137
|
+
"registration.disable": "registration.disable";
|
|
138
|
+
"registration.delete": "registration.delete";
|
|
139
|
+
"global_workflows.update": "global_workflows.update";
|
|
130
140
|
"run.detail.read": "run.detail.read";
|
|
131
141
|
"run.payload.read": "run.payload.read";
|
|
132
142
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
@@ -163,8 +173,6 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
163
173
|
"held_run.approve": "held_run.approve";
|
|
164
174
|
"held_run.reject": "held_run.reject";
|
|
165
175
|
"registration.list.read": "registration.list.read";
|
|
166
|
-
"registration.disable": "registration.disable";
|
|
167
|
-
"registration.delete": "registration.delete";
|
|
168
176
|
"diagnostics.read": "diagnostics.read";
|
|
169
177
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
170
178
|
"scaler.agents.read": "scaler.agents.read";
|
|
@@ -174,12 +182,12 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
174
182
|
"backend.sync.one": "backend.sync.one";
|
|
175
183
|
"backend.test": "backend.test";
|
|
176
184
|
"global_workflows.get.read": "global_workflows.get.read";
|
|
177
|
-
"
|
|
185
|
+
"org_settings.dashboard_write_policy.update": "org_settings.dashboard_write_policy.update";
|
|
186
|
+
"cluster_name.update": "cluster_name.update";
|
|
178
187
|
"access_log.list.read": "access_log.list.read";
|
|
179
188
|
"event_dlq.list.read": "event_dlq.list.read";
|
|
180
|
-
"event_dlq.retry": "event_dlq.retry";
|
|
181
|
-
"event_dlq.discard": "event_dlq.discard";
|
|
182
189
|
archive_chunk: "archive_chunk";
|
|
190
|
+
purge_chunk: "purge_chunk";
|
|
183
191
|
}>;
|
|
184
192
|
targetType: z.ZodNullable<z.ZodEnum<{
|
|
185
193
|
run: "run";
|
|
@@ -197,6 +205,8 @@ export declare const accessLogItemSchema: z.ZodObject<{
|
|
|
197
205
|
held_run: "held_run";
|
|
198
206
|
access_log: "access_log";
|
|
199
207
|
event_dlq: "event_dlq";
|
|
208
|
+
org_settings: "org_settings";
|
|
209
|
+
cluster_meta: "cluster_meta";
|
|
200
210
|
}>>;
|
|
201
211
|
targetId: z.ZodNullable<z.ZodString>;
|
|
202
212
|
requestId: z.ZodNullable<z.ZodString>;
|
|
@@ -225,6 +235,11 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
225
235
|
}>>;
|
|
226
236
|
actorId: z.ZodOptional<z.ZodString>;
|
|
227
237
|
action: z.ZodOptional<z.ZodEnum<{
|
|
238
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
239
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
240
|
+
"registration.disable": "registration.disable";
|
|
241
|
+
"registration.delete": "registration.delete";
|
|
242
|
+
"global_workflows.update": "global_workflows.update";
|
|
228
243
|
"run.detail.read": "run.detail.read";
|
|
229
244
|
"run.payload.read": "run.payload.read";
|
|
230
245
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
@@ -261,8 +276,6 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
261
276
|
"held_run.approve": "held_run.approve";
|
|
262
277
|
"held_run.reject": "held_run.reject";
|
|
263
278
|
"registration.list.read": "registration.list.read";
|
|
264
|
-
"registration.disable": "registration.disable";
|
|
265
|
-
"registration.delete": "registration.delete";
|
|
266
279
|
"diagnostics.read": "diagnostics.read";
|
|
267
280
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
268
281
|
"scaler.agents.read": "scaler.agents.read";
|
|
@@ -272,12 +285,12 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
272
285
|
"backend.sync.one": "backend.sync.one";
|
|
273
286
|
"backend.test": "backend.test";
|
|
274
287
|
"global_workflows.get.read": "global_workflows.get.read";
|
|
275
|
-
"
|
|
288
|
+
"org_settings.dashboard_write_policy.update": "org_settings.dashboard_write_policy.update";
|
|
289
|
+
"cluster_name.update": "cluster_name.update";
|
|
276
290
|
"access_log.list.read": "access_log.list.read";
|
|
277
291
|
"event_dlq.list.read": "event_dlq.list.read";
|
|
278
|
-
"event_dlq.retry": "event_dlq.retry";
|
|
279
|
-
"event_dlq.discard": "event_dlq.discard";
|
|
280
292
|
archive_chunk: "archive_chunk";
|
|
293
|
+
purge_chunk: "purge_chunk";
|
|
281
294
|
}>>;
|
|
282
295
|
source: z.ZodOptional<z.ZodEnum<{
|
|
283
296
|
platform_proxy: "platform_proxy";
|
|
@@ -305,6 +318,8 @@ export declare const accessLogFilterSchema: z.ZodObject<{
|
|
|
305
318
|
held_run: "held_run";
|
|
306
319
|
access_log: "access_log";
|
|
307
320
|
event_dlq: "event_dlq";
|
|
321
|
+
org_settings: "org_settings";
|
|
322
|
+
cluster_meta: "cluster_meta";
|
|
308
323
|
}>>;
|
|
309
324
|
targetId: z.ZodOptional<z.ZodString>;
|
|
310
325
|
fromTimestamp: z.ZodOptional<z.ZodString>;
|
|
@@ -344,6 +359,11 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
344
359
|
}>>;
|
|
345
360
|
actorId: z.ZodOptional<z.ZodString>;
|
|
346
361
|
action: z.ZodOptional<z.ZodEnum<{
|
|
362
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
363
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
364
|
+
"registration.disable": "registration.disable";
|
|
365
|
+
"registration.delete": "registration.delete";
|
|
366
|
+
"global_workflows.update": "global_workflows.update";
|
|
347
367
|
"run.detail.read": "run.detail.read";
|
|
348
368
|
"run.payload.read": "run.payload.read";
|
|
349
369
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
@@ -380,8 +400,6 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
380
400
|
"held_run.approve": "held_run.approve";
|
|
381
401
|
"held_run.reject": "held_run.reject";
|
|
382
402
|
"registration.list.read": "registration.list.read";
|
|
383
|
-
"registration.disable": "registration.disable";
|
|
384
|
-
"registration.delete": "registration.delete";
|
|
385
403
|
"diagnostics.read": "diagnostics.read";
|
|
386
404
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
387
405
|
"scaler.agents.read": "scaler.agents.read";
|
|
@@ -391,12 +409,12 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
391
409
|
"backend.sync.one": "backend.sync.one";
|
|
392
410
|
"backend.test": "backend.test";
|
|
393
411
|
"global_workflows.get.read": "global_workflows.get.read";
|
|
394
|
-
"
|
|
412
|
+
"org_settings.dashboard_write_policy.update": "org_settings.dashboard_write_policy.update";
|
|
413
|
+
"cluster_name.update": "cluster_name.update";
|
|
395
414
|
"access_log.list.read": "access_log.list.read";
|
|
396
415
|
"event_dlq.list.read": "event_dlq.list.read";
|
|
397
|
-
"event_dlq.retry": "event_dlq.retry";
|
|
398
|
-
"event_dlq.discard": "event_dlq.discard";
|
|
399
416
|
archive_chunk: "archive_chunk";
|
|
417
|
+
purge_chunk: "purge_chunk";
|
|
400
418
|
}>>;
|
|
401
419
|
source: z.ZodOptional<z.ZodEnum<{
|
|
402
420
|
platform_proxy: "platform_proxy";
|
|
@@ -424,6 +442,8 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
|
|
|
424
442
|
held_run: "held_run";
|
|
425
443
|
access_log: "access_log";
|
|
426
444
|
event_dlq: "event_dlq";
|
|
445
|
+
org_settings: "org_settings";
|
|
446
|
+
cluster_meta: "cluster_meta";
|
|
427
447
|
}>>;
|
|
428
448
|
targetId: z.ZodOptional<z.ZodString>;
|
|
429
449
|
fromTimestamp: z.ZodOptional<z.ZodString>;
|
|
@@ -452,6 +472,11 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
452
472
|
actorEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
453
473
|
actorDisplayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
454
474
|
action: z.ZodEnum<{
|
|
475
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
476
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
477
|
+
"registration.disable": "registration.disable";
|
|
478
|
+
"registration.delete": "registration.delete";
|
|
479
|
+
"global_workflows.update": "global_workflows.update";
|
|
455
480
|
"run.detail.read": "run.detail.read";
|
|
456
481
|
"run.payload.read": "run.payload.read";
|
|
457
482
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
@@ -488,8 +513,6 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
488
513
|
"held_run.approve": "held_run.approve";
|
|
489
514
|
"held_run.reject": "held_run.reject";
|
|
490
515
|
"registration.list.read": "registration.list.read";
|
|
491
|
-
"registration.disable": "registration.disable";
|
|
492
|
-
"registration.delete": "registration.delete";
|
|
493
516
|
"diagnostics.read": "diagnostics.read";
|
|
494
517
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
495
518
|
"scaler.agents.read": "scaler.agents.read";
|
|
@@ -499,12 +522,12 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
499
522
|
"backend.sync.one": "backend.sync.one";
|
|
500
523
|
"backend.test": "backend.test";
|
|
501
524
|
"global_workflows.get.read": "global_workflows.get.read";
|
|
502
|
-
"
|
|
525
|
+
"org_settings.dashboard_write_policy.update": "org_settings.dashboard_write_policy.update";
|
|
526
|
+
"cluster_name.update": "cluster_name.update";
|
|
503
527
|
"access_log.list.read": "access_log.list.read";
|
|
504
528
|
"event_dlq.list.read": "event_dlq.list.read";
|
|
505
|
-
"event_dlq.retry": "event_dlq.retry";
|
|
506
|
-
"event_dlq.discard": "event_dlq.discard";
|
|
507
529
|
archive_chunk: "archive_chunk";
|
|
530
|
+
purge_chunk: "purge_chunk";
|
|
508
531
|
}>;
|
|
509
532
|
targetType: z.ZodNullable<z.ZodEnum<{
|
|
510
533
|
run: "run";
|
|
@@ -522,6 +545,8 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
|
|
|
522
545
|
held_run: "held_run";
|
|
523
546
|
access_log: "access_log";
|
|
524
547
|
event_dlq: "event_dlq";
|
|
548
|
+
org_settings: "org_settings";
|
|
549
|
+
cluster_meta: "cluster_meta";
|
|
525
550
|
}>>;
|
|
526
551
|
targetId: z.ZodNullable<z.ZodString>;
|
|
527
552
|
requestId: z.ZodNullable<z.ZodString>;
|
|
@@ -42,7 +42,9 @@ const AccessLogTargetType = z.enum([
|
|
|
42
42
|
"scaler",
|
|
43
43
|
"held_run",
|
|
44
44
|
"access_log",
|
|
45
|
-
"event_dlq"
|
|
45
|
+
"event_dlq",
|
|
46
|
+
"org_settings",
|
|
47
|
+
"cluster_meta"
|
|
46
48
|
]);
|
|
47
49
|
/**
|
|
48
50
|
* Dotted-namespace action names. Every handler that writes an access_log
|
|
@@ -97,16 +99,19 @@ const AccessLogAction = z.enum([
|
|
|
97
99
|
"backend.test",
|
|
98
100
|
"global_workflows.get.read",
|
|
99
101
|
"global_workflows.update",
|
|
102
|
+
"org_settings.dashboard_write_policy.update",
|
|
103
|
+
"cluster_name.update",
|
|
100
104
|
"access_log.list.read",
|
|
101
105
|
"event_dlq.list.read",
|
|
102
106
|
"event_dlq.retry",
|
|
103
107
|
"event_dlq.discard",
|
|
104
|
-
"archive_chunk"
|
|
108
|
+
"archive_chunk",
|
|
109
|
+
"purge_chunk"
|
|
105
110
|
]);
|
|
106
111
|
/**
|
|
107
112
|
* Single row as surfaced to the dashboard / CLI. Includes optional
|
|
108
113
|
* displayName/email for `user` and `platform_operator` actors — those are
|
|
109
|
-
* resolved Platform-side by joining `actor_id` against the
|
|
114
|
+
* resolved Platform-side by joining `actor_id` against the Keycloak-backed
|
|
110
115
|
* `users` table. The orchestrator never returns them; it emits a minimal
|
|
111
116
|
* row and Platform enriches before forwarding to the browser.
|
|
112
117
|
*/
|
|
@@ -20,14 +20,14 @@ const ActorType = z.enum([
|
|
|
20
20
|
]);
|
|
21
21
|
const userActorSchema = z.object({
|
|
22
22
|
type: z.literal(ActorType.enum.user),
|
|
23
|
-
/**
|
|
23
|
+
/** Keycloak subject (idp_sub). */
|
|
24
24
|
sub: z.string().min(1)
|
|
25
25
|
});
|
|
26
26
|
const apiKeyActorSchema = z.object({
|
|
27
27
|
type: z.literal(ActorType.enum.api_key),
|
|
28
28
|
/** Opaque key identifier (not the secret). */
|
|
29
29
|
keyId: z.string().min(1),
|
|
30
|
-
/**
|
|
30
|
+
/** Keycloak sub of the human who owns this key. */
|
|
31
31
|
ownerSub: z.string().min(1)
|
|
32
32
|
});
|
|
33
33
|
const serviceAccountActorSchema = z.object({
|
|
@@ -37,7 +37,7 @@ const serviceAccountActorSchema = z.object({
|
|
|
37
37
|
});
|
|
38
38
|
const platformOperatorActorSchema = z.object({
|
|
39
39
|
type: z.literal(ActorType.enum.platform_operator),
|
|
40
|
-
/**
|
|
40
|
+
/** Keycloak sub of the SaaS operator performing break-glass access. */
|
|
41
41
|
sub: z.string().min(1),
|
|
42
42
|
/**
|
|
43
43
|
* Free-text justification recorded in `access_log.actor_meta.reason`.
|
|
@@ -9,6 +9,31 @@ export declare const authRequestSchema: z.ZodObject<{
|
|
|
9
9
|
coordinator: "coordinator";
|
|
10
10
|
worker: "worker";
|
|
11
11
|
}>>;
|
|
12
|
+
dashboardWrites: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
13
|
+
"secrets.set": "secrets.set";
|
|
14
|
+
"secrets.delete": "secrets.delete";
|
|
15
|
+
"secrets.scope.create": "secrets.scope.create";
|
|
16
|
+
"secrets.scope.rename": "secrets.scope.rename";
|
|
17
|
+
"secrets.scope.delete": "secrets.scope.delete";
|
|
18
|
+
"variables.set": "variables.set";
|
|
19
|
+
"variables.delete": "variables.delete";
|
|
20
|
+
"environments.create": "environments.create";
|
|
21
|
+
"environments.update": "environments.update";
|
|
22
|
+
"environments.delete": "environments.delete";
|
|
23
|
+
"environments.bindings.set": "environments.bindings.set";
|
|
24
|
+
"environments.source_overrides.set": "environments.source_overrides.set";
|
|
25
|
+
"environments.source_overrides.delete": "environments.source_overrides.delete";
|
|
26
|
+
"held_runs.approve": "held_runs.approve";
|
|
27
|
+
"held_runs.reject": "held_runs.reject";
|
|
28
|
+
"event_dlq.retry": "event_dlq.retry";
|
|
29
|
+
"event_dlq.discard": "event_dlq.discard";
|
|
30
|
+
"registration.disable": "registration.disable";
|
|
31
|
+
"registration.delete": "registration.delete";
|
|
32
|
+
"global_workflows.update": "global_workflows.update";
|
|
33
|
+
"backends.sync": "backends.sync";
|
|
34
|
+
"backends.sync_one": "backends.sync_one";
|
|
35
|
+
"backends.test": "backends.test";
|
|
36
|
+
}> & z.core.$partial, z.ZodBoolean>>;
|
|
12
37
|
}, z.core.$loose>>;
|
|
13
38
|
}, z.core.$strip>;
|
|
14
39
|
/** Auth success response sent by Platform to orchestrator after successful authentication. */
|