@aifabrix/builder 2.45.0 → 2.46.0

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.
Files changed (352) hide show
  1. package/.cursor/rules/cli-layout.mdc +2 -0
  2. package/.cursor/rules/cli-product-neutral.mdc +43 -0
  3. package/.cursor/rules/docs-rules.mdc +3 -1
  4. package/.cursor/rules/project-rules.mdc +1 -0
  5. package/README.md +43 -17
  6. package/integration/hubspot-test/wizard-hubspot-e2e.yaml +1 -1
  7. package/jest.config.default.js +2 -1
  8. package/jest.config.isolated.js +2 -1
  9. package/jest.global-live-fabrix-hooks.js +36 -0
  10. package/jest.isolated-projects.js +130 -0
  11. package/jest.projects.js +69 -121
  12. package/lib/api/agent-metadata-validation.api.js +93 -0
  13. package/lib/api/api-response-errors.js +124 -0
  14. package/lib/api/audit-api-helpers.js +68 -0
  15. package/lib/api/audit.api.js +119 -0
  16. package/lib/api/auth-cache.api.js +44 -0
  17. package/lib/api/certificates.api.js +4 -4
  18. package/lib/api/credential.api.js +2 -2
  19. package/lib/api/dataplane-health.api.js +137 -0
  20. package/lib/api/dataplane-sync.api.js +27 -0
  21. package/lib/api/datasources-core.api.js +21 -18
  22. package/lib/api/datasources-extended.api.js +22 -22
  23. package/lib/api/dimensions.api.js +3 -0
  24. package/lib/api/external-systems.api.js +13 -13
  25. package/lib/api/governance-scenario-pack.api.js +159 -0
  26. package/lib/api/governance-scenarios.api.js +39 -0
  27. package/lib/api/groups.api.js +79 -0
  28. package/lib/api/index.js +88 -5
  29. package/lib/api/lifecycle.api.js +77 -0
  30. package/lib/api/pipeline.api.js +7 -5
  31. package/lib/api/protection.api.js +157 -0
  32. package/lib/api/records-bulk.api.js +43 -0
  33. package/lib/api/records-search-parse.js +49 -0
  34. package/lib/api/records-search.api.js +29 -0
  35. package/lib/api/types/agent-metadata-validation.types.js +67 -0
  36. package/lib/api/types/audit.types.js +72 -0
  37. package/lib/api/types/dataplane-health.types.js +27 -0
  38. package/lib/api/types/dimensions.types.js +2 -0
  39. package/lib/api/types/governance-scenarios.types.js +39 -0
  40. package/lib/api/types/protection.types.js +69 -0
  41. package/lib/api/types/records-bulk.types.js +35 -0
  42. package/lib/api/types/records-search.types.js +28 -0
  43. package/lib/api/user-groups.api.js +50 -0
  44. package/lib/api/users.api.js +95 -0
  45. package/lib/api/validation-run.api.js +3 -3
  46. package/lib/api/validation-runner.js +5 -3
  47. package/lib/api/wizard-platform.api.js +3 -3
  48. package/lib/api/wizard.api.js +21 -21
  49. package/lib/app/deploy-config.js +4 -1
  50. package/lib/app/deploy.js +34 -19
  51. package/lib/app/down.js +20 -1
  52. package/lib/app/push.js +4 -5
  53. package/lib/app/register.js +7 -4
  54. package/lib/app/run-env-compose.js +84 -30
  55. package/lib/build/index.js +5 -0
  56. package/lib/certification/sync-system-certification.js +13 -6
  57. package/lib/cli/index.js +8 -2
  58. package/lib/cli/infra-guided-auth.js +109 -0
  59. package/lib/cli/infra-guided.js +91 -69
  60. package/lib/cli/setup-app.help.js +19 -2
  61. package/lib/cli/setup-app.js +58 -23
  62. package/lib/cli/setup-app.test-commands.js +28 -21
  63. package/lib/cli/setup-auth.js +55 -3
  64. package/lib/cli/setup-certification-commands.js +147 -0
  65. package/lib/cli/setup-certification.help.js +141 -0
  66. package/lib/cli/setup-environment.js +19 -2
  67. package/lib/cli/setup-external-system-help.js +62 -0
  68. package/lib/cli/setup-external-system.js +62 -6
  69. package/lib/cli/setup-infra.js +9 -1
  70. package/lib/cli/setup-platform.js +6 -1
  71. package/lib/cli/setup-secrets.js +33 -1
  72. package/lib/cli/setup-utility-help-after.js +65 -0
  73. package/lib/cli/setup-utility-repair.js +198 -0
  74. package/lib/cli/setup-utility-resolve.js +42 -6
  75. package/lib/cli/setup-utility-validate.js +197 -0
  76. package/lib/cli/setup-utility.js +41 -258
  77. package/lib/commands/auth-status-client-tokens.js +214 -0
  78. package/lib/commands/auth-status-dataplane-version.js +269 -0
  79. package/lib/commands/auth-status-display.js +94 -0
  80. package/lib/commands/auth-status.js +111 -53
  81. package/lib/commands/credential-push.js +10 -5
  82. package/lib/commands/datasource-load-export-cli.js +178 -0
  83. package/lib/commands/datasource-test-trust-cli.js +118 -0
  84. package/lib/commands/datasource-unified-test-cli.js +31 -20
  85. package/lib/commands/datasource-unified-test-cli.options.js +22 -3
  86. package/lib/commands/datasource-unified-test-e2e-cli-helpers.js +5 -5
  87. package/lib/commands/datasource-verify-audit-cli.js +96 -0
  88. package/lib/commands/datasource.js +68 -1
  89. package/lib/commands/dev-show-display.js +8 -1
  90. package/lib/commands/dimension-value.js +43 -13
  91. package/lib/commands/dimension.js +38 -7
  92. package/lib/commands/governance-cli-shared.js +94 -0
  93. package/lib/commands/governance-command-action.js +132 -0
  94. package/lib/commands/governance-download-external.js +34 -0
  95. package/lib/commands/governance-generate-external.js +71 -0
  96. package/lib/commands/governance-upload-external.js +36 -0
  97. package/lib/commands/governance-verify-external.js +64 -0
  98. package/lib/commands/governance.js +144 -0
  99. package/lib/commands/identity-apply-sync.js +131 -0
  100. package/lib/commands/identity-group-cli.js +146 -0
  101. package/lib/commands/identity-membership-role-cache.js +175 -0
  102. package/lib/commands/identity-shared.js +94 -0
  103. package/lib/commands/identity-user-cli.js +158 -0
  104. package/lib/commands/identity.js +43 -0
  105. package/lib/commands/lifecycle-command-action.js +123 -0
  106. package/lib/commands/lifecycle-external.js +268 -0
  107. package/lib/commands/login.js +56 -17
  108. package/lib/commands/protection-cli-leaves.js +286 -0
  109. package/lib/commands/protection.js +50 -0
  110. package/lib/commands/repair-auth-apply.js +127 -0
  111. package/lib/commands/repair-changed-files.js +41 -0
  112. package/lib/commands/repair-datasource-keys.js +4 -1
  113. package/lib/commands/repair-datasource-run.js +59 -0
  114. package/lib/commands/repair-datasource-test-payload.js +259 -0
  115. package/lib/commands/repair-datasource.js +1 -51
  116. package/lib/commands/repair-env-template.js +64 -13
  117. package/lib/commands/repair-external-run.js +216 -0
  118. package/lib/commands/repair-openapi-sync.js +23 -0
  119. package/lib/commands/repair-persist.js +4 -0
  120. package/lib/commands/repair-rbac.js +52 -1
  121. package/lib/commands/repair-steps.js +145 -0
  122. package/lib/commands/repair.js +29 -286
  123. package/lib/commands/secrets-get.js +184 -0
  124. package/lib/commands/secrets-remove-all.js +3 -1
  125. package/lib/commands/setup-image-refresh.js +146 -0
  126. package/lib/commands/setup-modes.js +158 -162
  127. package/lib/commands/setup-platform-auth.js +76 -0
  128. package/lib/commands/setup-prompts-admin.js +244 -0
  129. package/lib/commands/setup-prompts-platform-mode.js +67 -0
  130. package/lib/commands/setup-prompts-validators.js +36 -0
  131. package/lib/commands/setup-prompts.js +24 -76
  132. package/lib/commands/setup-run-context.js +45 -0
  133. package/lib/commands/setup-spinners.js +39 -0
  134. package/lib/commands/setup.js +27 -5
  135. package/lib/commands/teardown.js +39 -0
  136. package/lib/commands/test-e2e-external.js +61 -14
  137. package/lib/commands/test-governance-cli-options.js +47 -0
  138. package/lib/commands/test-governance-external.js +67 -0
  139. package/lib/commands/test-trust-cli-options.js +32 -0
  140. package/lib/commands/test-trust-external.js +126 -0
  141. package/lib/commands/up-common.js +25 -13
  142. package/lib/commands/up-dataplane.js +50 -13
  143. package/lib/commands/upload-publish-context.js +75 -0
  144. package/lib/commands/upload-sidecar-followups.js +89 -0
  145. package/lib/commands/upload.js +108 -105
  146. package/lib/commands/verify-governance-combined-external.js +61 -0
  147. package/lib/commands/verify-governance-command-action.js +64 -0
  148. package/lib/commands/verify-governance-db.js +102 -0
  149. package/lib/commands/verify-governance-external.js +77 -0
  150. package/lib/commands/verify-governance-result-builders.js +71 -0
  151. package/lib/commands/verify-operations-command-action.js +68 -0
  152. package/lib/commands/verify-operations-external.js +268 -0
  153. package/lib/commands/verify-operations-persist.js +75 -0
  154. package/lib/commands/verify-operations-step-plan.js +68 -0
  155. package/lib/commands/verify-operations-steps.js +111 -0
  156. package/lib/commands/verify-trust-command-action.js +70 -0
  157. package/lib/commands/verify-trust-external.js +67 -0
  158. package/lib/commands/wizard-config-normalizer.js +43 -23
  159. package/lib/commands/wizard-core.js +5 -0
  160. package/lib/core/admin-password-generator.js +38 -0
  161. package/lib/core/admin-secrets-bundle.js +111 -0
  162. package/lib/core/admin-secrets-env-overlay.js +62 -0
  163. package/lib/core/admin-secrets.js +32 -4
  164. package/lib/core/config-attach-extensions.js +3 -0
  165. package/lib/core/config-device-dataplane.js +185 -0
  166. package/lib/core/config-platform-controller.js +44 -0
  167. package/lib/core/config-setup-installation-profile.js +42 -0
  168. package/lib/core/config-setup-platform-mode.js +46 -0
  169. package/lib/core/config.js +46 -36
  170. package/lib/core/secrets-admin-env.js +6 -2
  171. package/lib/core/secrets-ensure.js +4 -0
  172. package/lib/core/secrets-env-content.js +54 -48
  173. package/lib/core/secrets-env-write.js +10 -1
  174. package/lib/core/secrets-infra-placeholder-sync.js +2 -0
  175. package/lib/core/setup-installation-profile.js +43 -0
  176. package/lib/core/setup-platform-mode.js +55 -0
  177. package/lib/datasource/agent-trust-debug-log.js +45 -0
  178. package/lib/datasource/agent-trust-fetch.js +115 -0
  179. package/lib/datasource/agent-trust-map.js +101 -0
  180. package/lib/datasource/agent-trust-mock.js +44 -0
  181. package/lib/datasource/agent-trust-run.js +95 -0
  182. package/lib/datasource/agent-trust-timeout.js +25 -0
  183. package/lib/datasource/audit-evidence-display.js +80 -0
  184. package/lib/datasource/audit-evidence-extract-debug.js +115 -0
  185. package/lib/datasource/audit-evidence-extract.js +180 -0
  186. package/lib/datasource/audit-evidence-matrix-rows.js +158 -0
  187. package/lib/datasource/audit-evidence-operation-aliases.js +63 -0
  188. package/lib/datasource/audit-evidence-poll.js +109 -0
  189. package/lib/datasource/audit-evidence-run.js +177 -0
  190. package/lib/datasource/audit-evidence-verify-helpers.js +167 -0
  191. package/lib/datasource/audit-evidence-verify-matrix.js +205 -0
  192. package/lib/datasource/audit-evidence-verify.js +108 -0
  193. package/lib/datasource/bulk-loader-run-batches.js +100 -0
  194. package/lib/datasource/bulk-loader-service-retry.js +52 -0
  195. package/lib/datasource/bulk-loader-service.js +127 -0
  196. package/lib/datasource/capability/run-capability-dimension.js +2 -1
  197. package/lib/datasource/datasource-exporter-resolve.js +82 -0
  198. package/lib/datasource/datasource-exporter-service.js +144 -0
  199. package/lib/datasource/datasource-identifier.js +148 -0
  200. package/lib/datasource/datasource-load-export-context.js +95 -0
  201. package/lib/datasource/integration-context.js +6 -4
  202. package/lib/datasource/local-data-paths.js +145 -0
  203. package/lib/datasource/log-cleaner.js +241 -0
  204. package/lib/datasource/log-viewer.js +111 -6
  205. package/lib/datasource/record-file-parser.js +85 -0
  206. package/lib/datasource/record-mapper.js +129 -0
  207. package/lib/datasource/resolve-app.js +74 -55
  208. package/lib/datasource/test-e2e.js +29 -2
  209. package/lib/datasource/unified-validation-run-body.js +3 -1
  210. package/lib/datasource/unified-validation-run-resolve.js +45 -12
  211. package/lib/datasource/unified-validation-run.js +47 -18
  212. package/lib/datasource/validate.js +37 -20
  213. package/lib/deployment/environment-poll-status.js +138 -0
  214. package/lib/deployment/environment.js +42 -34
  215. package/lib/external-system/download.js +21 -20
  216. package/lib/external-system/generator.js +5 -1
  217. package/lib/external-system/integration-auth-context.js +45 -0
  218. package/lib/external-system/test-auth.js +12 -5
  219. package/lib/external-system/test-system-level.js +25 -4
  220. package/lib/external-system/test.js +9 -7
  221. package/lib/generator/external-controller-manifest.js +15 -0
  222. package/lib/governance/governance-cli-errors.js +96 -0
  223. package/lib/governance/governance-download-display.js +38 -0
  224. package/lib/governance/governance-pack-loader.js +70 -0
  225. package/lib/governance/governance-run-display.js +309 -0
  226. package/lib/identity/identity-apply-core.js +108 -0
  227. package/lib/identity/identity-apply-phases.js +244 -0
  228. package/lib/identity/identity-apply-service.js +77 -0
  229. package/lib/identity/identity-csv-parser.js +114 -0
  230. package/lib/infrastructure/admin-secrets-apply.js +84 -0
  231. package/lib/infrastructure/admin-secrets-ensure.js +130 -0
  232. package/lib/infrastructure/admin-secrets-resolve.js +95 -0
  233. package/lib/infrastructure/admin-secrets-sync.js +91 -0
  234. package/lib/infrastructure/helpers.js +23 -129
  235. package/lib/infrastructure/index.js +5 -6
  236. package/lib/infrastructure/orphan-infra-docker-teardown.js +11 -5
  237. package/lib/internal/fs-real-sync.js +29 -1
  238. package/lib/lifecycle/certification-progress.js +231 -0
  239. package/lib/lifecycle/dataplane-ui-url.js +145 -0
  240. package/lib/lifecycle/exit-codes.js +24 -0
  241. package/lib/lifecycle/json-envelope.js +25 -0
  242. package/lib/lifecycle/lifecycle-governance-options.js +51 -0
  243. package/lib/lifecycle/logger-quiet.js +29 -0
  244. package/lib/lifecycle/open-api-published.js +59 -0
  245. package/lib/lifecycle/operations-readiness-metrics.js +101 -0
  246. package/lib/lifecycle/product-model.js +196 -0
  247. package/lib/lifecycle/report-display.js +471 -0
  248. package/lib/lifecycle/scenario-upload.js +191 -0
  249. package/lib/lifecycle/verify-step-progress.js +87 -0
  250. package/lib/parameters/infra-kv-discovery.js +27 -2
  251. package/lib/protection/auth-context.js +51 -0
  252. package/lib/protection/convert-batch.js +90 -0
  253. package/lib/protection/load.js +41 -0
  254. package/lib/protection/paths.js +158 -0
  255. package/lib/protection/preflight-datasource-ready.js +46 -0
  256. package/lib/protection/protection-create-probe-lines.js +142 -0
  257. package/lib/protection/protection-create-probes.js +95 -0
  258. package/lib/protection/protection-create-scaffold.js +281 -0
  259. package/lib/protection/protection-display-helpers.js +445 -0
  260. package/lib/protection/protection-display.js +215 -0
  261. package/lib/protection/protection-preset-registry.js +97 -0
  262. package/lib/protection/report-exit.js +62 -0
  263. package/lib/protection/resolve.js +202 -0
  264. package/lib/protection/run-commands-validate.js +130 -0
  265. package/lib/protection/run-commands.js +216 -0
  266. package/lib/protection/run-protection-create-helpers.js +134 -0
  267. package/lib/protection/run-protection-create-probes-flow.js +43 -0
  268. package/lib/protection/run-protection-create.js +191 -0
  269. package/lib/protection/scope.js +22 -0
  270. package/lib/protection/sync-after-upload.js +64 -0
  271. package/lib/protection/upload-batch.js +127 -0
  272. package/lib/protection/validate-batch.js +113 -0
  273. package/lib/protection/validate-local.js +65 -0
  274. package/lib/resolvers/dimension-file.js +29 -4
  275. package/lib/schema/application-schema.json +1 -1
  276. package/lib/schema/datasource-test-run.schema.json +89 -6
  277. package/lib/schema/external-datasource.schema.json +2636 -2588
  278. package/lib/schema/external-system.schema.json +1089 -761
  279. package/lib/schema/flag-map-validation-run.json +2 -2
  280. package/lib/schema/infra.parameter.yaml +45 -0
  281. package/lib/schema/protection.schema.json +374 -0
  282. package/lib/schema/type/credential-field-registry.json +642 -0
  283. package/lib/schema/wizard-config.schema.json +1 -1
  284. package/lib/utils/agent-trust-run-display.js +231 -0
  285. package/lib/utils/agent-trust-run-exit.js +59 -0
  286. package/lib/utils/agent-trust-wait-ui.js +94 -0
  287. package/lib/utils/aifabrix-test-runtime-guard.js +125 -0
  288. package/lib/utils/api.js +55 -31
  289. package/lib/utils/app-relative-path-env.js +112 -0
  290. package/lib/utils/cli-exit-codes.js +30 -0
  291. package/lib/utils/cli-secrets-error-format.js +83 -21
  292. package/lib/utils/cli-sync-options.js +33 -0
  293. package/lib/utils/cli-utils.js +16 -4
  294. package/lib/utils/compose-generate-docker-compose.js +4 -0
  295. package/lib/utils/compose-traefik-ingress-base.js +16 -1
  296. package/lib/utils/config-secrets-path.js +46 -0
  297. package/lib/utils/controller-url.js +88 -1
  298. package/lib/utils/credential-push-ui.js +90 -0
  299. package/lib/utils/credential-secrets-env.js +137 -9
  300. package/lib/utils/dataplane-cli-version-gate.js +202 -0
  301. package/lib/utils/dataplane-cli-version-help.js +74 -0
  302. package/lib/utils/dataplane-resolver.js +129 -2
  303. package/lib/utils/datasource-export-display.js +137 -0
  304. package/lib/utils/datasource-load-display.js +174 -0
  305. package/lib/utils/datasource-load-export-ui.js +120 -0
  306. package/lib/utils/datasource-test-run-capability-scope.js +3 -3
  307. package/lib/utils/datasource-test-run-display.js +3 -3
  308. package/lib/utils/datasource-test-run-tty-log.js +5 -1
  309. package/lib/utils/declarative-url-ports.js +3 -3
  310. package/lib/utils/deployment-auth-mode.js +41 -0
  311. package/lib/utils/developer-volume-id.js +33 -0
  312. package/lib/utils/env-copy.js +14 -9
  313. package/lib/utils/env-kv-orphan-lines.js +43 -0
  314. package/lib/utils/error-formatters/network-errors.js +13 -4
  315. package/lib/utils/external-env-template.js +1 -0
  316. package/lib/utils/external-system-readiness-core.js +10 -0
  317. package/lib/utils/external-system-readiness-display.js +80 -23
  318. package/lib/utils/health-check.js +4 -1
  319. package/lib/utils/help-builder.js +35 -26
  320. package/lib/utils/keycloak-realm-ready.js +101 -0
  321. package/lib/utils/load-cip-capacity-display-config.js +61 -15
  322. package/lib/utils/manifest-source-emit.js +24 -0
  323. package/lib/utils/pipeline-upload-auth-retry.js +82 -0
  324. package/lib/utils/platform-controller-url.js +156 -0
  325. package/lib/utils/postgres-platform-bootstrap.js +199 -0
  326. package/lib/utils/postgres-wipe.js +9 -2
  327. package/lib/utils/resolve-env-mode.js +47 -0
  328. package/lib/utils/secrets-generator.js +31 -25
  329. package/lib/utils/secrets-missing-error.js +164 -0
  330. package/lib/utils/semver-compare.js +127 -0
  331. package/lib/utils/service-url-label.js +81 -0
  332. package/lib/utils/setup-quiet-output.js +25 -0
  333. package/lib/utils/template-helpers.js +15 -0
  334. package/lib/utils/token-manager-client-credentials.js +201 -0
  335. package/lib/utils/token-manager-messages.js +8 -0
  336. package/lib/utils/token-manager-refresh.js +12 -2
  337. package/lib/utils/token-manager.js +86 -105
  338. package/lib/utils/upload-pipeline-ui.js +98 -0
  339. package/lib/utils/upload-sync-options.js +42 -0
  340. package/lib/utils/url-declarative-public-base.js +21 -3
  341. package/lib/utils/url-declarative-vdir-inactive-env.js +14 -4
  342. package/lib/utils/validation-poll-ui.js +22 -7
  343. package/lib/utils/validation-run-stage.js +45 -0
  344. package/lib/validation/wizard-config-validator.js +58 -19
  345. package/package.json +1 -1
  346. package/templates/applications/dataplane/application.yaml +2 -1
  347. package/templates/applications/dataplane/env.template +36 -1
  348. package/templates/applications/dataplane/rbac.yaml +4 -0
  349. package/templates/applications/miso-controller/env.template +16 -0
  350. package/templates/external-system/README.md.hbs +116 -11
  351. package/templates/python/docker-compose.hbs +19 -18
  352. package/templates/typescript/docker-compose.hbs +18 -17
@@ -1,762 +1,1090 @@
1
1
  {
2
- "$schema":"http://json-schema.org/draft-07/schema#",
3
- "$id":"aifabrix://schema/external-system.schema.json",
4
- "title":"AI Fabrix External System Configuration Schema",
5
- "description":"Schema for configuring an external system connected to the AI Fabrix Dataplane. This defines authentication, system-level OpenAPI/MCP connectivity hints (not the datasource-grade vendor contract; see external-datasource.schema.json root externalSpec), field mappings defaults, metadata handling and portal inputs.",
6
- "metadata":{
7
- "key":"external-system-schema",
8
- "name":"External System Configuration Schema",
9
- "description":"JSON schema for validating ExternalSystem configuration files",
10
- "version":"1.6.3",
11
- "type":"schema",
12
- "category":"integration",
13
- "author":"AI Fabrix Team",
14
- "createdAt":"2024-01-01T00:00:00Z",
15
- "updatedAt":"2026-05-10T00:00:00Z",
16
- "compatibility":{
17
- "minVersion":"1.4.0",
18
- "maxVersion":"2.0.0",
19
- "deprecated":false
20
- },
21
- "tags":[
22
- "schema",
23
- "external-system",
24
- "dataplane",
25
- "integration",
26
- "validation"
27
- ],
28
- "dependencies":[
29
-
30
- ],
31
- "changelog":[
32
- {
33
- "version":"1.6.3",
34
- "date":"2026-05-10T00:00:00Z",
35
- "changes":[
36
- "Documented split: system openapi/mcp objects are connectivity and bootstrap hints (specUrl, serverUrl, documentKey); datasource-level vendor/API provenance belongs in external-datasource externalSpec.",
37
- "Declared optional openapi.autoDiscoverEntities (wizard/tooling); tightened openapi and mcp to additionalProperties: false."
38
- ],
39
- "breaking":false
40
- },
41
- {
42
- "version":"1.6.2",
43
- "date":"2026-04-23T00:00:00Z",
44
- "changes":[
45
- "certification.algorithm: RS256 only (removed HS256 from enum)"
46
- ]
47
- },
48
- {
49
- "version":"1.6.1",
50
- "date":"2026-04-22T00:00:00Z",
51
- "changes":[
52
- "Optional certification.publicKeyFingerprint (sha256: hex of SPKI DER) for RS256 public key verification"
53
- ]
54
- },
55
- {
56
- "version":"1.6.0",
57
- "date":"2026-04-09T00:00:00Z",
58
- "changes":[
59
- "Added identityPropagation configuration for impersonation, attribution, and system identity execution modes",
60
- "Added tokenBroker mint endpoint and attribution field injection settings for runtime identity behavior"
61
- ]
62
- },
63
- {
64
- "version":"1.5.0",
65
- "date":"2026-03-07T00:00:00Z",
66
- "changes":[
67
- "Optional rateLimit: outbound per-system rate limit (requestsPerWindow/windowSeconds or requestsPerSecond/burstSize); dataplane enforces and handles 429"
68
- ]
69
- },
70
- {
71
- "version":"1.4.0",
72
- "date":"2026-03-07T00:00:00Z",
73
- "changes":[
74
- "Optional testEndpoint in authentication.variables for apikey: full URL or path (path resolved against baseUrl); credential test URL for E2E/credential step"
75
- ]
76
- },
77
- {
78
- "version":"1.3.0",
79
- "date":"2026-02-18T00:00:00Z",
80
- "changes":[
81
- "Template-based authentication: method, variables (baseUrl when method not none), security (kv:// only), credentialKey, writeOnce",
82
- "Credential created on deploy as authentication.credentialKey or <external-system.key>-cred"
83
- ]
84
- },
85
- {
86
- "version":"1.2.0",
87
- "date":"2025-02-01T00:00:00Z",
88
- "changes":[
89
- "Added generateMcpContract (boolean, default true): config-only control for MCP contract generation on publish",
90
- "Added generateOpenApiContract (boolean, default true): reserved for future use"
91
- ],
92
- "breaking":false
93
- },
94
- {
95
- "version":"1.1.0",
96
- "date":"2025-12-01T00:00:00Z",
97
- "changes":[
98
- "Added RBAC roles and permissions support",
99
- "RBAC roles/permissions are registered with miso-controller during deployment",
100
- "Roles support Azure AD group mapping via Groups property",
101
- "Permissions reference roles and are used for access control"
102
- ],
103
- "breaking":false
104
- },
105
- {
106
- "version":"1.0.0",
107
- "date":"2024-01-01T00:00:00Z",
108
- "changes":[
109
- "Initial schema for External Systems",
110
- "Added OpenAPI and MCP contract configuration",
111
- "Added authentication and environment variables",
112
- "Added portalInput for UI-driven onboarding",
113
- "Compatible with field-mappings.schema and security-model.schema"
114
- ],
115
- "breaking":false
116
- }
117
- ]
118
- },
119
- "$defs":{
120
- "authenticationVariablesByMethod":{
121
- "oauth2":{"variables":[{"key":"baseUrl","required":true,"description":"API base URL"},{"key":"tokenUrl","required":true,"description":"OAuth token endpoint. Full URL (https://...) or path (e.g. /oauth/v2/token); path is resolved against baseUrl."},{"key":"authorizationUrl","required":false,"description":"OAuth authorization endpoint. Full URL or path; path is resolved against baseUrl. Required when grantType is authorization_code or omitted."},{"key":"grantType","required":false,"description":"OAuth 2.0 grant type. One of: client_credentials, authorization_code. Default: authorization_code."},{"key":"scope","required":false},{"key":"tenantId","required":false},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."}],"security":[{"key":"clientId","required":true},{"key":"clientSecret","required":true}]},
122
- "aad":{"variables":[{"key":"baseUrl","required":true},{"key":"tokenUrl","required":true,"description":"Token endpoint. Full URL or path (path resolved against baseUrl)."},{"key":"authorizationUrl","required":false,"description":"Authorization endpoint. Full URL or path (path resolved against baseUrl). Required when grantType is authorization_code or omitted."},{"key":"grantType","required":false,"description":"OAuth 2.0 grant type. One of: client_credentials, authorization_code. Default: authorization_code."},{"key":"tenantId","required":false},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."}],"security":[{"key":"clientId","required":true},{"key":"clientSecret","required":true}]},
123
- "apikey":{"variables":[{"key":"baseUrl","required":true},{"key":"headerName","required":false},{"key":"prefix","required":false},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL (https://...) or path (e.g. /crm/v3/objects/contacts?limit=1); path is resolved against baseUrl. If omitted, baseUrl + /health is used."}],"security":[{"key":"apiKey","required":true}]},
124
- "basic":{"variables":[{"key":"baseUrl","required":true},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."}],"security":[{"key":"username","required":true},{"key":"password","required":true}]},
125
- "queryParam":{"variables":[{"key":"baseUrl","required":true},{"key":"paramName","required":true},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."}],"security":[{"key":"paramValue","required":true}]},
126
- "oidc":{"variables":[{"key":"openIdConfigUrl","required":true},{"key":"clientId","required":true},{"key":"expectedIssuer","required":false},{"key":"algorithms","required":false},{"key":"validateSignature","required":false},{"key":"clockSkewSeconds","required":false},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path. For OIDC, discovery URL is typically used if testEndpoint omitted."}],"security":[]},
127
- "hmac":{"variables":[{"key":"baseUrl","required":false},{"key":"algorithm","required":false},{"key":"signatureHeader","required":false},{"key":"timestampHeader","required":false},{"key":"signaturePrefix","required":false},{"key":"testEndpoint","required":false,"description":"Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl when baseUrl present)."}],"security":[{"key":"signingSecret","required":true}]},
128
- "none":{"variables":[],"security":[]}
129
- }
130
- },
131
- "type":"object",
132
- "required":[
133
- "key",
134
- "displayName",
135
- "description",
136
- "type",
137
- "authentication"
138
- ],
139
- "properties":{
140
- "key":{
141
- "type":"string",
142
- "description":"Unique external system identifier (cannot be changed after creation). Example: 'hubspot', 'salesforce', 'teams'.",
143
- "pattern":"^[a-z0-9-]+$",
144
- "minLength":3,
145
- "maxLength":40
146
- },
147
- "displayName":{
148
- "type":"string",
149
- "description":"Human-readable name for the external system",
150
- "minLength":1,
151
- "maxLength":100
152
- },
153
- "description":{
154
- "type":"string",
155
- "description":"Description of this external system integration",
156
- "minLength":1,
157
- "maxLength":500
158
- },
159
- "type":{
160
- "type":"string",
161
- "enum":[
162
- "openapi",
163
- "mcp",
164
- "custom"
165
- ],
166
- "description":"Integration type: openapi and mcp indicate how the system is wired at a high level; per-datasource vendor specifications and import provenance are authored on each ExternalDataSource (external-datasource.schema.json externalSpec), not duplicated as the full contract here."
167
- },
168
- "enabled":{
169
- "type":"boolean",
170
- "default":true
171
- },
172
- "credentialIdOrKey":{
173
- "type":"string",
174
- "description":"Credential identifier (ID or key) to attach to this system. Used by dataplane when creating/updating system from deploy config."
175
- },
176
- "internal":{
177
- "type":"boolean",
178
- "description":"When true, this integration is deployed on dataplane startup (internal integration). When false or absent, deployed via pipeline only.",
179
- "default":false
180
- },
181
- "authentication":{
182
- "type":"object",
183
- "description":"Template-based authentication. Required: method, variables. When method is not 'none', variables must include baseUrl and security must contain only kv:// references. On deploy, a credential is created with key authentication.credentialKey or <external-system.key>-cred. Template is write-once.",
184
- "required":[
185
- "method",
186
- "variables"
187
- ],
188
- "properties":{
189
- "credentialKey":{
190
- "type":"string",
191
- "description":"Stable reference key for the active credential. Default: <external-system.key>-cred."
192
- },
193
- "displayName":{
194
- "type":"string",
195
- "description":"Display name for the credential created from this template."
196
- },
197
- "method":{
198
- "type":"string",
199
- "enum":[
200
- "oauth2",
201
- "apikey",
202
- "basic",
203
- "aad",
204
- "none",
205
- "queryParam",
206
- "oidc",
207
- "hmac"
208
- ],
209
- "description":"Authentication method."
210
- },
211
- "variables":{
212
- "type":"object",
213
- "description":"Non-secret config. See $defs.authenticationVariablesByMethod for per-method keys. oauth2/aad: baseUrl, tokenUrl, authorizationUrl (optional; required when grantType is authorization_code or omitted), grantType (optional, default authorization_code); apikey: baseUrl, headerName (optional), prefix (optional), testEndpoint (optional); basic: baseUrl; queryParam: baseUrl, paramName; oidc: openIdConfigUrl, clientId; hmac: optional; none: empty. URL-valued variables (tokenUrl, authorizationUrl, testEndpoint) accept full URL or path; paths are resolved against baseUrl by the backend.",
214
- "additionalProperties":{
215
- "type":"string"
216
- }
217
- },
218
- "security":{
219
- "type":"object",
220
- "description":"Secret-bearing keys only. Values must be kv:// references. See $defs.authenticationVariablesByMethod. oauth2/aad: clientId, clientSecret; apikey: apiKey; basic: username, password; queryParam: paramValue; oidc: none; hmac: signingSecret.",
221
- "additionalProperties":{
222
- "type":"string",
223
- "pattern":"^kv://.+$"
224
- }
225
- },
226
- "writeOnce":{
227
- "type":"boolean",
228
- "description":"Template is immutable after first deploy; dataplane does not update the credential from this template again.",
229
- "default":true
230
- }
231
- },
232
- "examples":[
233
- {"method":"oauth2","variables":{"baseUrl":"https://api.example.com","tokenUrl":"https://api.example.com/oauth/token","authorizationUrl":"https://api.example.com/oauth/authorize"},"security":{"clientId":"kv://example/clientId","clientSecret":"kv://example/clientSecret"}},
234
- {"method":"oauth2","variables":{"baseUrl":"https://api.example.com","tokenUrl":"https://api.example.com/oauth/token","grantType":"client_credentials"},"security":{"clientId":"kv://example/clientId","clientSecret":"kv://example/clientSecret"}},
235
- {"method":"apikey","variables":{"baseUrl":"https://api.example.com","headerName":"X-API-Key","testEndpoint":"https://api.example.com/health"},"security":{"apiKey":"kv://example/apiKey"}},
236
- {"method":"apikey","variables":{"baseUrl":"https://api.example.com","headerName":"Authorization","prefix":"Bearer","testEndpoint":"/crm/v3/objects/contacts?limit=1"},"security":{"apiKey":"kv://example/apiKey"}},
237
- {"method":"basic","variables":{"baseUrl":"https://api.example.com"},"security":{"username":"kv://example/username","password":"kv://example/password"}},
238
- {"method":"queryParam","variables":{"baseUrl":"https://api.example.com","paramName":"api_key"},"security":{"paramValue":"kv://example/apiKey"}},
239
- {"method":"oidc","variables":{"openIdConfigUrl":"https://example.com/.well-known/openid-configuration","clientId":"app-id"}},
240
- {"method":"hmac","variables":{"signatureHeader":"X-Signature"},"security":{"signingSecret":"kv://example/signingSecret"}},
241
- {"method":"none","variables":{}}
242
- ],
243
- "additionalProperties":false
244
- },
245
- "openapi":{
246
- "type":"object",
247
- "description":"System-level connectivity and bootstrap hints for OpenAPI-backed systems (e.g. default specUrl for discovery, documentKey alignment with shared registry entries). Not the authoritative per-datasource vendor OpenAPI contract; that is declared on the datasource via externalSpec and validated against imported material.",
248
- "properties":{
249
- "documentKey":{
250
- "type":"string",
251
- "description":"Optional registry-oriented key associated with this system's default OpenAPI document (wizard/bootstrap)."
252
- },
253
- "specUrl":{
254
- "type":"string",
255
- "description":"Optional absolute URL to a representative OpenAPI specification for onboarding or tooling (not a substitute for datasource externalSpec).",
256
- "pattern":"^(http|https)://.*$"
257
- },
258
- "autoDiscoverEntities":{
259
- "type":"boolean",
260
- "description":"Optional wizard or tooling hint to discover entities from the system default spec. Not part of the per-datasource vendor contract (see external-datasource externalSpec)."
261
- }
262
- },
263
- "additionalProperties":false
264
- },
265
- "mcp":{
266
- "type":"object",
267
- "description":"System-level MCP connectivity hints (server URL, tool prefix). Not the datasource-level MCP security or operation contract; those live on ExternalDataSource configuration.",
268
- "properties":{
269
- "serverUrl":{
270
- "type":"string",
271
- "description":"MCP server URL",
272
- "pattern":"^(http|https)://.*$"
273
- },
274
- "toolPrefix":{
275
- "type":"string",
276
- "description":"Prefix for MCP tool names",
277
- "pattern":"^[a-zA-Z0-9_-]+$"
278
- }
279
- },
280
- "additionalProperties":false
281
- },
282
- "dataSources":{
283
- "type":"array",
284
- "description":"List of data source keys belonging to this external system. Each must match external-datasource.schema.json.",
285
- "items":{
286
- "type":"string",
287
- "pattern":"^[a-z0-9-]+$"
288
- },
289
- "uniqueItems":true
290
- },
291
- "configuration":{
292
- "type":"array",
293
- "description":"External system configuration variables (same pattern as application-schema).",
294
- "items":{
295
- "type":"object",
296
- "required":[
297
- "name",
298
- "value",
299
- "location",
300
- "required"
301
- ],
302
- "properties":{
303
- "name":{
304
- "type":"string",
305
- "pattern":"^[A-Z_][A-Z0-9_]*$"
306
- },
307
- "value":{
308
- "type":"string",
309
- "description":"Literal value or parameter reference ({{parameter}})"
310
- },
311
- "location":{
312
- "type":"string",
313
- "enum":[
314
- "variable",
315
- "keyvault"
316
- ]
317
- },
318
- "required":{
319
- "type":"boolean"
320
- },
321
- "portalInput":{
322
- "type":"object",
323
- "required":[
324
- "field",
325
- "label"
326
- ],
327
- "properties":{
328
- "field":{
329
- "type":"string",
330
- "enum":[
331
- "password",
332
- "text",
333
- "textarea",
334
- "select",
335
- "json"
336
- ]
337
- },
338
- "label":{
339
- "type":"string"
340
- },
341
- "placeholder":{
342
- "type":"string"
343
- },
344
- "options":{
345
- "type":"array",
346
- "items":{
347
- "type":"string"
348
- }
349
- },
350
- "masked":{
351
- "type":"boolean"
352
- },
353
- "validation":{
354
- "type":"object",
355
- "properties":{
356
- "minLength":{
357
- "type":"integer"
358
- },
359
- "maxLength":{
360
- "type":"integer"
361
- },
362
- "pattern":{
363
- "type":"string"
364
- },
365
- "required":{
366
- "type":"boolean"
367
- }
368
- },
369
- "additionalProperties":false
370
- }
371
- },
372
- "additionalProperties":false
373
- }
374
- },
375
- "additionalProperties":false
376
- }
377
- },
378
- "tags":{
379
- "type":"array",
380
- "description":"Optional tags for search / filtering",
381
- "items":{
382
- "type":"string"
383
- }
384
- },
385
- "roles":{
386
- "type":"array",
387
- "description":"External system roles for Azure AD group mapping",
388
- "items":{
389
- "type":"object",
390
- "required":[
391
- "name",
392
- "value",
393
- "description"
394
- ],
395
- "properties":{
396
- "name":{
397
- "type":"string",
398
- "description":"Human-readable role name",
399
- "minLength":1,
400
- "maxLength":100
401
- },
402
- "value":{
403
- "type":"string",
404
- "description":"Role identifier (used in JWT and ACL)",
405
- "pattern":"^[a-z0-9-]+$"
406
- },
407
- "description":{
408
- "type":"string",
409
- "description":"Role description",
410
- "minLength":1,
411
- "maxLength":500
412
- },
413
- "groups":{
414
- "type":"array",
415
- "description":"Azure AD groups mapped to this role",
416
- "items":{
417
- "type":"string",
418
- "minLength":1,
419
- "maxLength":100
420
- }
421
- }
422
- },
423
- "additionalProperties":false
424
- }
425
- },
426
- "permissions":{
427
- "type":"array",
428
- "description":"External system permissions with role mappings for access control",
429
- "items":{
430
- "type":"object",
431
- "required":[
432
- "name",
433
- "roles",
434
- "description"
435
- ],
436
- "properties":{
437
- "name":{
438
- "type":"string",
439
- "description":"Permission identifier (e.g., 'documentstore:read', 'flowise:dev:access')",
440
- "pattern":"^[a-z0-9-:]+$",
441
- "minLength":1,
442
- "maxLength":100
443
- },
444
- "roles":{
445
- "type":"array",
446
- "description":"Roles that have this permission",
447
- "items":{
448
- "type":"string",
449
- "pattern":"^[a-z0-9-]+$",
450
- "minLength":1,
451
- "maxLength":50
452
- },
453
- "minItems":1
454
- },
455
- "description":{
456
- "type":"string",
457
- "description":"Permission description",
458
- "minLength":1,
459
- "maxLength":500
460
- }
461
- },
462
- "additionalProperties":false
463
- }
464
- },
465
- "endpoints":{
466
- "type":"array",
467
- "description":"API endpoint configurations for this external system. Used for dynamic endpoint registration at application startup.",
468
- "items":{
469
- "type":"object",
470
- "required":[
471
- "type",
472
- "path"
473
- ],
474
- "properties":{
475
- "type":{
476
- "type":"string",
477
- "description":"Endpoint type identifier (e.g., 'commands', 'events', 'notifications')",
478
- "pattern":"^[a-z0-9-]+$"
479
- },
480
- "path":{
481
- "type":"string",
482
- "description":"URL path for this endpoint (e.g., '/commands', '/events')",
483
- "pattern":"^/[a-z0-9/-]*$"
484
- },
485
- "description":{
486
- "type":"string",
487
- "description":"Human-readable description of the endpoint"
488
- },
489
- "active":{
490
- "type":"boolean",
491
- "description":"Whether this endpoint should be registered (defaults to true)",
492
- "default":true
493
- },
494
- "router":{
495
- "type":"string",
496
- "description":"Custom router module path override (defaults to auto-discovery based on naming convention)"
497
- }
498
- },
499
- "additionalProperties":false
500
- }
501
- },
502
- "endpointsActive":{
503
- "type":"boolean",
504
- "description":"Master switch for all endpoints in this system. If false, no endpoints are registered regardless of individual endpoint active flags.",
505
- "default":true
506
- },
507
- "generateMcpContract":{
508
- "type":"boolean",
509
- "description":"Whether to generate MCP contract on publish. Config only (no query parameter); default true when absent.",
510
- "default":true
511
- },
512
- "generateOpenApiContract":{
513
- "type":"boolean",
514
- "description":"Reserved: whether to generate or expose OpenAPI contract on publish. Not yet implemented.",
515
- "default":true
516
- },
517
- "triggerPathsHash":{
518
- "type":"string",
519
- "description":"SHA256 hash of triggerPaths payload (64-char hex). Used to detect structural changes. Optional; Dataplane computes when absent.",
520
- "pattern":"^[a-f0-9]{64}$"
521
- },
522
- "identityPropagation":{
523
- "type":"object",
524
- "description":"Declares supported identity propagation modes and defaults for outbound operations.",
525
- "required":[
526
- "modes",
527
- "default"
528
- ],
529
- "properties":{
530
- "modes":{
531
- "type":"array",
532
- "items":{
533
- "type":"string",
534
- "enum":[
535
- "impersonation",
536
- "attribution",
537
- "system"
538
- ]
539
- },
540
- "uniqueItems":true,
541
- "minItems":1
542
- },
543
- "default":{
544
- "type":"string",
545
- "enum":[
546
- "impersonation",
547
- "attribution",
548
- "system"
549
- ]
550
- },
551
- "impersonation":{
552
- "type":"object",
553
- "properties":{
554
- "tokenBroker":{
555
- "type":"object",
556
- "properties":{
557
- "mintEndpoint":{
558
- "type":"string",
559
- "default":"/api/v1/auth/token/mint",
560
- "description":"Controller endpoint for delegated token minting."
561
- }
562
- },
563
- "additionalProperties":false
564
- },
565
- "scopes":{
566
- "type":"array",
567
- "items":{
568
- "type":"string"
569
- }
570
- },
571
- "requiredUserConsent":{
572
- "type":"boolean",
573
- "default":false
574
- }
575
- },
576
- "additionalProperties":false
577
- },
578
- "attribution":{
579
- "type":"object",
580
- "properties":{
581
- "actorFieldMappings":{
582
- "type":"object",
583
- "description":"Map target fields to actor templates (supports {{actor.*}} and {{request.*}}).",
584
- "additionalProperties":{
585
- "type":[
586
- "string",
587
- "number",
588
- "boolean"
589
- ]
590
- }
591
- },
592
- "commentTemplate":{
593
- "type":"string",
594
- "description":"Optional comment template for attribution logs (supports {{actor.*}})."
595
- },
596
- "injectionLocations":{
597
- "type":"array",
598
- "items":{
599
- "type":"string",
600
- "enum":[
601
- "body",
602
- "headers",
603
- "query",
604
- "comment"
605
- ]
606
- },
607
- "default":[
608
- "body"
609
- ],
610
- "uniqueItems":true
611
- }
612
- },
613
- "additionalProperties":false
614
- },
615
- "system":{
616
- "type":"object",
617
- "properties":{
618
- "allowWrites":{
619
- "type":"boolean",
620
- "default":true
621
- }
622
- },
623
- "additionalProperties":false
624
- }
625
- },
626
- "additionalProperties":false
627
- },
628
- "rateLimit":{
629
- "type":"object",
630
- "description":"Outbound rate limit for requests from the dataplane to this external system. When set, the dataplane enforces the limit per base URL and handles HTTP 429 (wait and retry). When absent, global env defaults apply (CIP_EXECUTION_RATE_LIMIT_REQUESTS_PER_SECOND, CIP_EXECUTION_RATE_LIMIT_BURST_SIZE). Supports window-based (e.g. HubSpot 100/10s) or token-bucket style (requestsPerSecond + burstSize).",
631
- "properties":{
632
- "requestsPerWindow":{
633
- "type":"integer",
634
- "minimum":1,
635
- "description":"Maximum requests allowed in the time window (window-based limit). Example: 100 for HubSpot's 100 requests per 10 seconds."
636
- },
637
- "windowSeconds":{
638
- "type":"integer",
639
- "minimum":1,
640
- "description":"Time window in seconds. Used with requestsPerWindow. Example: 10 for HubSpot (100 requests per 10 seconds)."
641
- },
642
- "requestsPerSecond":{
643
- "type":"number",
644
- "minimum":0.1,
645
- "description":"Sustained request rate (token-bucket style). When used with burstSize, allows short bursts up to burstSize while refilling at this rate."
646
- },
647
- "burstSize":{
648
- "type":"integer",
649
- "minimum":1,
650
- "description":"Maximum burst size in tokens (token-bucket style). Used with requestsPerSecond."
651
- }
652
- },
653
- "additionalProperties":false,
654
- "oneOf":[
655
- {
656
- "required":["requestsPerWindow","windowSeconds"]
657
- },
658
- {
659
- "required":["requestsPerSecond","burstSize"]
660
- }
661
- ],
662
- "examples":[
663
- {"requestsPerWindow":100,"windowSeconds":10},
664
- {"requestsPerSecond":10,"burstSize":100}
665
- ]
666
- },
667
- "performance":{
668
- "type":"object",
669
- "description":"Performance defaults for runtime paths in this external system.",
670
- "properties":{
671
- "cacheDefaults":{
672
- "type":"object",
673
- "description":"Default cache policy inherited by datasources unless overridden under sync.cache.",
674
- "properties":{
675
- "enabled":{
676
- "type":"boolean",
677
- "default":true
678
- },
679
- "ttlSeconds":{
680
- "type":"integer",
681
- "minimum":1,
682
- "maximum":604800,
683
- "default":1800
684
- }
685
- },
686
- "additionalProperties":false
687
- }
688
- },
689
- "additionalProperties":false
690
- },
691
- "certification":{
692
- "type":"object",
693
- "description":"Public certification settings for external system version verification.",
694
- "required":[
695
- "enabled",
696
- "publicKey",
697
- "algorithm",
698
- "issuer",
699
- "version"
700
- ],
701
- "properties":{
702
- "enabled":{
703
- "type":"boolean",
704
- "description":"Enable public certification metadata for this external system."
705
- },
706
- "publicKey":{
707
- "type":"string",
708
- "minLength":1,
709
- "description":"Public verification material (SPKI PEM for RS256). Private keys must never appear in config."
710
- },
711
- "publicKeyFingerprint":{
712
- "type":"string",
713
- "pattern":"^sha256:[0-9a-f]{64}$",
714
- "description":"SHA-256 fingerprint of the SubjectPublicKeyInfo DER (same convention as integration certificate publicKeyFingerprint); must match embedded publicKey."
715
- },
716
- "contractHash":{
717
- "type":"string",
718
- "pattern":"^sha256:[0-9a-f]{64}$",
719
- "description":"Optional copy of the active integration certificate contractHash (certification contract material digest) for drift checks; should match the dataplane active trusted certificate when present."
720
- },
721
- "algorithm":{
722
- "type":"string",
723
- "enum":[
724
- "RS256"
725
- ],
726
- "description":"Signing algorithm for integration certificate verification (RS256 only)."
727
- },
728
- "issuer":{
729
- "type":"string",
730
- "minLength":1,
731
- "description":"Certificate issuer identifier."
732
- },
733
- "version":{
734
- "type":"string",
735
- "minLength":1,
736
- "description":"Certification version identifier; must align with external system versioning."
737
- },
738
- "status":{
739
- "type":"string",
740
- "enum":[
741
- "passed",
742
- "not_passed",
743
- "pending"
744
- ],
745
- "description":"Outcome of certification evaluation for this block (aligns with DatasourceTestRun certificate.status)."
746
- },
747
- "level":{
748
- "type":"string",
749
- "enum":[
750
- "BRONZE",
751
- "SILVER",
752
- "GOLD",
753
- "PLATINUM"
754
- ],
755
- "description":"Achieved certification tier (aligns with integration certificate certificationLevel)."
756
- }
757
- },
758
- "additionalProperties":false
759
- }
760
- },
761
- "additionalProperties":false
762
- }
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "aifabrix://schema/external-system.schema.json",
4
+ "title": "AI Fabrix External System Configuration Schema",
5
+ "description": "Schema for configuring an external system connected to the AI Fabrix Dataplane. This defines authentication, system-level OpenAPI/MCP connectivity hints (not the datasource-grade vendor contract; see external-datasource.schema.json root externalSpec), field mappings defaults, metadata handling and portal inputs.",
6
+ "metadata": {
7
+ "key": "external-system-schema",
8
+ "name": "External System Configuration Schema",
9
+ "description": "JSON schema for validating ExternalSystem configuration files",
10
+ "version": "1.7.0",
11
+ "type": "schema",
12
+ "category": "integration",
13
+ "author": "AI Fabrix Team",
14
+ "createdAt": "2024-01-01T00:00:00Z",
15
+ "updatedAt": "2026-05-20T00:00:00Z",
16
+ "compatibility": {
17
+ "minVersion": "1.4.0",
18
+ "maxVersion": "2.0.0",
19
+ "deprecated": false
20
+ },
21
+ "tags": [
22
+ "schema",
23
+ "external-system",
24
+ "dataplane",
25
+ "integration",
26
+ "validation"
27
+ ],
28
+ "dependencies": [],
29
+ "changelog": [
30
+ {
31
+ "version": "1.7.0",
32
+ "date": "2026-05-20T00:00:00Z",
33
+ "changes": [
34
+ "Breaking: nested authentication with authType discriminator (credential | apiProvider | none)",
35
+ "Flat authentication.method at top level removed; credential template lives under authentication.credential",
36
+ "Added authentication.apiProvider.apiProviderKey for Miso delegated API Provider reference"
37
+ ],
38
+ "breaking": true
39
+ },
40
+ {
41
+ "version": "1.6.3",
42
+ "date": "2026-05-10T00:00:00Z",
43
+ "changes": [
44
+ "Documented split: system openapi/mcp objects are connectivity and bootstrap hints (specUrl, serverUrl, documentKey); datasource-level vendor/API provenance belongs in external-datasource externalSpec.",
45
+ "Declared optional openapi.autoDiscoverEntities (wizard/tooling); tightened openapi and mcp to additionalProperties: false."
46
+ ],
47
+ "breaking": false
48
+ },
49
+ {
50
+ "version": "1.6.2",
51
+ "date": "2026-04-23T00:00:00Z",
52
+ "changes": [
53
+ "certification.algorithm: RS256 only (removed HS256 from enum)"
54
+ ]
55
+ },
56
+ {
57
+ "version": "1.6.1",
58
+ "date": "2026-04-22T00:00:00Z",
59
+ "changes": [
60
+ "Optional certification.publicKeyFingerprint (sha256: hex of SPKI DER) for RS256 public key verification"
61
+ ]
62
+ },
63
+ {
64
+ "version": "1.6.0",
65
+ "date": "2026-04-09T00:00:00Z",
66
+ "changes": [
67
+ "Added identityPropagation configuration for impersonation, attribution, and system identity execution modes",
68
+ "Added tokenBroker mint endpoint and attribution field injection settings for runtime identity behavior"
69
+ ]
70
+ },
71
+ {
72
+ "version": "1.5.0",
73
+ "date": "2026-03-07T00:00:00Z",
74
+ "changes": [
75
+ "Optional rateLimit: outbound per-system rate limit (requestsPerWindow/windowSeconds or requestsPerSecond/burstSize); dataplane enforces and handles 429"
76
+ ]
77
+ },
78
+ {
79
+ "version": "1.4.0",
80
+ "date": "2026-03-07T00:00:00Z",
81
+ "changes": [
82
+ "Optional testEndpoint in authentication.variables for apikey: full URL or path (path resolved against baseUrl); credential test URL for E2E/credential step"
83
+ ]
84
+ },
85
+ {
86
+ "version": "1.3.0",
87
+ "date": "2026-02-18T00:00:00Z",
88
+ "changes": [
89
+ "Template-based authentication: method, variables (baseUrl when method not none), security (kv:// only), credentialKey, writeOnce",
90
+ "Credential created on deploy as authentication.credentialKey or <external-system.key>-cred"
91
+ ]
92
+ },
93
+ {
94
+ "version": "1.2.0",
95
+ "date": "2025-02-01T00:00:00Z",
96
+ "changes": [
97
+ "Added generateMcpContract (boolean, default true): config-only control for MCP contract generation on publish",
98
+ "Added generateOpenApiContract (boolean, default true): reserved for future use"
99
+ ],
100
+ "breaking": false
101
+ },
102
+ {
103
+ "version": "1.1.0",
104
+ "date": "2025-12-01T00:00:00Z",
105
+ "changes": [
106
+ "Added RBAC roles and permissions support",
107
+ "RBAC roles/permissions are registered with miso-controller during deployment",
108
+ "Roles support Azure AD group mapping via Groups property",
109
+ "Permissions reference roles and are used for access control"
110
+ ],
111
+ "breaking": false
112
+ },
113
+ {
114
+ "version": "1.0.0",
115
+ "date": "2024-01-01T00:00:00Z",
116
+ "changes": [
117
+ "Initial schema for External Systems",
118
+ "Added OpenAPI and MCP contract configuration",
119
+ "Added authentication and environment variables",
120
+ "Added portalInput for UI-driven onboarding",
121
+ "Compatible with field-mappings.schema and security-model.schema"
122
+ ],
123
+ "breaking": false
124
+ }
125
+ ]
126
+ },
127
+ "$defs": {
128
+ "authenticationVariablesByMethod": {
129
+ "oauth2": {
130
+ "variables": [
131
+ {
132
+ "key": "baseUrl",
133
+ "required": true,
134
+ "description": "API base URL"
135
+ },
136
+ {
137
+ "key": "tokenUrl",
138
+ "required": true,
139
+ "description": "OAuth token endpoint. Full URL (https://...) or path (e.g. /oauth/v2/token); path is resolved against baseUrl."
140
+ },
141
+ {
142
+ "key": "authorizationUrl",
143
+ "required": false,
144
+ "description": "OAuth authorization endpoint. Full URL or path; path is resolved against baseUrl. Required when grantType is authorization_code or omitted."
145
+ },
146
+ {
147
+ "key": "grantType",
148
+ "required": false,
149
+ "description": "OAuth 2.0 grant type. One of: client_credentials, authorization_code. Default: authorization_code."
150
+ },
151
+ {
152
+ "key": "scope",
153
+ "required": false
154
+ },
155
+ {
156
+ "key": "tenantId",
157
+ "required": false
158
+ },
159
+ {
160
+ "key": "testEndpoint",
161
+ "required": false,
162
+ "description": "Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."
163
+ }
164
+ ],
165
+ "security": [
166
+ {
167
+ "key": "clientId",
168
+ "required": true
169
+ },
170
+ {
171
+ "key": "clientSecret",
172
+ "required": true
173
+ }
174
+ ]
175
+ },
176
+ "aad": {
177
+ "variables": [
178
+ {
179
+ "key": "baseUrl",
180
+ "required": true
181
+ },
182
+ {
183
+ "key": "tokenUrl",
184
+ "required": true,
185
+ "description": "Token endpoint. Full URL or path (path resolved against baseUrl)."
186
+ },
187
+ {
188
+ "key": "authorizationUrl",
189
+ "required": false,
190
+ "description": "Authorization endpoint. Full URL or path (path resolved against baseUrl). Required when grantType is authorization_code or omitted."
191
+ },
192
+ {
193
+ "key": "grantType",
194
+ "required": false,
195
+ "description": "OAuth 2.0 grant type. One of: client_credentials, authorization_code. Default: authorization_code."
196
+ },
197
+ {
198
+ "key": "tenantId",
199
+ "required": false
200
+ },
201
+ {
202
+ "key": "testEndpoint",
203
+ "required": false,
204
+ "description": "Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."
205
+ }
206
+ ],
207
+ "security": [
208
+ {
209
+ "key": "clientId",
210
+ "required": true
211
+ },
212
+ {
213
+ "key": "clientSecret",
214
+ "required": true
215
+ }
216
+ ]
217
+ },
218
+ "apikey": {
219
+ "variables": [
220
+ {
221
+ "key": "baseUrl",
222
+ "required": true
223
+ },
224
+ {
225
+ "key": "headerName",
226
+ "required": false
227
+ },
228
+ {
229
+ "key": "prefix",
230
+ "required": false
231
+ },
232
+ {
233
+ "key": "testEndpoint",
234
+ "required": false,
235
+ "description": "Optional URL used when testing the credential (GET). Full URL (https://...) or path (e.g. /crm/v3/objects/contacts?limit=1); path is resolved against baseUrl. If omitted, baseUrl + /health is used."
236
+ }
237
+ ],
238
+ "security": [
239
+ {
240
+ "key": "apiKey",
241
+ "required": true
242
+ }
243
+ ]
244
+ },
245
+ "bearerToken": {
246
+ "variables": [
247
+ {
248
+ "key": "baseUrl",
249
+ "required": true
250
+ },
251
+ {
252
+ "key": "headerName",
253
+ "required": false
254
+ },
255
+ {
256
+ "key": "prefix",
257
+ "required": false
258
+ },
259
+ {
260
+ "key": "testEndpoint",
261
+ "required": false,
262
+ "description": "Optional URL used when testing the credential (GET). Full URL or path; path is resolved against baseUrl. If omitted, baseUrl + /health is used."
263
+ }
264
+ ],
265
+ "security": [
266
+ {
267
+ "key": "token",
268
+ "required": true
269
+ }
270
+ ]
271
+ },
272
+ "basic": {
273
+ "variables": [
274
+ {
275
+ "key": "baseUrl",
276
+ "required": true
277
+ },
278
+ {
279
+ "key": "testEndpoint",
280
+ "required": false,
281
+ "description": "Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."
282
+ }
283
+ ],
284
+ "security": [
285
+ {
286
+ "key": "username",
287
+ "required": true
288
+ },
289
+ {
290
+ "key": "password",
291
+ "required": true
292
+ }
293
+ ]
294
+ },
295
+ "queryParam": {
296
+ "variables": [
297
+ {
298
+ "key": "baseUrl",
299
+ "required": true
300
+ },
301
+ {
302
+ "key": "paramName",
303
+ "required": true
304
+ },
305
+ {
306
+ "key": "testEndpoint",
307
+ "required": false,
308
+ "description": "Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl). If omitted, baseUrl + /health is used."
309
+ }
310
+ ],
311
+ "security": [
312
+ {
313
+ "key": "paramValue",
314
+ "required": true
315
+ }
316
+ ]
317
+ },
318
+ "oidc": {
319
+ "variables": [
320
+ {
321
+ "key": "openIdConfigUrl",
322
+ "required": true
323
+ },
324
+ {
325
+ "key": "clientId",
326
+ "required": true
327
+ },
328
+ {
329
+ "key": "expectedIssuer",
330
+ "required": false
331
+ },
332
+ {
333
+ "key": "algorithms",
334
+ "required": false
335
+ },
336
+ {
337
+ "key": "validateSignature",
338
+ "required": false
339
+ },
340
+ {
341
+ "key": "clockSkewSeconds",
342
+ "required": false
343
+ },
344
+ {
345
+ "key": "testEndpoint",
346
+ "required": false,
347
+ "description": "Optional URL used when testing the credential (GET). Full URL or path. For OIDC, discovery URL is typically used if testEndpoint omitted."
348
+ }
349
+ ],
350
+ "security": []
351
+ },
352
+ "hmac": {
353
+ "variables": [
354
+ {
355
+ "key": "baseUrl",
356
+ "required": false
357
+ },
358
+ {
359
+ "key": "algorithm",
360
+ "required": false
361
+ },
362
+ {
363
+ "key": "signatureHeader",
364
+ "required": false
365
+ },
366
+ {
367
+ "key": "timestampHeader",
368
+ "required": false
369
+ },
370
+ {
371
+ "key": "signaturePrefix",
372
+ "required": false
373
+ },
374
+ {
375
+ "key": "testEndpoint",
376
+ "required": false,
377
+ "description": "Optional URL used when testing the credential (GET). Full URL or path (path resolved against baseUrl when baseUrl present)."
378
+ }
379
+ ],
380
+ "security": [
381
+ {
382
+ "key": "signingSecret",
383
+ "required": true
384
+ }
385
+ ]
386
+ },
387
+ "none": {
388
+ "variables": [],
389
+ "security": []
390
+ }
391
+ },
392
+ "credentialTemplate": {
393
+ "type": "object",
394
+ "description": "Local credential template (method, variables, security with kv:// only). Materialized to credentials row on deploy.",
395
+ "required": [
396
+ "method",
397
+ "variables"
398
+ ],
399
+ "properties": {
400
+ "credentialKey": {
401
+ "type": "string",
402
+ "description": "Stable reference key for the active credential. Default: <external-system.key>-cred."
403
+ },
404
+ "displayName": {
405
+ "type": "string",
406
+ "description": "Display name for the credential created from this template."
407
+ },
408
+ "method": {
409
+ "type": "string",
410
+ "enum": [
411
+ "oauth2",
412
+ "apikey",
413
+ "bearerToken",
414
+ "basic",
415
+ "aad",
416
+ "none",
417
+ "queryParam",
418
+ "oidc",
419
+ "hmac"
420
+ ],
421
+ "description": "Authentication method."
422
+ },
423
+ "variables": {
424
+ "type": "object",
425
+ "description": "Non-secret config. See $defs.authenticationVariablesByMethod for per-method keys.",
426
+ "additionalProperties": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "security": {
431
+ "type": "object",
432
+ "description": "Secret-bearing keys only. Values must be kv:// references.",
433
+ "additionalProperties": {
434
+ "type": "string",
435
+ "pattern": "^kv://.+$"
436
+ }
437
+ },
438
+ "writeOnce": {
439
+ "type": "boolean",
440
+ "description": "Template is immutable after first deploy.",
441
+ "default": true
442
+ }
443
+ },
444
+ "additionalProperties": false
445
+ },
446
+ "apiProviderReference": {
447
+ "type": "object",
448
+ "description": "Reference to a Miso API Provider for delegated authentication (no dataplane secrets).",
449
+ "required": [
450
+ "apiProviderKey"
451
+ ],
452
+ "properties": {
453
+ "apiProviderKey": {
454
+ "type": "string",
455
+ "minLength": 1,
456
+ "description": "Stable key of the Miso API Provider configuration."
457
+ }
458
+ },
459
+ "additionalProperties": false
460
+ }
461
+ },
462
+ "type": "object",
463
+ "required": [
464
+ "key",
465
+ "displayName",
466
+ "description",
467
+ "type",
468
+ "authentication"
469
+ ],
470
+ "properties": {
471
+ "key": {
472
+ "type": "string",
473
+ "description": "Unique external system identifier (cannot be changed after creation). Example: 'hubspot', 'salesforce', 'teams'.",
474
+ "pattern": "^[a-z0-9-]+$",
475
+ "minLength": 3,
476
+ "maxLength": 40
477
+ },
478
+ "displayName": {
479
+ "type": "string",
480
+ "description": "Human-readable name for the external system",
481
+ "minLength": 1,
482
+ "maxLength": 100
483
+ },
484
+ "description": {
485
+ "type": "string",
486
+ "description": "Description of this external system integration",
487
+ "minLength": 1,
488
+ "maxLength": 500
489
+ },
490
+ "type": {
491
+ "type": "string",
492
+ "enum": [
493
+ "openapi",
494
+ "mcp",
495
+ "custom"
496
+ ],
497
+ "description": "Integration type: openapi and mcp indicate how the system is wired at a high level; per-datasource vendor specifications and import provenance are authored on each ExternalDataSource (external-datasource.schema.json externalSpec), not duplicated as the full contract here."
498
+ },
499
+ "enabled": {
500
+ "type": "boolean",
501
+ "default": true
502
+ },
503
+ "credentialIdOrKey": {
504
+ "type": "string",
505
+ "description": "Credential identifier (ID or key) to attach to this system. Used by dataplane when creating/updating system from deploy config."
506
+ },
507
+ "internal": {
508
+ "type": "boolean",
509
+ "description": "When true, this integration is deployed on dataplane startup (internal integration). When false or absent, deployed via pipeline only.",
510
+ "default": false
511
+ },
512
+ "authentication": {
513
+ "description": "Nested authentication: authType credential (local template), apiProvider (Miso delegated), or none.",
514
+ "oneOf": [
515
+ {
516
+ "type": "object",
517
+ "required": [
518
+ "authType",
519
+ "credential"
520
+ ],
521
+ "properties": {
522
+ "authType": {
523
+ "const": "credential"
524
+ },
525
+ "credential": {
526
+ "$ref": "#/$defs/credentialTemplate"
527
+ }
528
+ },
529
+ "additionalProperties": false
530
+ },
531
+ {
532
+ "type": "object",
533
+ "required": [
534
+ "authType",
535
+ "apiProvider"
536
+ ],
537
+ "properties": {
538
+ "authType": {
539
+ "const": "apiProvider"
540
+ },
541
+ "apiProvider": {
542
+ "$ref": "#/$defs/apiProviderReference"
543
+ }
544
+ },
545
+ "additionalProperties": false
546
+ },
547
+ {
548
+ "type": "object",
549
+ "required": [
550
+ "authType"
551
+ ],
552
+ "properties": {
553
+ "authType": {
554
+ "const": "none"
555
+ }
556
+ },
557
+ "additionalProperties": false
558
+ }
559
+ ]
560
+ },
561
+ "openapi": {
562
+ "type": "object",
563
+ "description": "System-level connectivity and bootstrap hints for OpenAPI-backed systems (e.g. default specUrl for discovery, documentKey alignment with shared registry entries). Not the authoritative per-datasource vendor OpenAPI contract; that is declared on the datasource via externalSpec and validated against imported material.",
564
+ "properties": {
565
+ "documentKey": {
566
+ "type": "string",
567
+ "description": "Optional registry-oriented key associated with this system's default OpenAPI document (wizard/bootstrap)."
568
+ },
569
+ "specUrl": {
570
+ "type": "string",
571
+ "description": "Optional absolute URL to a representative OpenAPI specification for onboarding or tooling (not a substitute for datasource externalSpec).",
572
+ "pattern": "^(http|https)://.*$"
573
+ },
574
+ "autoDiscoverEntities": {
575
+ "type": "boolean",
576
+ "description": "Optional wizard or tooling hint to discover entities from the system default spec. Not part of the per-datasource vendor contract (see external-datasource externalSpec)."
577
+ }
578
+ },
579
+ "additionalProperties": false
580
+ },
581
+ "mcp": {
582
+ "type": "object",
583
+ "description": "System-level MCP connectivity hints (server URL, tool prefix). Not the datasource-level MCP security or operation contract; those live on ExternalDataSource configuration.",
584
+ "properties": {
585
+ "serverUrl": {
586
+ "type": "string",
587
+ "description": "MCP server URL",
588
+ "pattern": "^(http|https)://.*$"
589
+ },
590
+ "toolPrefix": {
591
+ "type": "string",
592
+ "description": "Prefix for MCP tool names",
593
+ "pattern": "^[a-zA-Z0-9_-]+$"
594
+ }
595
+ },
596
+ "additionalProperties": false
597
+ },
598
+ "dataSources": {
599
+ "type": "array",
600
+ "description": "List of data source keys belonging to this external system. Each must match external-datasource.schema.json.",
601
+ "items": {
602
+ "type": "string",
603
+ "pattern": "^[a-z0-9-]+$"
604
+ },
605
+ "uniqueItems": true
606
+ },
607
+ "configuration": {
608
+ "type": "array",
609
+ "description": "External system configuration variables (same pattern as application-schema).",
610
+ "items": {
611
+ "type": "object",
612
+ "required": [
613
+ "name",
614
+ "value",
615
+ "location",
616
+ "required"
617
+ ],
618
+ "properties": {
619
+ "name": {
620
+ "type": "string",
621
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
622
+ },
623
+ "value": {
624
+ "type": "string",
625
+ "description": "Literal value or parameter reference ({{parameter}})"
626
+ },
627
+ "location": {
628
+ "type": "string",
629
+ "enum": [
630
+ "variable",
631
+ "keyvault"
632
+ ]
633
+ },
634
+ "required": {
635
+ "type": "boolean"
636
+ },
637
+ "portalInput": {
638
+ "type": "object",
639
+ "required": [
640
+ "field",
641
+ "label"
642
+ ],
643
+ "properties": {
644
+ "field": {
645
+ "type": "string",
646
+ "enum": [
647
+ "password",
648
+ "text",
649
+ "textarea",
650
+ "select",
651
+ "json"
652
+ ]
653
+ },
654
+ "label": {
655
+ "type": "string"
656
+ },
657
+ "placeholder": {
658
+ "type": "string"
659
+ },
660
+ "options": {
661
+ "type": "array",
662
+ "items": {
663
+ "type": "string"
664
+ }
665
+ },
666
+ "masked": {
667
+ "type": "boolean"
668
+ },
669
+ "validation": {
670
+ "type": "object",
671
+ "properties": {
672
+ "minLength": {
673
+ "type": "integer"
674
+ },
675
+ "maxLength": {
676
+ "type": "integer"
677
+ },
678
+ "pattern": {
679
+ "type": "string"
680
+ },
681
+ "required": {
682
+ "type": "boolean"
683
+ }
684
+ },
685
+ "additionalProperties": false
686
+ }
687
+ },
688
+ "additionalProperties": false
689
+ }
690
+ },
691
+ "additionalProperties": false
692
+ }
693
+ },
694
+ "tags": {
695
+ "type": "array",
696
+ "description": "Optional tags for search / filtering",
697
+ "items": {
698
+ "type": "string"
699
+ }
700
+ },
701
+ "roles": {
702
+ "type": "array",
703
+ "description": "External system roles for Azure AD group mapping",
704
+ "items": {
705
+ "type": "object",
706
+ "required": [
707
+ "name",
708
+ "value",
709
+ "description"
710
+ ],
711
+ "properties": {
712
+ "name": {
713
+ "type": "string",
714
+ "description": "Human-readable role name",
715
+ "minLength": 1,
716
+ "maxLength": 100
717
+ },
718
+ "value": {
719
+ "type": "string",
720
+ "description": "Role identifier (used in JWT and ACL)",
721
+ "pattern": "^[a-z0-9-]+$"
722
+ },
723
+ "description": {
724
+ "type": "string",
725
+ "description": "Role description",
726
+ "minLength": 1,
727
+ "maxLength": 500
728
+ },
729
+ "groups": {
730
+ "type": "array",
731
+ "description": "Azure AD groups mapped to this role",
732
+ "items": {
733
+ "type": "string",
734
+ "minLength": 1,
735
+ "maxLength": 100
736
+ }
737
+ }
738
+ },
739
+ "additionalProperties": false
740
+ }
741
+ },
742
+ "permissions": {
743
+ "type": "array",
744
+ "description": "External system permissions with role mappings for access control",
745
+ "items": {
746
+ "type": "object",
747
+ "required": [
748
+ "name",
749
+ "roles",
750
+ "description"
751
+ ],
752
+ "properties": {
753
+ "name": {
754
+ "type": "string",
755
+ "description": "Permission identifier (e.g., 'documentstore:read', 'flowise:dev:access')",
756
+ "pattern": "^[a-z0-9-:]+$",
757
+ "minLength": 1,
758
+ "maxLength": 100
759
+ },
760
+ "roles": {
761
+ "type": "array",
762
+ "description": "Roles that have this permission",
763
+ "items": {
764
+ "type": "string",
765
+ "pattern": "^[a-z0-9-]+$",
766
+ "minLength": 1,
767
+ "maxLength": 50
768
+ },
769
+ "minItems": 1
770
+ },
771
+ "description": {
772
+ "type": "string",
773
+ "description": "Permission description",
774
+ "minLength": 1,
775
+ "maxLength": 500
776
+ }
777
+ },
778
+ "additionalProperties": false
779
+ }
780
+ },
781
+ "endpoints": {
782
+ "type": "array",
783
+ "description": "API endpoint configurations for this external system. Used for dynamic endpoint registration at application startup.",
784
+ "items": {
785
+ "type": "object",
786
+ "required": [
787
+ "type",
788
+ "path"
789
+ ],
790
+ "properties": {
791
+ "type": {
792
+ "type": "string",
793
+ "description": "Endpoint type identifier (e.g., 'commands', 'events', 'notifications')",
794
+ "pattern": "^[a-z0-9-]+$"
795
+ },
796
+ "path": {
797
+ "type": "string",
798
+ "description": "URL path for this endpoint (e.g., '/commands', '/events')",
799
+ "pattern": "^/[a-z0-9/-]*$"
800
+ },
801
+ "description": {
802
+ "type": "string",
803
+ "description": "Human-readable description of the endpoint"
804
+ },
805
+ "active": {
806
+ "type": "boolean",
807
+ "description": "Whether this endpoint should be registered (defaults to true)",
808
+ "default": true
809
+ },
810
+ "router": {
811
+ "type": "string",
812
+ "description": "Custom router module path override (defaults to auto-discovery based on naming convention)"
813
+ }
814
+ },
815
+ "additionalProperties": false
816
+ }
817
+ },
818
+ "endpointsActive": {
819
+ "type": "boolean",
820
+ "description": "Master switch for all endpoints in this system. If false, no endpoints are registered regardless of individual endpoint active flags.",
821
+ "default": true
822
+ },
823
+ "generateMcpContract": {
824
+ "type": "boolean",
825
+ "description": "Whether to generate MCP contract on publish. Config only (no query parameter); default true when absent.",
826
+ "default": true
827
+ },
828
+ "generateOpenApiContract": {
829
+ "type": "boolean",
830
+ "description": "Reserved: whether to generate or expose OpenAPI contract on publish. Not yet implemented.",
831
+ "default": true
832
+ },
833
+ "triggerPathsHash": {
834
+ "type": "string",
835
+ "description": "SHA256 hash of triggerPaths payload (64-char hex). Used to detect structural changes. Optional; Dataplane computes when absent.",
836
+ "pattern": "^[a-f0-9]{64}$"
837
+ },
838
+ "identityPropagation": {
839
+ "type": "object",
840
+ "description": "Declares supported identity propagation modes and defaults for outbound operations.",
841
+ "required": [
842
+ "modes",
843
+ "default"
844
+ ],
845
+ "properties": {
846
+ "modes": {
847
+ "type": "array",
848
+ "items": {
849
+ "type": "string",
850
+ "enum": [
851
+ "impersonation",
852
+ "attribution",
853
+ "system"
854
+ ]
855
+ },
856
+ "uniqueItems": true,
857
+ "minItems": 1
858
+ },
859
+ "default": {
860
+ "type": "string",
861
+ "enum": [
862
+ "impersonation",
863
+ "attribution",
864
+ "system"
865
+ ]
866
+ },
867
+ "impersonation": {
868
+ "type": "object",
869
+ "properties": {
870
+ "tokenBroker": {
871
+ "type": "object",
872
+ "properties": {
873
+ "mintEndpoint": {
874
+ "type": "string",
875
+ "default": "/api/v1/auth/token/mint",
876
+ "description": "Controller endpoint for delegated token minting."
877
+ }
878
+ },
879
+ "additionalProperties": false
880
+ },
881
+ "scopes": {
882
+ "type": "array",
883
+ "items": {
884
+ "type": "string"
885
+ }
886
+ },
887
+ "requiredUserConsent": {
888
+ "type": "boolean",
889
+ "default": false
890
+ }
891
+ },
892
+ "additionalProperties": false
893
+ },
894
+ "attribution": {
895
+ "type": "object",
896
+ "properties": {
897
+ "actorFieldMappings": {
898
+ "type": "object",
899
+ "description": "Map target fields to actor templates (supports {{actor.*}} and {{request.*}}).",
900
+ "additionalProperties": {
901
+ "type": [
902
+ "string",
903
+ "number",
904
+ "boolean"
905
+ ]
906
+ }
907
+ },
908
+ "commentTemplate": {
909
+ "type": "string",
910
+ "description": "Optional comment template for attribution logs (supports {{actor.*}})."
911
+ },
912
+ "injectionLocations": {
913
+ "type": "array",
914
+ "items": {
915
+ "type": "string",
916
+ "enum": [
917
+ "body",
918
+ "headers",
919
+ "query",
920
+ "comment"
921
+ ]
922
+ },
923
+ "default": [
924
+ "body"
925
+ ],
926
+ "uniqueItems": true
927
+ }
928
+ },
929
+ "additionalProperties": false
930
+ },
931
+ "system": {
932
+ "type": "object",
933
+ "properties": {
934
+ "allowWrites": {
935
+ "type": "boolean",
936
+ "default": true
937
+ }
938
+ },
939
+ "additionalProperties": false
940
+ }
941
+ },
942
+ "additionalProperties": false
943
+ },
944
+ "rateLimit": {
945
+ "type": "object",
946
+ "description": "Outbound rate limit for requests from the dataplane to this external system. When set, the dataplane enforces the limit per base URL and handles HTTP 429 (wait and retry). When absent, global env defaults apply (CIP_EXECUTION_RATE_LIMIT_REQUESTS_PER_SECOND, CIP_EXECUTION_RATE_LIMIT_BURST_SIZE). Supports window-based (e.g. HubSpot 100/10s) or token-bucket style (requestsPerSecond + burstSize).",
947
+ "properties": {
948
+ "requestsPerWindow": {
949
+ "type": "integer",
950
+ "minimum": 1,
951
+ "description": "Maximum requests allowed in the time window (window-based limit). Example: 100 for HubSpot's 100 requests per 10 seconds."
952
+ },
953
+ "windowSeconds": {
954
+ "type": "integer",
955
+ "minimum": 1,
956
+ "description": "Time window in seconds. Used with requestsPerWindow. Example: 10 for HubSpot (100 requests per 10 seconds)."
957
+ },
958
+ "requestsPerSecond": {
959
+ "type": "number",
960
+ "minimum": 0.1,
961
+ "description": "Sustained request rate (token-bucket style). When used with burstSize, allows short bursts up to burstSize while refilling at this rate."
962
+ },
963
+ "burstSize": {
964
+ "type": "integer",
965
+ "minimum": 1,
966
+ "description": "Maximum burst size in tokens (token-bucket style). Used with requestsPerSecond."
967
+ }
968
+ },
969
+ "additionalProperties": false,
970
+ "oneOf": [
971
+ {
972
+ "required": [
973
+ "requestsPerWindow",
974
+ "windowSeconds"
975
+ ]
976
+ },
977
+ {
978
+ "required": [
979
+ "requestsPerSecond",
980
+ "burstSize"
981
+ ]
982
+ }
983
+ ],
984
+ "examples": [
985
+ {
986
+ "requestsPerWindow": 100,
987
+ "windowSeconds": 10
988
+ },
989
+ {
990
+ "requestsPerSecond": 10,
991
+ "burstSize": 100
992
+ }
993
+ ]
994
+ },
995
+ "performance": {
996
+ "type": "object",
997
+ "description": "Performance defaults for runtime paths in this external system.",
998
+ "properties": {
999
+ "cacheDefaults": {
1000
+ "type": "object",
1001
+ "description": "Default cache policy inherited by datasources unless overridden under sync.cache.",
1002
+ "properties": {
1003
+ "enabled": {
1004
+ "type": "boolean",
1005
+ "default": true
1006
+ },
1007
+ "ttlSeconds": {
1008
+ "type": "integer",
1009
+ "minimum": 1,
1010
+ "maximum": 604800,
1011
+ "default": 1800
1012
+ }
1013
+ },
1014
+ "additionalProperties": false
1015
+ }
1016
+ },
1017
+ "additionalProperties": false
1018
+ },
1019
+ "certification": {
1020
+ "type": "object",
1021
+ "description": "Public certification settings for external system version verification.",
1022
+ "required": [
1023
+ "enabled",
1024
+ "publicKey",
1025
+ "algorithm",
1026
+ "issuer",
1027
+ "version"
1028
+ ],
1029
+ "properties": {
1030
+ "enabled": {
1031
+ "type": "boolean",
1032
+ "description": "Enable public certification metadata for this external system."
1033
+ },
1034
+ "publicKey": {
1035
+ "type": "string",
1036
+ "minLength": 1,
1037
+ "description": "Public verification material (SPKI PEM for RS256). Private keys must never appear in config."
1038
+ },
1039
+ "publicKeyFingerprint": {
1040
+ "type": "string",
1041
+ "pattern": "^sha256:[0-9a-f]{64}$",
1042
+ "description": "SHA-256 fingerprint of the SubjectPublicKeyInfo DER (same convention as integration certificate publicKeyFingerprint); must match embedded publicKey."
1043
+ },
1044
+ "contractHash": {
1045
+ "type": "string",
1046
+ "pattern": "^sha256:[0-9a-f]{64}$",
1047
+ "description": "Optional copy of the active integration certificate contractHash (certification contract material digest) for drift checks; should match the dataplane active trusted certificate when present."
1048
+ },
1049
+ "algorithm": {
1050
+ "type": "string",
1051
+ "enum": [
1052
+ "RS256"
1053
+ ],
1054
+ "description": "Signing algorithm for integration certificate verification (RS256 only)."
1055
+ },
1056
+ "issuer": {
1057
+ "type": "string",
1058
+ "minLength": 1,
1059
+ "description": "Certificate issuer identifier."
1060
+ },
1061
+ "version": {
1062
+ "type": "string",
1063
+ "minLength": 1,
1064
+ "description": "Certification version identifier; must align with external system versioning."
1065
+ },
1066
+ "status": {
1067
+ "type": "string",
1068
+ "enum": [
1069
+ "passed",
1070
+ "not_passed",
1071
+ "pending"
1072
+ ],
1073
+ "description": "Outcome of certification evaluation for this block (aligns with DatasourceTestRun certificate.status)."
1074
+ },
1075
+ "level": {
1076
+ "type": "string",
1077
+ "enum": [
1078
+ "BRONZE",
1079
+ "SILVER",
1080
+ "GOLD",
1081
+ "PLATINUM"
1082
+ ],
1083
+ "description": "Achieved certification tier (aligns with integration certificate certificationLevel)."
1084
+ }
1085
+ },
1086
+ "additionalProperties": false
1087
+ }
1088
+ },
1089
+ "additionalProperties": false
1090
+ }