@kici-dev/orchestrator 0.1.3 → 0.1.6
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/agent/dispatcher.d.ts +26 -0
- package/dist/agent/ownership-tracker.d.ts +45 -3
- package/dist/app.d.ts +9 -3
- package/dist/audit/access-log.d.ts +7 -0
- package/dist/cli/api-client.d.ts +14 -0
- package/dist/cli/commands/cluster-name.d.ts +18 -0
- package/dist/cli/commands/db.d.ts +9 -6
- package/dist/cli/commands/org-settings.d.ts +2 -1
- package/dist/cli/commands/shared/secret-input.d.ts +46 -0
- package/dist/cli/commands/variable.d.ts +18 -0
- package/dist/cli/service/index.d.ts +1 -0
- package/dist/cli/service/launchd.d.ts +19 -0
- package/dist/cli/service/privilege.d.ts +21 -0
- package/dist/cli/wizard/orchestrator-wizard.d.ts +4 -2
- package/dist/cli.js +1074 -225
- package/dist/cluster/coordinator.d.ts +3 -3
- package/dist/cluster/join-token.d.ts +21 -13
- package/dist/cluster/peer-client.d.ts +9 -0
- package/dist/config/cluster-id.d.ts +23 -0
- package/dist/config/cluster-name.d.ts +39 -0
- package/dist/config.d.ts +8 -0
- package/dist/dashboard/handler.d.ts +54 -2
- package/dist/db/migrations/019_generic_sources_change_notify.d.ts +25 -0
- package/dist/db/migrations/020_org_settings_dashboard_write_policy.d.ts +17 -0
- package/dist/db/migrations/021_check_run_tracking.d.ts +26 -0
- package/dist/db/migrations/022_scaler_manager_state.d.ts +29 -0
- package/dist/db/migrations/023_dispatch_queue_recovery_deadline.d.ts +26 -0
- package/dist/db/types.d.ts +137 -0
- package/dist/events/event-store.d.ts +9 -2
- package/dist/events/trust-store.d.ts +7 -0
- package/dist/events/types.d.ts +33 -0
- package/dist/metrics/scheduled-jobs.d.ts +26 -5
- package/dist/orchestrator-core.d.ts +16 -2
- package/dist/pipeline/processor.d.ts +2 -2
- package/dist/pipeline/rerun.d.ts +2 -2
- package/dist/pipeline/test-pipeline.d.ts +2 -2
- package/dist/policy/dashboard-write-policy.d.ts +115 -0
- package/dist/queue/job-queue.d.ts +54 -1
- package/dist/reporting/{commit-status.d.ts → check-run-reporter.d.ts} +94 -16
- package/dist/reporting/check-run-tracking-store.d.ts +133 -0
- package/dist/routes/admin-access-log.d.ts +1 -0
- package/dist/routes/admin-backends.d.ts +9 -1
- package/dist/routes/admin-cluster-name.d.ts +50 -0
- package/dist/routes/admin-db.d.ts +9 -1
- package/dist/routes/admin-environments.d.ts +10 -6
- package/dist/routes/admin-event-dlq.d.ts +1 -0
- package/dist/routes/admin-event-log.d.ts +1 -0
- package/dist/routes/admin-events.d.ts +19 -0
- package/dist/routes/admin-maintenance.d.ts +9 -1
- package/dist/routes/admin-org-settings.d.ts +10 -1
- package/dist/routes/admin-queue-execution.d.ts +1 -0
- package/dist/routes/admin-registrations.d.ts +1 -0
- package/dist/routes/admin-runs.d.ts +1 -0
- package/dist/routes/admin-scheduled-jobs.d.ts +1 -0
- package/dist/routes/admin-sources.d.ts +24 -1
- package/dist/routes/admin.d.ts +22 -0
- package/dist/scaler/manager.d.ts +38 -0
- package/dist/scaler/scaler-state-store.d.ts +102 -0
- package/dist/secrets/routing-key-scope.d.ts +43 -0
- package/dist/server.js +10098 -6961
- package/dist/sources/build-platform-sources.d.ts +26 -0
- package/dist/sources/source-manager.d.ts +14 -0
- package/dist/stale-detector/stale-run-detector.d.ts +17 -5
- package/dist/standalone.js +7525 -5172
- package/dist/webhook/generic-sources-listener.d.ts +89 -0
- package/dist/webhook/register-source-bundle.d.ts +57 -0
- package/dist/ws/dashboard-backends-handler.d.ts +14 -0
- package/dist/ws/dashboard-env-handler.d.ts +7 -0
- package/dist/ws/dashboard-global-workflows-handler.d.ts +6 -0
- package/dist/ws/dashboard-registrations-handler.d.ts +7 -0
- package/dist/ws/platform-client.d.ts +57 -2
- package/package.json +3 -3
- package/sbom.spdx.json +40 -35
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for enforcing the `routing_key` scope on admin tokens.
|
|
3
|
+
*
|
|
4
|
+
* `admin_tokens.routing_key` is an optional column. A token created with
|
|
5
|
+
* `kici-admin token create --routing-key <key>` is restricted to operations
|
|
6
|
+
* that target that exact routing key:
|
|
7
|
+
*
|
|
8
|
+
* - Routes that take an explicit routing key (URL param, query param, or
|
|
9
|
+
* request body) MUST gate access with `enforceRoutingKeyScope`. Routes
|
|
10
|
+
* that target an entity by ID look up the row's `routing_key` column
|
|
11
|
+
* first and pass that to `enforceRoutingKeyScope`.
|
|
12
|
+
* - Routes that target an org or that operate orchestrator-wide (no
|
|
13
|
+
* routing-key concept at all) MUST refuse routing-key tokens via
|
|
14
|
+
* `requireUnscopedToken`.
|
|
15
|
+
*
|
|
16
|
+
* Both helpers return a Hono `Response` to short-circuit the handler when
|
|
17
|
+
* access is denied, or `null` to let the handler continue. The middleware
|
|
18
|
+
* mounted in each admin route file is responsible for calling
|
|
19
|
+
* `c.set('routingKey', tokenInfo.routingKey)` so these helpers can read it.
|
|
20
|
+
*/
|
|
21
|
+
import type { Context } from 'hono';
|
|
22
|
+
/**
|
|
23
|
+
* Reject the request with 403 when the calling token has a routing-key
|
|
24
|
+
* scope and the request targets a different routing key.
|
|
25
|
+
*
|
|
26
|
+
* Pass `requested = null | undefined` for routes that explicitly do not
|
|
27
|
+
* carry a routing key — in that case the call is also rejected for
|
|
28
|
+
* scoped tokens. Use {@link requireUnscopedToken} when the route is
|
|
29
|
+
* orchestrator-wide or org-scoped (no per-routing-key variant exists at
|
|
30
|
+
* all) to make the intent explicit.
|
|
31
|
+
*
|
|
32
|
+
* Returns a `Response` to short-circuit the handler when access is
|
|
33
|
+
* denied, or `null` to let the handler continue.
|
|
34
|
+
*/
|
|
35
|
+
export declare function enforceRoutingKeyScope(c: Context, requested: string | null | undefined): Response | null;
|
|
36
|
+
/**
|
|
37
|
+
* Reject the request with 403 when the calling token has any routing-key
|
|
38
|
+
* scope. Use this on routes that operate on orchestrator-wide state,
|
|
39
|
+
* org-level state, or any other surface where the routing-key concept
|
|
40
|
+
* does not apply.
|
|
41
|
+
*/
|
|
42
|
+
export declare function requireUnscopedToken(c: Context): Response | null;
|
|
43
|
+
//# sourceMappingURL=routing-key-scope.d.ts.map
|