@aifabrix/builder 2.33.0 → 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.
Files changed (50) hide show
  1. package/README.md +13 -0
  2. package/integration/hubspot/README.md +7 -7
  3. package/lib/api/index.js +6 -2
  4. package/lib/app/deploy-config.js +161 -0
  5. package/lib/app/deploy.js +28 -153
  6. package/lib/app/register.js +6 -5
  7. package/lib/app/run-helpers.js +23 -17
  8. package/lib/cli.js +31 -1
  9. package/lib/commands/logout.js +3 -4
  10. package/lib/commands/up-common.js +72 -0
  11. package/lib/commands/up-dataplane.js +109 -0
  12. package/lib/commands/up-miso.js +134 -0
  13. package/lib/core/config.js +32 -9
  14. package/lib/core/secrets-docker-env.js +88 -0
  15. package/lib/core/secrets.js +142 -115
  16. package/lib/datasource/deploy.js +31 -3
  17. package/lib/datasource/list.js +102 -15
  18. package/lib/infrastructure/helpers.js +82 -1
  19. package/lib/infrastructure/index.js +2 -0
  20. package/lib/schema/env-config.yaml +7 -0
  21. package/lib/utils/api.js +70 -2
  22. package/lib/utils/compose-generator.js +13 -13
  23. package/lib/utils/config-paths.js +13 -0
  24. package/lib/utils/device-code.js +2 -2
  25. package/lib/utils/env-endpoints.js +2 -5
  26. package/lib/utils/env-map.js +4 -5
  27. package/lib/utils/error-formatters/network-errors.js +13 -3
  28. package/lib/utils/parse-image-ref.js +27 -0
  29. package/lib/utils/paths.js +28 -4
  30. package/lib/utils/secrets-generator.js +34 -12
  31. package/lib/utils/secrets-helpers.js +1 -2
  32. package/lib/utils/token-manager-refresh.js +5 -0
  33. package/package.json +1 -1
  34. package/templates/applications/dataplane/Dockerfile +16 -0
  35. package/templates/applications/dataplane/README.md +205 -0
  36. package/templates/applications/dataplane/env.template +143 -0
  37. package/templates/applications/dataplane/rbac.yaml +283 -0
  38. package/templates/applications/dataplane/variables.yaml +143 -0
  39. package/templates/applications/keycloak/Dockerfile +1 -1
  40. package/templates/applications/keycloak/README.md +193 -0
  41. package/templates/applications/keycloak/variables.yaml +5 -6
  42. package/templates/applications/miso-controller/Dockerfile +8 -8
  43. package/templates/applications/miso-controller/README.md +369 -0
  44. package/templates/applications/miso-controller/env.template +114 -6
  45. package/templates/applications/miso-controller/rbac.yaml +74 -0
  46. package/templates/applications/miso-controller/variables.yaml +93 -5
  47. package/templates/github/ci.yaml.hbs +44 -1
  48. package/templates/github/release.yaml.hbs +44 -0
  49. package/templates/infra/compose.yaml.hbs +2 -1
  50. package/templates/applications/miso-controller/test.yaml +0 -1
@@ -0,0 +1,369 @@
1
+ # Miso Controller Builder
2
+
3
+ Build, run, and deploy Miso Controller 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:3110 --offline
23
+
24
+ # Register your application (gets you credentials automatically)
25
+ aifabrix app register miso-controller --environment miso --controller http://localhost:3100
26
+ ```
27
+
28
+ ### 3. Build & Run Locally
29
+
30
+ ```bash
31
+ # Build the Docker image
32
+ aifabrix build miso-controller
33
+
34
+ # Generate environment variables
35
+ aifabrix resolve miso-controller
36
+
37
+ # Run locally
38
+ aifabrix run miso-controller
39
+ ```
40
+
41
+ **Access your app:** <http://dev.aifabrix:3000>
42
+
43
+ **View logs:**
44
+
45
+ ```bash
46
+ docker logs aifabrix-miso-controller -f
47
+ ```
48
+
49
+ **Stop:**
50
+
51
+ ```bash
52
+ docker stop aifabrix-miso-controller
53
+ ```
54
+
55
+ ### 4. Deploy to Azure
56
+
57
+ ```bash
58
+ # Build with version tag
59
+ aifabrix build miso-controller --tag v1.0.0
60
+
61
+ # Push to registry
62
+ aifabrix push miso-controller --registry myacr.azurecr.io --tag "v1.0.0,latest"
63
+
64
+ # Deploy to miso-controller
65
+ aifabrix deploy miso-controller --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 miso-controller --environment dev
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Reference
85
+
86
+ ### Common Commands
87
+
88
+ ```bash
89
+ # Development
90
+ aifabrix build miso-controller # Build app
91
+ aifabrix run miso-controller # Run locally
92
+ aifabrix dockerfile miso-controller --force # Generate Dockerfile
93
+ aifabrix resolve miso-controller # Generate .env file
94
+
95
+ # Deployment
96
+ aifabrix json miso-controller # Preview deployment JSON
97
+ aifabrix genkey miso-controller # Generate deployment key
98
+ aifabrix push miso-controller --registry myacr.azurecr.io # Push to ACR
99
+ aifabrix deploy miso-controller --controller <url> # Deploy to Azure
100
+
101
+ # Management
102
+ aifabrix app register miso-controller --environment dev
103
+ aifabrix app list --environment dev
104
+ aifabrix app rotate-secret miso-controller --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 miso-controller --tag v1.0.0 # Custom tag
116
+ aifabrix build miso-controller --force-template # Force template regeneration
117
+ aifabrix build miso-controller --language typescript # Override language detection
118
+ ```
119
+
120
+ ### Run Options
121
+
122
+ ```bash
123
+ aifabrix run miso-controller --port 3000 # Custom port
124
+ aifabrix run miso-controller --debug # Debug output
125
+ ```
126
+
127
+ ### Push Options
128
+
129
+ ```bash
130
+ aifabrix push miso-controller --registry myacr.azurecr.io --tag v1.0.0
131
+ aifabrix push miso-controller --registry myacr.azurecr.io --tag "v1.0.0,latest,stable"
132
+ ```
133
+
134
+ ### Deploy Options
135
+
136
+ ```bash
137
+ aifabrix deploy miso-controller --controller <url> --environment dev
138
+ aifabrix deploy miso-controller --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 miso-controller --environment dev
149
+
150
+ # Explicit credentials
151
+ aifabrix login --method credentials --app miso-controller --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
+ #### Rate Limiting Configuration
162
+
163
+ For local development, you can disable or configure rate limiting to avoid HTTP 429 errors:
164
+
165
+ ```bash
166
+ # Disable rate limiting entirely (local development only)
167
+ export DISABLE_RATE_LIMIT=true
168
+
169
+ # Or configure rate limits
170
+ export RATE_LIMIT_WINDOW_MS=900000 # 15 minutes in milliseconds (default: 900000)
171
+ export RATE_LIMIT_MAX=100 # Max requests per window (default: 100)
172
+ ```
173
+
174
+ **Note:** Disabling rate limiting should only be used for local development. Production deployments should always have rate limiting enabled.
175
+
176
+ ---
177
+
178
+ ## Troubleshooting
179
+
180
+ ### Common Issues
181
+
182
+ - **"Docker not running"** → Start Docker Desktop
183
+ - **"Not logged in"** → Run `aifabrix login` first
184
+ - **"Port already in use"** → Use `--port` flag or change `build.localPort` in `variables.yaml` (default: 3000)
185
+ - **"Authentication failed"** → Run `aifabrix login` again
186
+ - **"Build fails"** → Check Docker is running and `variables.yaml` → `build.secrets` path is correct
187
+ - **"Can't connect"** → Verify infrastructure is running and PostgreSQL is accessible
188
+
189
+ #### Authentication Token Validation Issues
190
+
191
+ If you get "Authentication Failed" or "Your authentication token is invalid or has expired" when using Docker:
192
+
193
+ **Problem**: Token validation fails because the token's issuer (`iss` claim) doesn't match the Keycloak URL configured in the Docker container.
194
+
195
+ **Solution**:
196
+
197
+ 1. **Ensure `keycloak-public-server-urlKeyVault` is set correctly**:
198
+
199
+ ```bash
200
+ # Check your Keycloak port (typically 8182 for dev01)
201
+ docker ps | grep keycloak
202
+
203
+ # Set the public Keycloak URL to match your Keycloak instance
204
+ aifabrix secrets set keycloak-public-server-urlKeyVault "http://localhost:8182"
205
+ ```
206
+
207
+ 2. **Login with the same Keycloak URL that Docker uses**:
208
+
209
+ ```bash
210
+ # Login using the Keycloak URL that matches your Docker container's configuration
211
+ # The token issuer must match KEYCLOAK_PUBLIC_SERVER_URL in the container
212
+ aifabrix login --method device --environment miso --controller http://localhost:3100 --offline
213
+ ```
214
+
215
+ 3. **Verify Keycloak configuration in Docker**:
216
+
217
+ ```bash
218
+ # Check what Keycloak URL the Docker container is using
219
+ docker exec aifabrix-dev01-miso-controller env | grep KEYCLOAK_PUBLIC_SERVER_URL
220
+ ```
221
+
222
+ 4. **Restart Docker container after changing secrets**:
223
+ ```bash
224
+ # Regenerate environment variables and restart
225
+ aifabrix resolve miso-controller --force
226
+ docker restart aifabrix-dev01-miso-controller
227
+ ```
228
+
229
+ **Root Cause**: When you login with `aifabrix login --controller http://localhost:3110`, the token is issued with an issuer URL. If the Docker container (port 3100) has a different `KEYCLOAK_PUBLIC_SERVER_URL` configured, token validation will fail because the issuer doesn't match.
230
+
231
+ **IMPORTANT**: After making any changes to secrets or environment variables:
232
+
233
+ 1. **Regenerate environment variables**:
234
+
235
+ ```bash
236
+ aifabrix resolve miso-controller --force
237
+ ```
238
+
239
+ 2. **Restart the Docker container**:
240
+
241
+ ```bash
242
+ docker restart aifabrix-dev01-miso-controller
243
+ ```
244
+
245
+ 3. **Login again with the Docker container URL** (to get a token with the correct issuer):
246
+
247
+ ```bash
248
+ # Clear any existing tokens first
249
+ aifabrix logout
250
+
251
+ # Login with the Docker container URL
252
+ aifabrix login --method device --environment miso --controller http://localhost:3100 --offline
253
+ ```
254
+
255
+ 4. **Verify the token works**:
256
+ ```bash
257
+ # Try registering again
258
+ aifabrix app register miso-controller --environment miso --controller http://localhost:3100
259
+ ```
260
+
261
+ **Debugging**: If authentication still fails, check the Docker logs for detailed error messages:
262
+
263
+ ```bash
264
+ docker logs aifabrix-dev01-miso-controller --tail 50 | grep -i "auth\|token\|keycloak"
265
+ ```
266
+
267
+ ### Deployment Issues
268
+
269
+ #### Mock Mode Configuration
270
+
271
+ If deployments are not creating actual Azure resources, check the `MOCK` environment variable:
272
+
273
+ ```bash
274
+ # In env.template or .env file
275
+ MOCK=false # Must be false for production deployments
276
+ ```
277
+
278
+ **Symptoms:**
279
+
280
+ - Logs show `[AzureClientFactory] isMockMode() called - returning true`
281
+ - No actual Azure resources are created
282
+ - Deployment appears to succeed but resources don't exist
283
+
284
+ **Solution:**
285
+
286
+ - Set `MOCK=false` in your environment configuration for production deployments
287
+ - Only use `MOCK=true` for local development/testing when you don't want to create real Azure resources
288
+
289
+ #### Azure Permission Errors
290
+
291
+ If you see permission denied errors during deployment:
292
+
293
+ ```
294
+ Permission denied: Service principal does not have permission to assign roles.
295
+ Grant "User Access Administrator" or "Owner" role to the service principal
296
+ ```
297
+
298
+ **Solution:**
299
+
300
+ - Grant the service principal (identified by `AZURE_CLIENT_ID`) one of these roles:
301
+ - **User Access Administrator** (recommended for least privilege)
302
+ - **Owner** (full access, use with caution)
303
+ - Assign the role at either:
304
+ - Subscription level (for all resource groups)
305
+ - Resource group level (for specific resource groups)
306
+
307
+ **Azure CLI commands:**
308
+
309
+ ```bash
310
+ # Get service principal object ID
311
+ az ad sp show --id <AZURE_CLIENT_ID> --query id -o tsv
312
+
313
+ # Assign User Access Administrator role at subscription level
314
+ az role assignment create \
315
+ --assignee <SERVICE_PRINCIPAL_OBJECT_ID> \
316
+ --role "User Access Administrator" \
317
+ --scope /subscriptions/<SUBSCRIPTION_ID>
318
+
319
+ # Or assign at resource group level
320
+ az role assignment create \
321
+ --assignee <SERVICE_PRINCIPAL_OBJECT_ID> \
322
+ --role "User Access Administrator" \
323
+ --scope /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP_NAME>
324
+ ```
325
+
326
+ #### Secret Not Found Errors
327
+
328
+ If deployment fails with "Secret not found" errors:
329
+
330
+ ```
331
+ Failed to getSecret postgres-adminPassword: Secret not found
332
+ ```
333
+
334
+ **Possible causes:**
335
+
336
+ 1. Secret doesn't exist in Key Vault
337
+ 2. Secret name mismatch (e.g., `postgres-adminPassword` vs `postgres-admin-password`)
338
+ 3. Service principal doesn't have Key Vault access
339
+
340
+ **Solution:**
341
+
342
+ - Verify the secret exists in Key Vault with the correct name
343
+ - Ensure the service principal has "Key Vault Secrets User" role on the Key Vault
344
+ - Check secret naming convention matches infrastructure deployment (typically `{prefix}-postgres-admin-password`)
345
+
346
+ **Regenerate files:**
347
+
348
+ ```bash
349
+ aifabrix resolve miso-controller --force
350
+ aifabrix json miso-controller
351
+ aifabrix genkey miso-controller
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Prerequisites
357
+
358
+ - `@aifabrix/builder` installed globally
359
+ - Docker Desktop running
360
+ - Azure CLI installed (for push command)
361
+ - Authenticated with controller (for deploy command)
362
+ - PostgreSQL database (ensure infrastructure is running)
363
+ - Redis (ensure infrastructure is running)
364
+ - File storage configured
365
+ - Authentication/RBAC configured
366
+
367
+ ---
368
+
369
+ **Application**: miso-controller | **Port**: 3000 | **Registry**: myacr.azurecr.io | **Image**: aifabrix/miso-controller:latest
@@ -21,9 +21,14 @@ ONBOARDING_INFRASTRUCTURE_NAME=
21
21
  # Password for the initial administrator user (username: admin)
22
22
  ONBOARDING_ADMIN_PASSWORD=kv://miso-controller-admin-passwordKeyVault
23
23
 
24
- # Optional admin email for onboarding (default: admin@aifabrix.dev)
24
+ # Optional admin email for onboarding (default: admin@aifabrix.ai)
25
25
  ONBOARDING_ADMIN_EMAIL=kv://miso-controller-admin-emailKeyVault
26
26
 
27
+ # Create development environment during onboarding (default: false)
28
+ # Set to true to create both miso and dev environments during onboarding
29
+ # When false (default), only the miso environment is created
30
+ ONBOARDING_CREATE_DEV_ENV=true
31
+
27
32
  # =============================================================================
28
33
  # APPLICATION ENVIRONMENT
29
34
  # =============================================================================
@@ -95,6 +100,13 @@ KEYCLOAK_EVENTS_ENABLED=true
95
100
  KEYCLOAK_EVENTS_VERIFY_SIGNATURE=true
96
101
  KEYCLOAK_EVENTS_SECRET=kv://keycloak-events-secretKeyVault
97
102
 
103
+ # Keycloak Startup Wait Configuration (optional)
104
+ # Auto-detected in Azure (WEBSITE_SITE_NAME present) - waits 20min by default
105
+ # Local environments skip the wait automatically
106
+ # Override if needed:
107
+ # WAIT_FOR_KEYCLOAK=true|false
108
+ # KEYCLOAK_WAIT_TIMEOUT=1200
109
+
98
110
  # =============================================================================
99
111
  # AZURE AD PROVIDER CONFIGURATION
100
112
  # =============================================================================
@@ -105,9 +117,79 @@ AZURE_SERVICE_NAME=kv://azure-service-nameKeyVault
105
117
  AZURE_CLIENT_ID=kv://azure-client-idKeyVault
106
118
  AZURE_CLIENT_SECRET=kv://azure-client-secretKeyVault
107
119
 
108
- # Mock Mode (defaults to false - set to true only for testing/development)
109
- # Set MOCK=true to prevent actual Azure resource creation (for testing)
110
- MOCK=false
120
+ # =============================================================================
121
+ # DEPLOYMENT TYPE CONFIGURATION
122
+ # =============================================================================
123
+ # Controls deployment behavior for Azure, mock Azure, or local Docker deployments
124
+ #
125
+ # DEPLOYMENT types: azure, azure-mock, local
126
+ #
127
+ # -----------------------------------------------------------------------------
128
+ # DEPLOYMENT=azure: Real Azure Operations (Production Mode)
129
+ # -----------------------------------------------------------------------------
130
+ # - Creates actual Azure resources (App Services, Databases, Key Vaults, etc.)
131
+ # - Requires valid Azure credentials (AZURE_SUBSCRIPTION_ID, AZURE_TENANT_ID, etc.)
132
+ # - Requires proper Azure RBAC permissions for resource creation
133
+ # - Use for: Production deployments, staging environments, integration testing
134
+ # - WARNING: This mode will create/modify/delete real Azure resources!
135
+ #
136
+ # -----------------------------------------------------------------------------
137
+ # DEPLOYMENT=azure-mock: Mock Azure Operations (Development/Testing Mode)
138
+ # -----------------------------------------------------------------------------
139
+ # - Mocks Azure SDK operations (no real resources created)
140
+ # - Azure SDK is initialized but operations return mock responses
141
+ # - Useful for: Local development, unit testing, CI/CD pipelines
142
+ # - No Azure credentials required (but can be set for SDK initialization)
143
+ # - Faster than real Azure mode, but still initializes Azure SDK
144
+ #
145
+ # Example use cases:
146
+ # - Testing deployment workflows without creating real resources
147
+ # - Local development when you don't have Azure access
148
+ # - CI/CD pipelines that need to test deployment logic
149
+ #
150
+ # -----------------------------------------------------------------------------
151
+ # DEPLOYMENT=local: Local Docker Deployment (Localhost Controller)
152
+ # -----------------------------------------------------------------------------
153
+ # - Does NOT touch Azure at all (completely skips all Azure operations)
154
+ # - Deploys applications as Docker containers on localhost
155
+ # - Uses docker-compose for container orchestration
156
+ # - Works with local PostgreSQL and Redis containers
157
+ # - Fastest mode for local development (no Azure SDK overhead)
158
+ # - No Azure SDK initialization (reduces startup time)
159
+ # - Use for: Local development, testing, rapid iteration
160
+ #
161
+ # Example use cases:
162
+ # - Local development and testing of applications
163
+ # - Testing deployment workflows with actual containers
164
+ # - Development when Azure SDK is not needed
165
+ # - Fastest startup time for development
166
+ #
167
+ # Requirements:
168
+ # - Docker must be installed and running
169
+ # - docker-compose must be available
170
+ # - Docker network (infra-aifabrix-network) must exist
171
+ # - Local PostgreSQL container for database (if required)
172
+ #
173
+ # -----------------------------------------------------------------------------
174
+ # Configuration Notes
175
+ # -----------------------------------------------------------------------------
176
+ # Default: azure (Real Azure) if not set or invalid value
177
+ # Case insensitive: 'AZURE', 'azure', 'Azure' all work
178
+ # Whitespace is trimmed
179
+ #
180
+ # Environment-specific recommendations:
181
+ # - Production: DEPLOYMENT=azure
182
+ # - Staging: DEPLOYMENT=azure
183
+ # - Local Development: DEPLOYMENT=azure-mock or DEPLOYMENT=local
184
+ # - CI/CD Testing: DEPLOYMENT=azure-mock
185
+ # - Local Docker development: DEPLOYMENT=local
186
+ #
187
+ # When to use each mode:
188
+ # - Need to deploy to actual Azure resources? → DEPLOYMENT=azure
189
+ # - Need to test deployment logic without creating resources? → DEPLOYMENT=azure-mock
190
+ # - Want to run applications locally in Docker? → DEPLOYMENT=local
191
+ #
192
+ DEPLOYMENT=local
111
193
 
112
194
  # =============================================================================
113
195
  # SECURITY & ENCRYPTION
@@ -116,6 +198,11 @@ MOCK=false
116
198
  # Encryption Key for Database Secrets
117
199
  ENCRYPTION_KEY=kv://secrets-encryptionKeyVault
118
200
 
201
+ # Key Vault Integration (for security parameter encryption)
202
+ # Set to true to enable Azure Key Vault for storing security parameters
203
+ # When false (default), uses local AES-256-GCM encryption with ENCRYPTION_KEY
204
+ KEY_VAULT_ENABLED=false
205
+
119
206
  # JWT Configuration (for client token generation)
120
207
  JWT_SECRET=kv://miso-controller-jwt-secretKeyVault
121
208
 
@@ -134,7 +221,7 @@ MISO_CONTROLLER_URL=http://${MISO_HOST}:${MISO_PORT}
134
221
  # Used to generate correct server URLs in OpenAPI spec and Keycloak callback URLs
135
222
  # For Docker: use localhost with mapped port (e.g., localhost:3100)
136
223
  # For production: use public domain (e.g., https://miso.example.com)
137
- MISO_WEB_SERVER_URL=kv://miso-controller-web-server-url
224
+ MISO_WEB_SERVER_URL=http://localhost:${MISO_PUBLIC_PORT}
138
225
 
139
226
  # MISO Environment Configuration (miso, dev, tst, pro)
140
227
  MISO_ENVIRONMENT=miso
@@ -143,6 +230,10 @@ MISO_ENVIRONMENT=miso
143
230
  MISO_CLIENTID=kv://miso-controller-client-idKeyVault
144
231
  MISO_CLIENTSECRET=kv://miso-controller-client-secretKeyVault
145
232
 
233
+ # Allowed origins for CORS validation (comma-separated)
234
+ # Use wildcards for ports: http://localhost:*
235
+ MISO_ALLOWED_ORIGINS=http://localhost:*
236
+
146
237
  # =============================================================================
147
238
  # MORI SERVICE CONFIGURATION
148
239
  # =============================================================================
@@ -153,9 +244,26 @@ MORI_API_KEY=kv://mori-controller-api-keyKeyVault
153
244
  # =============================================================================
154
245
  # LOGGING CONFIGURATION
155
246
  # =============================================================================
247
+ # For local/dev: use a writable path (./logs). Production deployments use
248
+ # LOG_FILE_PATH=/mnt/data/logs via deploy JSON and ensure the directory exists.
156
249
 
157
250
  LOG_TO_FILE=true
158
- LOG_FILE_PATH=/mnt/data/logs
251
+ LOG_FILE_PATH=./logs
252
+
253
+ # =============================================================================
254
+ # OPENTELEMETRY CONFIGURATION
255
+ # =============================================================================
256
+
257
+ # Azure Application Insights connection string (required for OpenTelemetry)
258
+ # If not set, OpenTelemetry will be disabled gracefully
259
+ # Get this from Azure Portal: Application Insights > Overview > Connection String
260
+ APPLICATIONINSIGHTS_CONNECTION_STRING=kv://applicationinsights-connection-stringKeyVault
261
+
262
+ # OpenTelemetry service name (optional, defaults to miso-controller)
263
+ OTEL_SERVICE_NAME=miso-controller
264
+
265
+ # OpenTelemetry service version (optional, defaults to npm_package_version or 1.0.0)
266
+ OTEL_SERVICE_VERSION=
159
267
 
160
268
  # =============================================================================
161
269
  # STORAGE CONFIGURATION
@@ -278,3 +278,77 @@ permissions:
278
278
  'aifabrix-observer'
279
279
  ]
280
280
  description: 'View dashboard summaries and aggregates'
281
+
282
+ # Dimension Management
283
+ - name: 'dimensions:read'
284
+ roles:
285
+ [
286
+ 'aifabrix-platform-admin',
287
+ 'aifabrix-security-admin',
288
+ 'aifabrix-deployment-admin',
289
+ 'aifabrix-developer',
290
+ 'aifabrix-observer'
291
+ ]
292
+ description: 'View dimensions and dimension values'
293
+
294
+ - name: 'dimensions:create'
295
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin', 'aifabrix-deployment-admin']
296
+ description: 'Create dimensions and dimension values'
297
+
298
+ - name: 'dimensions:update'
299
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin', 'aifabrix-deployment-admin']
300
+ description: 'Update dimensions and dimension values'
301
+
302
+ - name: 'dimensions:delete'
303
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
304
+ description: 'Delete dimensions and dimension values'
305
+
306
+ # Token Delegation
307
+ - name: 'delegation:link'
308
+ roles:
309
+ [
310
+ 'aifabrix-platform-admin',
311
+ 'aifabrix-security-admin',
312
+ 'aifabrix-deployment-admin',
313
+ 'aifabrix-developer'
314
+ ]
315
+ description: 'Link OAuth providers for token delegation'
316
+
317
+ - name: 'delegation:mint'
318
+ roles:
319
+ [
320
+ 'aifabrix-platform-admin',
321
+ 'aifabrix-security-admin',
322
+ 'aifabrix-deployment-admin',
323
+ 'aifabrix-developer'
324
+ ]
325
+ description: 'Mint delegated OAuth tokens for external API calls'
326
+
327
+ - name: 'delegation:read'
328
+ roles:
329
+ [
330
+ 'aifabrix-platform-admin',
331
+ 'aifabrix-security-admin',
332
+ 'aifabrix-deployment-admin',
333
+ 'aifabrix-developer',
334
+ 'aifabrix-observer'
335
+ ]
336
+ description: 'View delegated OAuth credentials'
337
+
338
+ - name: 'delegation:delete'
339
+ roles:
340
+ [
341
+ 'aifabrix-platform-admin',
342
+ 'aifabrix-security-admin',
343
+ 'aifabrix-deployment-admin',
344
+ 'aifabrix-developer'
345
+ ]
346
+ description: 'Revoke delegated OAuth credentials'
347
+
348
+ - name: 'delegation:admin:read'
349
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
350
+ description: 'Administrative read access to all delegated credentials'
351
+
352
+ - name: 'delegation:admin:delete'
353
+ roles: ['aifabrix-platform-admin', 'aifabrix-security-admin']
354
+ description: 'Administrative delete access to all delegated credentials'