@aifabrix/builder 2.33.1 → 2.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/lib/app/deploy-config.js +161 -0
- package/lib/app/deploy.js +28 -153
- package/lib/app/register.js +6 -5
- package/lib/app/run-helpers.js +23 -17
- package/lib/cli.js +31 -1
- package/lib/commands/logout.js +3 -4
- package/lib/commands/up-common.js +72 -0
- package/lib/commands/up-dataplane.js +109 -0
- package/lib/commands/up-miso.js +134 -0
- package/lib/core/config.js +32 -9
- package/lib/core/secrets-docker-env.js +88 -0
- package/lib/core/secrets.js +142 -115
- package/lib/infrastructure/helpers.js +82 -1
- package/lib/infrastructure/index.js +2 -0
- package/lib/schema/env-config.yaml +7 -0
- package/lib/utils/compose-generator.js +13 -13
- package/lib/utils/config-paths.js +13 -0
- package/lib/utils/device-code.js +2 -2
- package/lib/utils/env-endpoints.js +2 -5
- package/lib/utils/env-map.js +4 -5
- package/lib/utils/parse-image-ref.js +27 -0
- package/lib/utils/paths.js +28 -4
- package/lib/utils/secrets-generator.js +34 -12
- package/lib/utils/secrets-helpers.js +1 -2
- package/lib/utils/token-manager-refresh.js +5 -0
- package/package.json +1 -1
- package/templates/applications/dataplane/Dockerfile +16 -0
- package/templates/applications/dataplane/README.md +205 -0
- package/templates/applications/dataplane/env.template +143 -0
- package/templates/applications/dataplane/rbac.yaml +283 -0
- package/templates/applications/dataplane/variables.yaml +143 -0
- package/templates/applications/keycloak/Dockerfile +1 -1
- package/templates/applications/keycloak/README.md +193 -0
- package/templates/applications/keycloak/variables.yaml +5 -6
- package/templates/applications/miso-controller/Dockerfile +8 -8
- package/templates/applications/miso-controller/README.md +369 -0
- package/templates/applications/miso-controller/env.template +114 -6
- package/templates/applications/miso-controller/rbac.yaml +74 -0
- package/templates/applications/miso-controller/variables.yaml +93 -5
- package/templates/infra/compose.yaml.hbs +2 -1
- package/templates/applications/miso-controller/test.yaml +0 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# AI Fabrix Dataplane - RBAC Configuration
|
|
2
|
+
# Roles and permissions for this application
|
|
3
|
+
#
|
|
4
|
+
# Note: Environment access is managed by MisoClient, not by per-environment roles.
|
|
5
|
+
# MisoClient validates environment access automatically based on user/application permissions.
|
|
6
|
+
|
|
7
|
+
roles:
|
|
8
|
+
- name: "AI Fabrix Platform Admin"
|
|
9
|
+
value: "aifabrix-platform-admin"
|
|
10
|
+
description: "Full platform infrastructure management and enterprise controller access"
|
|
11
|
+
groups: ["AI-Fabrix-Platform-Admins"]
|
|
12
|
+
|
|
13
|
+
- name: "AI Fabrix Security Admin"
|
|
14
|
+
value: "aifabrix-security-admin"
|
|
15
|
+
description: "Security and compliance management for enterprise controller"
|
|
16
|
+
groups: ["AI-Fabrix-Security-Admins"]
|
|
17
|
+
|
|
18
|
+
- name: "AI Fabrix Deployment Admin"
|
|
19
|
+
value: "aifabrix-deployment-admin"
|
|
20
|
+
description: "Application deployment orchestration and environment management"
|
|
21
|
+
groups: ["AI-Fabrix-Deployment-Admins"]
|
|
22
|
+
|
|
23
|
+
- name: "AI Fabrix Compliance Admin"
|
|
24
|
+
value: "aifabrix-compliance-admin"
|
|
25
|
+
description: "ISO 27001 compliance monitoring and audit management"
|
|
26
|
+
groups: ["AI-Fabrix-Compliance-Admins"]
|
|
27
|
+
|
|
28
|
+
- name: "AI Fabrix Developer"
|
|
29
|
+
value: "aifabrix-developer"
|
|
30
|
+
description: "Developer access to deploy applications via GitHub Actions"
|
|
31
|
+
groups: ["AI-Fabrix-Developers"]
|
|
32
|
+
|
|
33
|
+
- name: "AI Fabrix Observer"
|
|
34
|
+
value: "aifabrix-observer"
|
|
35
|
+
description: "Read-only access to monitoring, logs, and compliance reports"
|
|
36
|
+
groups: ["AI-Fabrix-Observers"]
|
|
37
|
+
|
|
38
|
+
permissions:
|
|
39
|
+
# Credential management
|
|
40
|
+
- name: "credential:create"
|
|
41
|
+
roles: ["aifabrix-platform-admin"]
|
|
42
|
+
description: "Create credentials"
|
|
43
|
+
|
|
44
|
+
- name: "credential:read"
|
|
45
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-compliance-admin", "aifabrix-observer"]
|
|
46
|
+
description: "Read credentials"
|
|
47
|
+
|
|
48
|
+
- name: "credential:update"
|
|
49
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin"]
|
|
50
|
+
description: "Update credentials"
|
|
51
|
+
|
|
52
|
+
- name: "credential:delete"
|
|
53
|
+
roles: ["aifabrix-platform-admin"]
|
|
54
|
+
description: "Delete credentials"
|
|
55
|
+
|
|
56
|
+
# External data source management
|
|
57
|
+
- name: "external-data-source:create"
|
|
58
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
59
|
+
description: "Create external data sources"
|
|
60
|
+
|
|
61
|
+
- name: "external-data-source:read"
|
|
62
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
63
|
+
description: "Read external data sources"
|
|
64
|
+
|
|
65
|
+
- name: "external-data-source:update"
|
|
66
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
67
|
+
description: "Update external data sources"
|
|
68
|
+
|
|
69
|
+
- name: "external-data-source:delete"
|
|
70
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
71
|
+
description: "Delete external data sources"
|
|
72
|
+
|
|
73
|
+
- name: "external-data-source:sync"
|
|
74
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
75
|
+
description: "Sync external data sources"
|
|
76
|
+
|
|
77
|
+
# External system management
|
|
78
|
+
- name: "external-system:create"
|
|
79
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
80
|
+
description: "Create external systems"
|
|
81
|
+
|
|
82
|
+
- name: "external-system:read"
|
|
83
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
84
|
+
description: "Read external systems"
|
|
85
|
+
|
|
86
|
+
- name: "external-system:update"
|
|
87
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
88
|
+
description: "Update external systems"
|
|
89
|
+
|
|
90
|
+
- name: "external-system:delete"
|
|
91
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
92
|
+
description: "Delete external systems"
|
|
93
|
+
|
|
94
|
+
# Document storage management
|
|
95
|
+
- name: "document-storage:create"
|
|
96
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
97
|
+
description: "Create document storage"
|
|
98
|
+
|
|
99
|
+
- name: "document-storage:read"
|
|
100
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
101
|
+
description: "Read document storage"
|
|
102
|
+
|
|
103
|
+
- name: "document-storage:update"
|
|
104
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
105
|
+
description: "Update document storage"
|
|
106
|
+
|
|
107
|
+
- name: "document-storage:delete"
|
|
108
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
109
|
+
description: "Delete document storage"
|
|
110
|
+
|
|
111
|
+
- name: "document-storage:process"
|
|
112
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
113
|
+
description: "Process documents"
|
|
114
|
+
|
|
115
|
+
# Integration template management
|
|
116
|
+
- name: "integration-template:create"
|
|
117
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
118
|
+
description: "Create integration templates"
|
|
119
|
+
|
|
120
|
+
- name: "integration-template:read"
|
|
121
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
122
|
+
description: "Read integration templates"
|
|
123
|
+
|
|
124
|
+
- name: "integration-template:update"
|
|
125
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
126
|
+
description: "Update integration templates"
|
|
127
|
+
|
|
128
|
+
- name: "integration-template:delete"
|
|
129
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
130
|
+
description: "Delete integration templates"
|
|
131
|
+
|
|
132
|
+
# Generic dataplane operations
|
|
133
|
+
- name: "dataplane:read"
|
|
134
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
135
|
+
description: "Read dataplane data"
|
|
136
|
+
|
|
137
|
+
- name: "dataplane:write"
|
|
138
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
139
|
+
description: "Write dataplane data"
|
|
140
|
+
|
|
141
|
+
- name: "dataplane:delete"
|
|
142
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
143
|
+
description: "Delete dataplane data"
|
|
144
|
+
|
|
145
|
+
- name: "dataplane:process"
|
|
146
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
147
|
+
description: "Process dataplane operations"
|
|
148
|
+
|
|
149
|
+
# External data source publishing
|
|
150
|
+
- name: "external-data-source:publish"
|
|
151
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
152
|
+
description: "Publish external data sources"
|
|
153
|
+
|
|
154
|
+
# External system publishing
|
|
155
|
+
- name: "external-system:publish"
|
|
156
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
157
|
+
description: "Publish external systems"
|
|
158
|
+
|
|
159
|
+
# Document record management
|
|
160
|
+
- name: "document-record:create"
|
|
161
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
162
|
+
description: "Create document records"
|
|
163
|
+
|
|
164
|
+
- name: "document-record:read"
|
|
165
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
166
|
+
description: "Read document records"
|
|
167
|
+
|
|
168
|
+
- name: "document-record:update"
|
|
169
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
170
|
+
description: "Update document records"
|
|
171
|
+
|
|
172
|
+
- name: "document-record:delete"
|
|
173
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
174
|
+
description: "Delete document records"
|
|
175
|
+
|
|
176
|
+
- name: "document-record:write"
|
|
177
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
178
|
+
description: "Write document records"
|
|
179
|
+
|
|
180
|
+
- name: "document-record:validate"
|
|
181
|
+
roles: ["aifabrix-platform-admin", "aifabrix-deployment-admin", "aifabrix-developer"]
|
|
182
|
+
description: "Validate document records"
|
|
183
|
+
|
|
184
|
+
- name: "document-record:approve"
|
|
185
|
+
roles: ["aifabrix-platform-admin", "aifabrix-compliance-admin"]
|
|
186
|
+
description: "Approve document records"
|
|
187
|
+
|
|
188
|
+
# External record management
|
|
189
|
+
- name: "external-record:create"
|
|
190
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
191
|
+
description: "Create external records"
|
|
192
|
+
|
|
193
|
+
- name: "external-record:read"
|
|
194
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
195
|
+
description: "Read external records"
|
|
196
|
+
|
|
197
|
+
- name: "external-record:update"
|
|
198
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
199
|
+
description: "Update external records"
|
|
200
|
+
|
|
201
|
+
- name: "external-record:delete"
|
|
202
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
203
|
+
description: "Delete external records"
|
|
204
|
+
|
|
205
|
+
# External data access grant management
|
|
206
|
+
- name: "external-data-access-grant:create"
|
|
207
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
208
|
+
description: "Create external data access grants"
|
|
209
|
+
|
|
210
|
+
- name: "external-data-access-grant:read"
|
|
211
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
212
|
+
description: "Read external data access grants"
|
|
213
|
+
|
|
214
|
+
- name: "external-data-access-grant:update"
|
|
215
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
216
|
+
description: "Update external data access grants"
|
|
217
|
+
|
|
218
|
+
- name: "external-data-access-grant:delete"
|
|
219
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
220
|
+
description: "Delete external data access grants"
|
|
221
|
+
|
|
222
|
+
# User and group management
|
|
223
|
+
- name: "user:read"
|
|
224
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-compliance-admin", "aifabrix-observer"]
|
|
225
|
+
description: "Read user information"
|
|
226
|
+
|
|
227
|
+
- name: "group:read"
|
|
228
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-compliance-admin", "aifabrix-observer"]
|
|
229
|
+
description: "Read group information"
|
|
230
|
+
|
|
231
|
+
# OpenAPI file management
|
|
232
|
+
- name: "openapi-file:read"
|
|
233
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
234
|
+
description: "Read OpenAPI files"
|
|
235
|
+
|
|
236
|
+
- name: "openapi-file:update"
|
|
237
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
238
|
+
description: "Update OpenAPI files"
|
|
239
|
+
|
|
240
|
+
- name: "openapi-file:delete"
|
|
241
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
242
|
+
description: "Delete OpenAPI files"
|
|
243
|
+
|
|
244
|
+
# External data source write operations
|
|
245
|
+
- name: "external-data-source:write"
|
|
246
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
247
|
+
description: "Write external data source data"
|
|
248
|
+
|
|
249
|
+
# Record relation management
|
|
250
|
+
- name: "record-relation:create"
|
|
251
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
252
|
+
description: "Create record relations"
|
|
253
|
+
|
|
254
|
+
- name: "record-relation:read"
|
|
255
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
256
|
+
description: "Read record relations"
|
|
257
|
+
|
|
258
|
+
- name: "record-relation:delete"
|
|
259
|
+
roles: ["aifabrix-platform-admin", "aifabrix-developer"]
|
|
260
|
+
description: "Delete record relations"
|
|
261
|
+
|
|
262
|
+
# Audit operations
|
|
263
|
+
- name: "audit:read"
|
|
264
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-compliance-admin", "aifabrix-observer"]
|
|
265
|
+
description: "Read audit logs and execution history"
|
|
266
|
+
|
|
267
|
+
# Search operations
|
|
268
|
+
- name: "document:search"
|
|
269
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
270
|
+
description: "Search documents"
|
|
271
|
+
|
|
272
|
+
- name: "record:search"
|
|
273
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-deployment-admin", "aifabrix-compliance-admin", "aifabrix-developer", "aifabrix-observer"]
|
|
274
|
+
description: "Search records"
|
|
275
|
+
|
|
276
|
+
# IDE simulation operations
|
|
277
|
+
- name: "dataplane:abac-simulate"
|
|
278
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-developer"]
|
|
279
|
+
description: "Simulate ABAC policy evaluation in IDE"
|
|
280
|
+
|
|
281
|
+
- name: "dataplane:rbac-simulate"
|
|
282
|
+
roles: ["aifabrix-platform-admin", "aifabrix-security-admin", "aifabrix-developer"]
|
|
283
|
+
description: "Simulate RBAC policy evaluation in IDE"
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Application Metadata
|
|
2
|
+
app:
|
|
3
|
+
key: dataplane
|
|
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."
|
|
6
|
+
type: webapp
|
|
7
|
+
language: python # Explicitly specify Python language
|
|
8
|
+
|
|
9
|
+
# Image Configuration
|
|
10
|
+
# Set tag to match your build (e.g. aifabrix build dataplane -t v1.0.0 then tag: v1.0.0)
|
|
11
|
+
# Registry is required so the controller can pull the image (avoids "docker: not found" on the controller host).
|
|
12
|
+
image:
|
|
13
|
+
name: aifabrix/dataplane
|
|
14
|
+
tag: latest
|
|
15
|
+
registry: devflowiseacr.azurecr.io
|
|
16
|
+
registryMode: acr
|
|
17
|
+
|
|
18
|
+
# Port Configuration
|
|
19
|
+
port: 3001
|
|
20
|
+
|
|
21
|
+
# Azure Requirements
|
|
22
|
+
requires:
|
|
23
|
+
database: true
|
|
24
|
+
databases:
|
|
25
|
+
- name: dataplane # Main database - configuration only
|
|
26
|
+
- name: dataplane-vector # Vector and document store: chunks, embeddings, vector indexes (pgvector)
|
|
27
|
+
- name: dataplane-logs # Logs database - execution, audit, ABAC traces
|
|
28
|
+
- name: dataplane-records # Records database - external records storage
|
|
29
|
+
redis: true
|
|
30
|
+
storage: true
|
|
31
|
+
|
|
32
|
+
# Health Check
|
|
33
|
+
healthCheck:
|
|
34
|
+
path: /health
|
|
35
|
+
interval: 30
|
|
36
|
+
probePath: /health
|
|
37
|
+
probeRequestType: GET
|
|
38
|
+
probeProtocol: Https
|
|
39
|
+
probeIntervalInSeconds: 120
|
|
40
|
+
|
|
41
|
+
# Authentication
|
|
42
|
+
authentication:
|
|
43
|
+
type: azure
|
|
44
|
+
enableSSO: true
|
|
45
|
+
requiredRoles: ["aifabrix-user"]
|
|
46
|
+
endpoints:
|
|
47
|
+
local: "https://dataplane.aifabrix.ai/auth/callback"
|
|
48
|
+
|
|
49
|
+
# Build Configuration
|
|
50
|
+
build:
|
|
51
|
+
context: ../.. # Relative to builder/dataplane/ config location (goes to app root)
|
|
52
|
+
dockerfile: builder/dataplane/Dockerfile
|
|
53
|
+
envOutputPath: ../../.env # Copy to repo root for local dev
|
|
54
|
+
localPort: 3011 # Port for local development (different from Docker port)
|
|
55
|
+
|
|
56
|
+
# =============================================================================
|
|
57
|
+
# Portal Input Configuration (Deployment Wizard)
|
|
58
|
+
# =============================================================================
|
|
59
|
+
# Variables defined in env.template with sensible defaults.
|
|
60
|
+
# portalInput allows admin to override before deployment.
|
|
61
|
+
#
|
|
62
|
+
# NOT included (auto-configured):
|
|
63
|
+
# - Database URLs, Redis → auto-generated during Azure install
|
|
64
|
+
# - MISO_*, KEYCLOAK_* → auto-generated during Azure install
|
|
65
|
+
# - AI params (OPENAI_*, AZURE_OPENAI_*) → from controller config
|
|
66
|
+
# - ENVIRONMENT → set by deployment target
|
|
67
|
+
|
|
68
|
+
configuration:
|
|
69
|
+
# -------------------------------------------------------------------------
|
|
70
|
+
# Operations & Debugging
|
|
71
|
+
# -------------------------------------------------------------------------
|
|
72
|
+
- name: LOG_LEVEL
|
|
73
|
+
portalInput:
|
|
74
|
+
field: select
|
|
75
|
+
label: "Log Level"
|
|
76
|
+
options:
|
|
77
|
+
- DEBUG
|
|
78
|
+
- INFO
|
|
79
|
+
- WARNING
|
|
80
|
+
- ERROR
|
|
81
|
+
|
|
82
|
+
- name: ABAC_AUDIT_DETAIL_LEVEL
|
|
83
|
+
portalInput:
|
|
84
|
+
field: select
|
|
85
|
+
label: "ABAC Audit Detail Level"
|
|
86
|
+
options:
|
|
87
|
+
- summary
|
|
88
|
+
- detailed
|
|
89
|
+
|
|
90
|
+
- name: RBAC_AUDIT_DETAIL_LEVEL
|
|
91
|
+
portalInput:
|
|
92
|
+
field: select
|
|
93
|
+
label: "RBAC Audit Detail Level"
|
|
94
|
+
options:
|
|
95
|
+
- summary
|
|
96
|
+
- detailed
|
|
97
|
+
- explain
|
|
98
|
+
|
|
99
|
+
# -------------------------------------------------------------------------
|
|
100
|
+
# CIP Execution - Resource Limits
|
|
101
|
+
# -------------------------------------------------------------------------
|
|
102
|
+
# Tune based on customer data volumes and external API characteristics
|
|
103
|
+
|
|
104
|
+
- name: CIP_EXECUTION_MAX_RECORDS
|
|
105
|
+
portalInput:
|
|
106
|
+
field: text
|
|
107
|
+
label: "Max Records per CIP Execution"
|
|
108
|
+
placeholder: "100000"
|
|
109
|
+
|
|
110
|
+
- name: CIP_EXECUTION_MAX_RESPONSE_SIZE_MB
|
|
111
|
+
portalInput:
|
|
112
|
+
field: text
|
|
113
|
+
label: "Max Response Size (MB)"
|
|
114
|
+
placeholder: "100.0"
|
|
115
|
+
|
|
116
|
+
- name: CIP_EXECUTION_OPERATION_TIMEOUT
|
|
117
|
+
portalInput:
|
|
118
|
+
field: text
|
|
119
|
+
label: "Operation Timeout (seconds)"
|
|
120
|
+
placeholder: "300.0"
|
|
121
|
+
|
|
122
|
+
- name: CIP_EXECUTION_HTTP_TIMEOUT
|
|
123
|
+
portalInput:
|
|
124
|
+
field: text
|
|
125
|
+
label: "HTTP Request Timeout (seconds)"
|
|
126
|
+
placeholder: "30.0"
|
|
127
|
+
|
|
128
|
+
# -------------------------------------------------------------------------
|
|
129
|
+
# CIP Execution - Rate Limiting
|
|
130
|
+
# -------------------------------------------------------------------------
|
|
131
|
+
# Tune to match external API rate limits
|
|
132
|
+
|
|
133
|
+
- name: CIP_EXECUTION_RATE_LIMIT_REQUESTS_PER_SECOND
|
|
134
|
+
portalInput:
|
|
135
|
+
field: text
|
|
136
|
+
label: "Rate Limit (requests/second)"
|
|
137
|
+
placeholder: "10.0"
|
|
138
|
+
|
|
139
|
+
- name: CIP_EXECUTION_RATE_LIMIT_BURST_SIZE
|
|
140
|
+
portalInput:
|
|
141
|
+
field: text
|
|
142
|
+
label: "Rate Limit Burst Size"
|
|
143
|
+
placeholder: "20"
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Keycloak Builder
|
|
2
|
+
|
|
3
|
+
Build, run, and deploy Keycloak using `@aifabrix/builder`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### 1. Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm install -g @aifabrix/builder
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 2. First Time Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Check your environment
|
|
19
|
+
aifabrix doctor
|
|
20
|
+
|
|
21
|
+
# Login to controller
|
|
22
|
+
aifabrix login --method device --environment dev --controller http://localhost:3100 --offline
|
|
23
|
+
|
|
24
|
+
# Register your application (gets you credentials automatically)
|
|
25
|
+
aifabrix app register keycloak --environment dev
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 3. Build & Run Locally
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Build the Docker image
|
|
32
|
+
aifabrix build keycloak
|
|
33
|
+
|
|
34
|
+
# Generate environment variables
|
|
35
|
+
aifabrix resolve keycloak
|
|
36
|
+
|
|
37
|
+
# Run locally
|
|
38
|
+
aifabrix run keycloak
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Access your app:** <http://dev.aifabrix:8082>
|
|
42
|
+
|
|
43
|
+
**View logs:**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
docker logs aifabrix-keycloak -f
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Stop:**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
docker stop aifabrix-keycloak
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 4. Deploy to Azure
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Build with version tag
|
|
59
|
+
aifabrix build keycloak --tag v1.0.0
|
|
60
|
+
|
|
61
|
+
# Push to registry
|
|
62
|
+
aifabrix push keycloak --registry myacr.azurecr.io --tag "v1.0.0,latest"
|
|
63
|
+
|
|
64
|
+
# Deploy to miso-controller
|
|
65
|
+
aifabrix deploy keycloak --controller https://controller.aifabrix.ai --environment dev
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Using miso-client
|
|
71
|
+
|
|
72
|
+
> [miso-client](https://github.com/esystemsdev/aifabrix-miso-client)
|
|
73
|
+
|
|
74
|
+
After registering your app, you automatically get credentials in your secret file. Use miso-client for login, RBAC, audit logs, etc.
|
|
75
|
+
|
|
76
|
+
**Rotate credentials if needed:**
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
aifabrix app rotate-secret keycloak --environment dev
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Reference
|
|
85
|
+
|
|
86
|
+
### Common Commands
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Development
|
|
90
|
+
aifabrix build keycloak # Build app
|
|
91
|
+
aifabrix run keycloak # Run locally
|
|
92
|
+
aifabrix dockerfile keycloak --force # Generate Dockerfile
|
|
93
|
+
aifabrix resolve keycloak # Generate .env file
|
|
94
|
+
|
|
95
|
+
# Deployment
|
|
96
|
+
aifabrix json keycloak # Preview deployment JSON
|
|
97
|
+
aifabrix genkey keycloak # Generate deployment key
|
|
98
|
+
aifabrix push keycloak --registry myacr.azurecr.io # Push to ACR
|
|
99
|
+
aifabrix deploy keycloak --controller <url> # Deploy to Azure
|
|
100
|
+
|
|
101
|
+
# Management
|
|
102
|
+
aifabrix app register keycloak --environment dev
|
|
103
|
+
aifabrix app list --environment dev
|
|
104
|
+
aifabrix app rotate-secret keycloak --environment dev
|
|
105
|
+
|
|
106
|
+
# Utilities
|
|
107
|
+
aifabrix doctor # Check environment
|
|
108
|
+
aifabrix login --method device --environment dev # Login
|
|
109
|
+
aifabrix --help # Get help
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Build Options
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
aifabrix build keycloak --tag v1.0.0 # Custom tag
|
|
116
|
+
aifabrix build keycloak --force-template # Force template regeneration
|
|
117
|
+
aifabrix build keycloak --language typescript # Override language detection
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Run Options
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
aifabrix run keycloak --port 8082 # Custom port
|
|
124
|
+
aifabrix run keycloak --debug # Debug output
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Push Options
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
aifabrix push keycloak --registry myacr.azurecr.io --tag v1.0.0
|
|
131
|
+
aifabrix push keycloak --registry myacr.azurecr.io --tag "v1.0.0,latest,stable"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Deploy Options
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
aifabrix deploy keycloak --controller <url> --environment dev
|
|
138
|
+
aifabrix deploy keycloak --controller <url> --environment dev --no-poll
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Login Methods
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Device code flow
|
|
145
|
+
aifabrix login --method device --environment dev
|
|
146
|
+
|
|
147
|
+
# Credentials (reads from secrets.local.yaml)
|
|
148
|
+
aifabrix login --method credentials --app keycloak --environment dev
|
|
149
|
+
|
|
150
|
+
# Explicit credentials
|
|
151
|
+
aifabrix login --method credentials --app keycloak --client-id $CLIENT_ID --client-secret $CLIENT_SECRET --environment dev
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Environment Variables
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
export AIFABRIX_HOME=/custom/path
|
|
158
|
+
export AIFABRIX_SECRETS=/path/to/secrets.yaml
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Troubleshooting
|
|
164
|
+
|
|
165
|
+
- **"Docker not running"** → Start Docker Desktop
|
|
166
|
+
- **"Not logged in"** → Run `aifabrix login` first
|
|
167
|
+
- **"Port already in use"** → Use `--port` flag or change `build.localPort` in `variables.yaml` (default: 8082)
|
|
168
|
+
- **"Authentication failed"** → Run `aifabrix login` again
|
|
169
|
+
- **"Build fails"** → Check Docker is running and `variables.yaml` → `build.secrets` path is correct
|
|
170
|
+
- **"Can't connect"** → Verify infrastructure is running and PostgreSQL is accessible
|
|
171
|
+
|
|
172
|
+
**Regenerate files:**
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
aifabrix resolve keycloak --force
|
|
176
|
+
aifabrix json keycloak
|
|
177
|
+
aifabrix genkey keycloak
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Prerequisites
|
|
183
|
+
|
|
184
|
+
- `@aifabrix/builder` installed globally
|
|
185
|
+
- Docker Desktop running
|
|
186
|
+
- Azure CLI installed (for push command)
|
|
187
|
+
- Authenticated with controller (for deploy command)
|
|
188
|
+
- PostgreSQL database (ensure infrastructure is running)
|
|
189
|
+
- Authentication/RBAC configured
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
**Application**: keycloak | **Port**: 8082 | **Registry**: myacr.azurecr.io | **Image**: aifabrix/keycloak:latest
|
|
@@ -38,9 +38,8 @@ authentication:
|
|
|
38
38
|
|
|
39
39
|
# Build Configuration
|
|
40
40
|
build:
|
|
41
|
-
context: ..
|
|
42
|
-
dockerfile: builder/Dockerfile
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
language: typescript # Runtime language for template selection
|
|
41
|
+
context: .. # Docker build context (relative to builder/)
|
|
42
|
+
dockerfile: builder/Dockerfile # Dockerfile name (empty = use template)
|
|
43
|
+
localPort: 8082 # Port for local development (different from Docker port)
|
|
44
|
+
containerPort: 8080 # Container port (different from local port)
|
|
45
|
+
language: typescript # Runtime language for template selection
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# AI Fabrix Miso Controller - Build from base image
|
|
2
|
-
|
|
2
|
+
# This repo has no application source; use the published image as baseline.
|
|
3
|
+
# Build: docker build -t aifabrix/miso-controller:local .
|
|
4
|
+
# Or use the image directly: docker run aifabrix/miso-controller:latest
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
ENV LOG_PATH=/mnt/data/logs
|
|
6
|
-
ENV DATA_PATH=/mnt/data/data
|
|
7
|
-
ENV BACKUP_PATH=/mnt/data/backup
|
|
8
|
-
ENV CONFIG_PATH=/mnt/data/config
|
|
6
|
+
FROM aifabrix/miso-controller:latest
|
|
9
7
|
|
|
10
|
-
# Expose port
|
|
8
|
+
# Expose port (documentation; base image may already set this)
|
|
11
9
|
EXPOSE 3000
|
|
12
10
|
|
|
13
|
-
# Health check
|
|
11
|
+
# Health check (documentation; base image may already set this)
|
|
14
12
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
15
13
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
|
|
16
14
|
|
|
15
|
+
# CMD inherited from base image; override only if needed
|
|
16
|
+
# CMD inherited: node -r tsconfig-paths/register dist/src/server.js
|