@aifabrix/builder 2.38.0 → 2.39.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 (48) hide show
  1. package/.cursor/rules/project-rules.mdc +3 -0
  2. package/integration/hubspot/hubspot-deploy.json +0 -3
  3. package/integration/hubspot/hubspot-system.json +0 -3
  4. package/lib/api/applications.api.js +8 -2
  5. package/lib/api/auth.api.js +14 -0
  6. package/lib/api/credentials.api.js +1 -1
  7. package/lib/api/datasources-core.api.js +16 -1
  8. package/lib/api/datasources-extended.api.js +18 -1
  9. package/lib/api/deployments.api.js +6 -1
  10. package/lib/api/environments.api.js +11 -0
  11. package/lib/api/external-systems.api.js +16 -1
  12. package/lib/api/pipeline.api.js +12 -4
  13. package/lib/api/service-users.api.js +41 -0
  14. package/lib/api/types/service-users.types.js +24 -0
  15. package/lib/api/wizard.api.js +19 -0
  16. package/lib/app/deploy.js +86 -21
  17. package/lib/app/rotate-secret.js +3 -1
  18. package/lib/app/run-helpers.js +7 -2
  19. package/lib/app/show-display.js +30 -11
  20. package/lib/app/show.js +34 -8
  21. package/lib/cli/index.js +2 -0
  22. package/lib/cli/setup-app.js +8 -0
  23. package/lib/cli/setup-infra.js +3 -3
  24. package/lib/cli/setup-service-user.js +52 -0
  25. package/lib/commands/app.js +2 -1
  26. package/lib/commands/service-user.js +193 -0
  27. package/lib/commands/up-common.js +74 -5
  28. package/lib/commands/up-dataplane.js +13 -7
  29. package/lib/commands/up-miso.js +17 -24
  30. package/lib/core/templates.js +0 -1
  31. package/lib/external-system/deploy.js +79 -15
  32. package/lib/generator/builders.js +0 -24
  33. package/lib/schema/application-schema.json +0 -12
  34. package/lib/schema/external-system.schema.json +0 -16
  35. package/lib/utils/app-register-config.js +10 -12
  36. package/lib/utils/deployment-errors.js +10 -0
  37. package/lib/utils/environment-checker.js +25 -6
  38. package/lib/utils/variable-transformer.js +6 -14
  39. package/package.json +1 -1
  40. package/templates/applications/dataplane/README.md +23 -7
  41. package/templates/applications/dataplane/env.template +31 -2
  42. package/templates/applications/dataplane/rbac.yaml +1 -1
  43. package/templates/applications/dataplane/variables.yaml +2 -1
  44. package/templates/applications/keycloak/env.template +6 -3
  45. package/templates/applications/keycloak/variables.yaml +1 -0
  46. package/templates/applications/miso-controller/env.template +22 -15
  47. package/templates/applications/miso-controller/rbac.yaml +15 -0
  48. package/templates/applications/miso-controller/variables.yaml +24 -23
@@ -6,12 +6,19 @@
6
6
  # APPLICATION ENVIRONMENT
7
7
  # =============================================================================
8
8
 
9
+ # HTTP port for the app
9
10
  PORT=3001
11
+ # development | staging | production
10
12
  ENVIRONMENT=development
13
+ # Enable debug mode
11
14
  DEBUG=false
15
+ # Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
12
16
  LOG_LEVEL=INFO
17
+ # Log format: json or text
13
18
  LOG_FORMAT=json
19
+ # Path for log file output
14
20
  LOG_FILE_PATH=/mnt/data/logs/app.log
21
+ # If true, run without Redis/Celery (single process)
15
22
  LOCAL_MODE=false
16
23
 
17
24
  # When API_KEY is set, a matching Bearer token bypasses OAuth2 validation
@@ -19,7 +26,10 @@ API_KEY=kv://miso-controller-api-key-secretKeyVault
19
26
 
20
27
  # API Configuration
21
28
  API_V1_STR=/api/v1
22
- VERSION=1.6.0
29
+ VERSION=1.7.0
30
+ # Base URL for the dataplane web server (used for default OAuth2 callback URL when redirectUri is omitted)
31
+ DATAPLANE_WEB_SERVER_URL=kv://dataplane-web-server-urlKeyVault
32
+ DATAPLANE_INTERNAL_URL=kv://dataplane-internal-server-urlKeyVault
23
33
 
24
34
  # CORS Configuration
25
35
  ALLOWED_ORIGINS=http://localhost:*
@@ -32,6 +42,7 @@ ENCRYPTION_KEY=kv://secrets-encryptionKeyVault
32
42
  # DATABASE CONFIGURATION
33
43
  # =============================================================================
34
44
 
45
+ # Primary app database URL
35
46
  DATABASE_URL=kv://databases-dataplane-0-urlKeyVault
36
47
  DB_0_PASSWORD=kv://databases-dataplane-0-passwordKeyVault
37
48
 
@@ -59,8 +70,11 @@ REDIS_URL=kv://redis-url
59
70
  # CACHE CONFIGURATION
60
71
  # =============================================================================
61
72
 
73
+ # Enable in-memory cache
62
74
  CACHE_ENABLED=true
75
+ # TTL in seconds for CIP execution cache
63
76
  CACHE_CIP_EXECUTION_TTL=1800
77
+ # TTL in seconds for metadata filter cache
64
78
  CACHE_METADATA_FILTER_TTL=3600
65
79
 
66
80
  # =============================================================================
@@ -72,12 +86,25 @@ MISO_CLIENTID=kv://dataplane-client-idKeyVault
72
86
  MISO_CLIENTSECRET=kv://dataplane-client-secretKeyVault
73
87
 
74
88
  # Keycloak Configuration (for OAuth2 endpoints)
89
+ # Public: used by OpenAPI OAuth2 / browser (authorizationUrl, tokenUrl).
75
90
  KEYCLOAK_SERVER_URL=kv://keycloak-server-urlKeyVault
91
+ # Internal (same role as MISO_CONTROLLER_URL): future server-side Keycloak (e.g. JWKS). Not used by dataplane today.
92
+ KEYCLOAK_INTERNAL_SERVER_URL=kv://keycloak-internal-server-urlKeyVault
76
93
  KEYCLOAK_REALM=aifabrix
77
94
 
78
- # MISO Controller URL
95
+ # =============================================================================
96
+ # MISO CONTROLLER CONFIGURATION
97
+ # =============================================================================
98
+ # Public: browser redirects and CORS for client_token; set when controller is behind a different public URL.
99
+ MISO_WEB_SERVER_URL=kv://miso-controller-web-server-urlKeyVault
100
+ # Internal: server-to-controller API calls (auth, pipeline, status, RBAC).
79
101
  MISO_CONTROLLER_URL=http://${MISO_HOST}:${MISO_PORT}
80
102
 
103
+ # Pipeline env key for controller URLs: /api/v1/pipeline/{envKey}/validate and /deploy.
104
+ # Set MISO_PIPELINE_ENV_KEY=dev when controller uses dev (e.g. MISO_CLIENTID=miso-controller-dev-dataplane).
105
+ # If unset, derived from MISO_CLIENTID (e.g. dev from miso-controller-dev-dataplane).
106
+ MISO_PIPELINE_ENV_KEY=
107
+
81
108
  # =============================================================================
82
109
  # AI/LLM CONFIGURATION
83
110
  # =============================================================================
@@ -102,12 +129,14 @@ AUTH_AUDIT_ENABLED=true
102
129
 
103
130
  # ABAC Audit Configuration
104
131
  ABAC_AUDIT_ENABLED=true
132
+ # ABAC audit detail: summary | detailed
105
133
  ABAC_AUDIT_DETAIL_LEVEL=summary
106
134
  ABAC_EXPLAIN_MODE_ENABLED=false
107
135
  ABAC_PERFORMANCE_THRESHOLD_MS=1000
108
136
 
109
137
  # RBAC Audit Configuration
110
138
  RBAC_AUDIT_ENABLED=true
139
+ # RBAC audit detail: summary | detailed | explain
111
140
  RBAC_AUDIT_DETAIL_LEVEL=summary
112
141
  RBAC_EXPLAIN_MODE_ENABLED=false
113
142
 
@@ -280,4 +280,4 @@ permissions:
280
280
 
281
281
  - name: "dataplane:rbac-simulate"
282
282
  roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-developer"]
283
- description: "Simulate RBAC policy evaluation in IDE"
283
+ description: "Simulate RBAC policy evaluation in IDE"
@@ -2,9 +2,10 @@
2
2
  app:
3
3
  key: dataplane
4
4
  displayName: "AI Fabrix Dataplane"
5
- description: "Python microservice for AI processing and bulk operations. Handles document processing, external data management, and Flowise integration with MisoClient SDK authentication."
5
+ description: "AI Fabrix Dataplane is a secure, in-tenant integration and automation layer that supplies governed, normalized, and explainable enterprise data to AI agents. Using CIP as a declarative standard, it enforces RBAC and ABAC, executes integrations, and exposes trusted data via MCP and OpenAPI."
6
6
  type: webapp
7
7
  language: python # Explicitly specify Python language
8
+ version: 1.7.0
8
9
 
9
10
  # Image Configuration
10
11
  # Set tag to match your build (e.g. aifabrix build dataplane -t v1.0.0 then tag: v1.0.0)
@@ -20,10 +20,13 @@ KC_HTTP_ENABLED=true
20
20
  # controller expects (KEYCLOAK_SERVER_URL).
21
21
  # - Users log in via http://localhost:${KEYCLOAK_PUBLIC_PORT} (browser/CLI)
22
22
  # - Server calls Keycloak at http://keycloak:8080 for token exchange and refresh
23
- # Without KC_HOSTNAME/KC_HOSTNAME_PORT, Keycloak would put issuer keycloak:8080
24
- # in tokens when the server calls internally, and validation would fail.
25
- KC_HOSTNAME=localhost
23
+ # - Controller sends Host: localhost:${KEYCLOAK_PUBLIC_PORT} so Keycloak validates issuer
24
+ # against public URL (requires KC_HOSTNAME_BACKCHANNEL_DYNAMIC=true)
25
+ # When KC_HOSTNAME_BACKCHANNEL_DYNAMIC=true, hostname must be a full URL
26
+ KC_HOSTNAME=http://localhost:${KEYCLOAK_PUBLIC_PORT}
26
27
  KC_HOSTNAME_PORT=${KEYCLOAK_PUBLIC_PORT}
28
+ # Required for Host header to work: Keycloak resolves backchannel URL from request headers
29
+ KC_HOSTNAME_BACKCHANNEL_DYNAMIC=true
27
30
 
28
31
  # =============================================================================
29
32
  # HEALTH CHECK CONFIGURATION
@@ -4,6 +4,7 @@ app:
4
4
  displayName: 'AI Fabrix Keycloak'
5
5
  description: 'Identity and Access Management'
6
6
  type: webapp
7
+ version: '26.5.2'
7
8
 
8
9
  # Image Configuration
9
10
  image:
@@ -110,12 +110,11 @@ KEYCLOAK_EVENTS_ENABLED=true
110
110
  KEYCLOAK_EVENTS_VERIFY_SIGNATURE=true
111
111
  KEYCLOAK_EVENTS_SECRET=kv://keycloak-events-secretKeyVault
112
112
 
113
- # Keycloak Startup Wait Configuration (optional)
114
- # Auto-detected in Azure (WEBSITE_SITE_NAME present) - waits 20min by default
115
- # Local environments skip the wait automatically
116
- # Override if needed:
117
- # WAIT_FOR_KEYCLOAK=true|false
118
- # KEYCLOAK_WAIT_TIMEOUT=1200
113
+ # Keycloak Startup Wait Configuration
114
+ # When true, controller waits for Keycloak before onboarding (ensures admin user creation succeeds).
115
+ # Recommended for local Docker and Azure where Keycloak and controller start together.
116
+ WAIT_FOR_KEYCLOAK=true
117
+ # KEYCLOAK_WAIT_TIMEOUT=60
119
118
 
120
119
  # =============================================================================
121
120
  # AZURE AD PROVIDER CONFIGURATION
@@ -161,8 +160,7 @@ AZURE_CLIENT_SECRET=kv://azure-client-secretKeyVault
161
160
  # DEPLOYMENT=local: Local Docker Deployment (Localhost Controller)
162
161
  # -----------------------------------------------------------------------------
163
162
  # - Does NOT touch Azure at all (completely skips all Azure operations)
164
- # - Deploys applications as Docker containers on localhost
165
- # - Uses docker-compose for container orchestration
163
+ # - Deploys applications as Docker containers on localhost (runs "docker run")
166
164
  # - Works with local PostgreSQL and Redis containers
167
165
  # - Fastest mode for local development (no Azure SDK overhead)
168
166
  # - No Azure SDK initialization (reduces startup time)
@@ -172,13 +170,22 @@ AZURE_CLIENT_SECRET=kv://azure-client-secretKeyVault
172
170
  # - Local development and testing of applications
173
171
  # - Testing deployment workflows with actual containers
174
172
  # - Development when Azure SDK is not needed
175
- # - Fastest startup time for development
176
173
  #
177
- # Requirements:
178
- # - Docker must be installed and running
179
- # - docker-compose must be available
180
- # - Docker network (infra-aifabrix-network) must exist
181
- # - Local PostgreSQL container for database (if required)
174
+ # Requirements (controller must be able to run "docker" successfully):
175
+ # - Docker must be installed and running where the controller runs
176
+ # - Docker network (e.g. infra-<env>-aifabrix-network) must exist
177
+ #
178
+ # When miso-controller runs INSIDE a Docker container (e.g. aifabrix up-miso):
179
+ # - The controller has no Docker CLI or host daemon by default, so deployments
180
+ # will fail with "docker: not found" unless you either:
181
+ # (A) Mount the host Docker socket and install Docker CLI in the controller
182
+ # image (e.g. -v /var/run/docker.sock:/var/run/docker.sock and docker
183
+ # client in the image), or
184
+ # (B) Use DEPLOYMENT=database instead and start apps from the host, e.g.:
185
+ # "aifabrix up-dataplane" (controller will only update DB; you run
186
+ # dataplane/other apps via aifabrix on the host).
187
+ # - Recommended when controller is in Docker: DEPLOYMENT=database and start
188
+ # dataplane with "aifabrix up-dataplane" (see QUICK-START.md).
182
189
  #
183
190
  # -----------------------------------------------------------------------------
184
191
  # DEPLOYMENT=database: Database-Only Mode (DB Updates Only)
@@ -236,7 +243,7 @@ AZURE_CLIENT_SECRET=kv://azure-client-secretKeyVault
236
243
  # - Want to run applications locally in Docker? → DEPLOYMENT=local
237
244
  # - Only need DB updates and RBAC sync (no containers/Azure)? → DEPLOYMENT=database
238
245
  #
239
- DEPLOYMENT=local
246
+ DEPLOYMENT=database
240
247
 
241
248
  # =============================================================================
242
249
  # SECURITY & ENCRYPTION
@@ -352,3 +352,18 @@ permissions:
352
352
  - name: 'delegation:admin:delete'
353
353
  roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
354
354
  description: 'Administrative delete access to all delegated credentials'
355
+
356
+ # Onboarding
357
+ - name: 'onboarding:read'
358
+ roles:
359
+ [
360
+ 'aifabrix-platform-admin',
361
+ 'aifabrix-infrastructure-admin',
362
+ 'aifabrix-deployment-admin',
363
+ 'aifabrix-observer'
364
+ ]
365
+ description: 'View onboarding status and configuration'
366
+
367
+ - name: 'onboarding:config'
368
+ roles: ['aifabrix-platform-admin', 'aifabrix-infrastructure-admin']
369
+ description: 'Configure onboarding (license, Entra ID, subscription config)'
@@ -2,8 +2,9 @@
2
2
  app:
3
3
  key: miso-controller
4
4
  displayName: 'Miso Controller'
5
- description: 'AI Fabrix Miso Controller - Backend API and orchestration service'
5
+ description: 'Miso is the AI Fabrix in-tenant controller and portal layer for securely operating enterprise AI apps inside a customer’s Azure tenant. It provides Entra ID SSO, RBAC, audit logs, environment/app configuration via schemas, and safe secret handling via Key Vault references—ensuring governance, traceability, and predictable UX across portal, SDK, and CLI.'
6
6
  type: webapp
7
+ version: '1.8.0'
7
8
 
8
9
  # Image Configuration
9
10
  image:
@@ -11,7 +12,7 @@ image:
11
12
  registry: devflowiseacr.azurecr.io
12
13
  registryMode: acr
13
14
 
14
- # Port Configuration
15
+ # Port Configuration (container port; host port = 3000 + developer_id*100 from ~/.aifabrix/config.yaml)
15
16
  port: 3000
16
17
 
17
18
  # Azure Requirements
@@ -64,7 +65,7 @@ configuration:
64
65
  - name: LOG_LEVEL
65
66
  portalInput:
66
67
  field: select
67
- label: "Log Level"
68
+ label: 'Log Level'
68
69
  options:
69
70
  - debug
70
71
  - info
@@ -74,26 +75,26 @@ configuration:
74
75
  - name: ENABLE_API_DOCS
75
76
  portalInput:
76
77
  field: select
77
- label: "Enable API Documentation (Swagger/ReDoc)"
78
+ label: 'Enable API Documentation (Swagger/ReDoc)'
78
79
  options:
79
- - "true"
80
- - "false"
80
+ - 'true'
81
+ - 'false'
81
82
 
82
83
  - name: FAST_STARTUP
83
84
  portalInput:
84
85
  field: select
85
- label: "Fast Startup (skip non-critical init)"
86
+ label: 'Fast Startup (skip non-critical init)'
86
87
  options:
87
- - "true"
88
- - "false"
88
+ - 'true'
89
+ - 'false'
89
90
 
90
91
  - name: LOG_TO_FILE
91
92
  portalInput:
92
93
  field: select
93
- label: "Log to File"
94
+ label: 'Log to File'
94
95
  options:
95
- - "true"
96
- - "false"
96
+ - 'true'
97
+ - 'false'
97
98
 
98
99
  # -------------------------------------------------------------------------
99
100
  # Keycloak Events (feature flag)
@@ -101,10 +102,10 @@ configuration:
101
102
  - name: KEYCLOAK_EVENTS_ENABLED
102
103
  portalInput:
103
104
  field: select
104
- label: "Keycloak Events (sync users/groups)"
105
+ label: 'Keycloak Events (sync users/groups)'
105
106
  options:
106
- - "true"
107
- - "false"
107
+ - 'true'
108
+ - 'false'
108
109
 
109
110
  # -------------------------------------------------------------------------
110
111
  # Rate Limiting (tune for environment)
@@ -112,14 +113,14 @@ configuration:
112
113
  - name: RATE_LIMIT_WINDOW_MS
113
114
  portalInput:
114
115
  field: text
115
- label: "Rate Limit Window (milliseconds)"
116
- placeholder: "900000"
116
+ label: 'Rate Limit Window (milliseconds)'
117
+ placeholder: '900000'
117
118
 
118
119
  - name: RATE_LIMIT_MAX
119
120
  portalInput:
120
121
  field: text
121
- label: "Rate Limit Max Requests per Window"
122
- placeholder: "100"
122
+ label: 'Rate Limit Max Requests per Window'
123
+ placeholder: '100'
123
124
 
124
125
  # -------------------------------------------------------------------------
125
126
  # Redis Cache TTL (seconds) – RBAC/roles caching
@@ -127,11 +128,11 @@ configuration:
127
128
  - name: REDIS_ROLES_TTL
128
129
  portalInput:
129
130
  field: text
130
- label: "Redis Roles Cache TTL (seconds)"
131
- placeholder: "900"
131
+ label: 'Redis Roles Cache TTL (seconds)'
132
+ placeholder: '900'
132
133
 
133
134
  - name: REDIS_PERMISSIONS_TTL
134
135
  portalInput:
135
136
  field: text
136
- label: "Redis Permissions Cache TTL (seconds)"
137
- placeholder: "900"
137
+ label: 'Redis Permissions Cache TTL (seconds)'
138
+ placeholder: '900'