@kindgi/env-schema 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +10 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +254 -10
- package/dist/schema.js.map +1 -1
- package/dist/values.d.ts +33 -0
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +75 -0
- package/dist/values.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/schema.ts +302 -11
- package/src/values.ts +97 -0
package/dist/values.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,yCAAyC,CAAC;AAEhF,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AAEtE,uHAAuH;AACvH,eAAO,MAAM,2BAA2B,mCAAmC,CAAC;AAC5E,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAClE,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAE1E,6EAA6E;AAC7E,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,gFAAgF;AAChF,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D,+BAA+B;AAC/B,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,0EAA0E;AAC1E,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAE9E,mFAAmF;AACnF,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;A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B1E;AAED,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAE9D,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAiC/E;AAED,2FAA2F;AAC3F,eAAO,MAAM,mBAAmB,mCAAmC,CAAC;AAEpE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAuB9E"}
|
package/dist/values.js
CHANGED
|
@@ -14,6 +14,9 @@ export const PUBLIC_TOKEN_KEY_VAR = 'KINDGI_PUBLIC_TOKEN_SIGNING_KEY';
|
|
|
14
14
|
export const EXPORT_SIGNING_KEY_PATH_VAR = 'KINDGI_EXPORT_SIGNING_KEY_PATH';
|
|
15
15
|
export const EXPORT_SIGNING_KEY_VAR = 'KINDGI_EXPORT_SIGNING_KEY';
|
|
16
16
|
export const EXPORT_SIGNING_KMS_KEY_VAR = 'KINDGI_EXPORT_SIGNING_KMS_KEY';
|
|
17
|
+
/** Retired export public keys (PEM, concatenated): a file's absolute path, or its base64 value; at most one. */
|
|
18
|
+
export const EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_PATH_VAR = 'KINDGI_EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_PATH';
|
|
19
|
+
export const EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_VAR = 'KINDGI_EXPORT_SIGNING_RETIRED_PUBLIC_KEYS';
|
|
17
20
|
/** The license key the server checks at startup outside development mode. */
|
|
18
21
|
export const LICENSE_KEY_VAR = 'KINDGI_LICENSE_KEY';
|
|
19
22
|
/** The browser origins allowed on the routes a public run token opens. */
|
|
@@ -56,6 +59,8 @@ export const AUTH_TURNSTILE_SECRET_PATH_VAR = 'KINDGI_AUTH_TURNSTILE_SECRET_PATH
|
|
|
56
59
|
export const AUTH_TURNSTILE_SITE_KEY_VAR = 'KINDGI_AUTH_TURNSTILE_SITE_KEY';
|
|
57
60
|
/** Which hops in front of the runtime to trust for the client's address: a hop count, or IPs/CIDRs. */
|
|
58
61
|
export const TRUSTED_PROXIES_VAR = 'KINDGI_TRUSTED_PROXIES';
|
|
62
|
+
/** Whether a tenant's admins may change its identity providers (`on` / `off`). */
|
|
63
|
+
export const AUTH_TENANT_PROVIDERS_VAR = 'KINDGI_AUTH_TENANT_PROVIDERS';
|
|
59
64
|
/** A browser session's absolute lifetime, in milliseconds. */
|
|
60
65
|
export const SESSION_TTL_MS_VAR = 'KINDGI_SESSION_TTL_MS';
|
|
61
66
|
/** How long a browser session may sit idle, in milliseconds. */
|
|
@@ -128,6 +133,76 @@ export function parsePublicUrl(raw) {
|
|
|
128
133
|
}
|
|
129
134
|
return url.href.replace(/\/+$/, '');
|
|
130
135
|
}
|
|
136
|
+
/** The Azure Key Vault key that wraps DEKs (postgres backend, KMS `azure`). */
|
|
137
|
+
export const AZURE_KEY_ID_VAR = 'KINDGI_SECRETS_AZURE_KEY_ID';
|
|
138
|
+
/**
|
|
139
|
+
* `KINDGI_SECRETS_AZURE_KEY_ID`: a Key Vault key's https URL **without a
|
|
140
|
+
* version** (`https://<vault>.vault.azure.net/keys/<name>`, any Azure
|
|
141
|
+
* cloud's vault or Managed HSM host). New DEKs are wrapped with the
|
|
142
|
+
* key's current version, and each records the version it used, so a URL
|
|
143
|
+
* pinned to one version is refused: it would outlive the key's rotation.
|
|
144
|
+
* Unset or blank: `undefined`.
|
|
145
|
+
*/
|
|
146
|
+
export function parseAzureKeyId(raw) {
|
|
147
|
+
if (raw === undefined || raw.trim() === '')
|
|
148
|
+
return undefined;
|
|
149
|
+
const value = raw.trim();
|
|
150
|
+
let url;
|
|
151
|
+
try {
|
|
152
|
+
url = new URL(value);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
url = undefined;
|
|
156
|
+
}
|
|
157
|
+
const path = url?.pathname.match(/^\/keys\/([^/]+)(?:\/([^/]*))?\/?$/);
|
|
158
|
+
if (url === undefined ||
|
|
159
|
+
path === null ||
|
|
160
|
+
path === undefined ||
|
|
161
|
+
url.protocol !== 'https:' ||
|
|
162
|
+
url.username !== '' ||
|
|
163
|
+
url.password !== '' ||
|
|
164
|
+
url.search !== '' ||
|
|
165
|
+
url.hash !== '' ||
|
|
166
|
+
!/^[0-9A-Za-z-]{1,127}$/.test(path[1] ?? '')) {
|
|
167
|
+
throw new Error(`${AZURE_KEY_ID_VAR} must be a Key Vault key's URL without a version, like https://my-vault.vault.azure.net/keys/kindgi-secrets. Got: ${value}.`);
|
|
168
|
+
}
|
|
169
|
+
const version = path[2];
|
|
170
|
+
if (version !== undefined && version !== '') {
|
|
171
|
+
throw new Error(`${AZURE_KEY_ID_VAR} names one version of the key (${version}). Give the key without it, ${url.origin}/keys/${path[1]}: new secrets are wrapped with the key's current version, so a pinned version would outlive the key's rotation.`);
|
|
172
|
+
}
|
|
173
|
+
const keyName = path[1];
|
|
174
|
+
return { keyUrl: `${url.origin}/keys/${keyName}`, vaultUrl: url.origin, keyName };
|
|
175
|
+
}
|
|
176
|
+
/** The Azure Key Vault the `secret-manager` backend keeps secrets in (manager `azure`). */
|
|
177
|
+
export const AZURE_VAULT_URL_VAR = 'KINDGI_SECRETS_AZURE_VAULT_URL';
|
|
178
|
+
/**
|
|
179
|
+
* `KINDGI_SECRETS_AZURE_VAULT_URL`: a vault's https origin
|
|
180
|
+
* (`https://<vault>.vault.azure.net`, any Azure cloud's vault host), with
|
|
181
|
+
* nothing after it but an optional `/`. Returns the origin. Unset or
|
|
182
|
+
* blank: `undefined`.
|
|
183
|
+
*/
|
|
184
|
+
export function parseAzureVaultUrl(raw) {
|
|
185
|
+
if (raw === undefined || raw.trim() === '')
|
|
186
|
+
return undefined;
|
|
187
|
+
const value = raw.trim();
|
|
188
|
+
let url;
|
|
189
|
+
try {
|
|
190
|
+
url = new URL(value);
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
url = undefined;
|
|
194
|
+
}
|
|
195
|
+
if (url === undefined ||
|
|
196
|
+
url.protocol !== 'https:' ||
|
|
197
|
+
(url.pathname !== '/' && url.pathname !== '') ||
|
|
198
|
+
url.username !== '' ||
|
|
199
|
+
url.password !== '' ||
|
|
200
|
+
url.search !== '' ||
|
|
201
|
+
url.hash !== '') {
|
|
202
|
+
throw new Error(`${AZURE_VAULT_URL_VAR} must be a Key Vault's URL with nothing after the host, like https://my-kindgi-secrets.vault.azure.net. Got: ${value}.`);
|
|
203
|
+
}
|
|
204
|
+
return url.origin;
|
|
205
|
+
}
|
|
131
206
|
function isExactOrigin(value) {
|
|
132
207
|
let url;
|
|
133
208
|
try {
|
package/dist/values.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.js","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC;;;;;GAKG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,yBAAyB,GAAG,sCAAsC,CAAC;AAEhF,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAEtE,uHAAuH;AACvH,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAC5E,MAAM,CAAC,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAClE,MAAM,CAAC,MAAM,0BAA0B,GAAG,+BAA+B,CAAC;AAE1E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAEpD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAEtD,gFA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,QAAQ,CAAC,GAAG,CAAC,CACrB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindgi/env-schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Machine-readable registry of the Kindgi runtime's operator-facing env vars. Single source of truth for boot-time validation (validateEnvForTarget), .env.example scaffolding (renderEnvExample), and tools or coding agents introspecting deployment config. Adding a new env var means adding one entry here — no drift between validation, docs, and .env.example generation.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
package/src/index.ts
CHANGED
|
@@ -27,6 +27,10 @@ export {
|
|
|
27
27
|
AUTH_PRIVATE_IDP_ORIGINS_VAR,
|
|
28
28
|
AUTH_SECRET_PATH_VAR,
|
|
29
29
|
AUTH_SECRET_VAR,
|
|
30
|
+
AUTH_TENANT_PROVIDERS_VAR,
|
|
31
|
+
AZURE_KEY_ID_VAR,
|
|
32
|
+
AZURE_VAULT_URL_VAR,
|
|
33
|
+
type AzureKeyId,
|
|
30
34
|
AUTH_TURNSTILE_SECRET_PATH_VAR,
|
|
31
35
|
AUTH_TURNSTILE_SECRET_VAR,
|
|
32
36
|
AUTH_TURNSTILE_SITE_KEY_VAR,
|
|
@@ -35,6 +39,8 @@ export {
|
|
|
35
39
|
EXPORT_SIGNING_KEY_PATH_VAR,
|
|
36
40
|
EXPORT_SIGNING_KEY_VAR,
|
|
37
41
|
EXPORT_SIGNING_KMS_KEY_VAR,
|
|
42
|
+
EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_PATH_VAR,
|
|
43
|
+
EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_VAR,
|
|
38
44
|
PUBLIC_URL_VAR,
|
|
39
45
|
SESSION_IDLE_TIMEOUT_MS_VAR,
|
|
40
46
|
CONSOLE_TOKEN_SIGN_IN_VAR,
|
|
@@ -44,6 +50,8 @@ export {
|
|
|
44
50
|
PACK_SERVICE_TOKEN_VAR,
|
|
45
51
|
PUBLIC_TOKEN_KEY_PATH_VAR,
|
|
46
52
|
PUBLIC_TOKEN_KEY_VAR,
|
|
53
|
+
parseAzureKeyId,
|
|
54
|
+
parseAzureVaultUrl,
|
|
47
55
|
parseCorsOrigins,
|
|
48
56
|
parsePublicUrl,
|
|
49
57
|
parsePackServiceToken,
|
package/src/schema.ts
CHANGED
|
@@ -45,7 +45,12 @@ export interface EnvTarget {
|
|
|
45
45
|
*/
|
|
46
46
|
readonly component?: 'server' | 'pack-service';
|
|
47
47
|
readonly secretsBackend?: 'none' | 'postgres' | 'secret-manager' | 'dotenv';
|
|
48
|
-
readonly secretsBackendKms?: 'gcp' | 'aws' | 'libsodium' | 'vault';
|
|
48
|
+
readonly secretsBackendKms?: 'gcp' | 'azure' | 'aws' | 'libsodium' | 'vault';
|
|
49
|
+
/**
|
|
50
|
+
* The secret manager the `secret-manager` backend keeps secrets in
|
|
51
|
+
* (`KINDGI_SECRETS_MANAGER`). Absent: not chosen yet.
|
|
52
|
+
*/
|
|
53
|
+
readonly secretsManager?: 'azure' | 'gcp' | 'aws' | 'vault';
|
|
49
54
|
/**
|
|
50
55
|
* How the server reaches the pack service: `http` when
|
|
51
56
|
* `KINDGI_PACK_SERVICE_URL` is set. Absent: the server has no pack
|
|
@@ -105,7 +110,11 @@ export const ENV_GROUPS = {
|
|
|
105
110
|
core: 'Core server config',
|
|
106
111
|
logging: 'Logging',
|
|
107
112
|
secrets: 'Secrets backend selection',
|
|
108
|
-
gcp: 'GCP vendor config (postgres + gcp KMS)',
|
|
113
|
+
gcp: 'GCP vendor config (postgres + gcp KMS; secret-manager + gcp)',
|
|
114
|
+
aws: "AWS vendor config (the server's AWS identity; secret-manager + aws)",
|
|
115
|
+
azure:
|
|
116
|
+
"Azure vendor config (the server's managed identity; postgres + azure KMS; secret-manager + azure)",
|
|
117
|
+
vault: 'HashiCorp Vault / OpenBao (secret-manager + vault)',
|
|
109
118
|
'local-key': 'Local key (postgres + libsodium: a key this runtime holds, single-node)',
|
|
110
119
|
'pack-service': 'Pack service (runs the pack code: tools and guardrail checks)',
|
|
111
120
|
'image-registry': "Image registry (where deployments' images are read from)",
|
|
@@ -128,9 +137,20 @@ const appliesToDotenvBackend = (t: EnvTarget): boolean =>
|
|
|
128
137
|
const appliesToPostgresGcp = (t: EnvTarget): boolean =>
|
|
129
138
|
appliesToPostgresBackend(t) && t.secretsBackendKms === 'gcp';
|
|
130
139
|
|
|
140
|
+
const appliesToPostgresAzure = (t: EnvTarget): boolean =>
|
|
141
|
+
appliesToPostgresBackend(t) && t.secretsBackendKms === 'azure';
|
|
142
|
+
|
|
131
143
|
const appliesToPostgresLocalKey = (t: EnvTarget): boolean =>
|
|
132
144
|
appliesToPostgresBackend(t) && t.secretsBackendKms === 'libsodium';
|
|
133
145
|
|
|
146
|
+
const appliesToSecretManagerBackend = (t: EnvTarget): boolean =>
|
|
147
|
+
appliesToServer(t) && t.secretsBackend === 'secret-manager';
|
|
148
|
+
|
|
149
|
+
const appliesToSecretManager =
|
|
150
|
+
(manager: NonNullable<EnvTarget['secretsManager']>) =>
|
|
151
|
+
(t: EnvTarget): boolean =>
|
|
152
|
+
appliesToSecretManagerBackend(t) && t.secretsManager === manager;
|
|
153
|
+
|
|
134
154
|
const appliesToPackService = (t: EnvTarget): boolean => t.component === 'pack-service';
|
|
135
155
|
|
|
136
156
|
/** The server, calling a pack service over HTTP. */
|
|
@@ -325,6 +345,15 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
325
345
|
appliesTo: appliesToServer,
|
|
326
346
|
group: 'core',
|
|
327
347
|
},
|
|
348
|
+
{
|
|
349
|
+
name: 'KINDGI_AUTH_TENANT_PROVIDERS',
|
|
350
|
+
description:
|
|
351
|
+
"Whether a tenant's admins may add, change and remove its identity providers: `on` or `off`. Default `on`. `off` when the operator manages sign-in: then only the deployment's own token (`KINDGI_API_TOKEN`) can, and a tenant's change answers `403 identity-providers-operator-managed`. The providers already there keep signing people in either way, and anyone may still read them.",
|
|
352
|
+
example: 'off',
|
|
353
|
+
required: false,
|
|
354
|
+
appliesTo: appliesToServer,
|
|
355
|
+
group: 'core',
|
|
356
|
+
},
|
|
328
357
|
{
|
|
329
358
|
name: 'KINDGI_AUTH_GOOGLE_CLIENT_ID',
|
|
330
359
|
description:
|
|
@@ -424,6 +453,15 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
424
453
|
appliesTo: appliesToServer,
|
|
425
454
|
group: 'core',
|
|
426
455
|
},
|
|
456
|
+
{
|
|
457
|
+
name: 'KINDGI_REVIEWER_EMAIL',
|
|
458
|
+
description:
|
|
459
|
+
"`on` emails reviewers when an approval waits for them: the people the approvals inbox would show it to (its assigned reviewer, else every active reviewer of its required role or above), and only those who may read its project. The first email goes at once; anything more for the same person within five minutes comes as one digest. Each email has the approval's title, project, required role and a link, never what it's about (that stays behind sign-in). Sent through the emailed sign-in link's server, so it needs `KINDGI_AUTH_EMAIL_SMTP_URL` (or `_PATH`) and `KINDGI_AUTH_EMAIL_FROM`; turned on without them, the runtime refuses to start. Off by default: emailing people is the operator's choice.",
|
|
460
|
+
example: 'on',
|
|
461
|
+
required: false,
|
|
462
|
+
appliesTo: appliesToServer,
|
|
463
|
+
group: 'core',
|
|
464
|
+
},
|
|
427
465
|
{
|
|
428
466
|
name: 'KINDGI_AUTH_EMAIL_FROM',
|
|
429
467
|
description:
|
|
@@ -526,13 +564,31 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
526
564
|
{
|
|
527
565
|
name: 'KINDGI_EXPORT_SIGNING_KMS_KEY',
|
|
528
566
|
description:
|
|
529
|
-
"Optional: a
|
|
567
|
+
"Optional: a KMS key version that signs exports, so the private key never leaves the KMS. Its shape picks the KMS. **Cloud KMS:** `projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>`, an `EC_SIGN_ED25519` key (it signs `ed25519`) or an `EC_SIGN_P256_SHA256` key (`ecdsa-p256-sha256`); the server's service account needs `roles/cloudkms.signerVerifier` on it (and `roles/cloudkms.publicKeyViewer`, to read its public key at boot). **Azure Key Vault:** `https://<vault>.vault.azure.net/keys/<name>/<version>`, with its version, an EC P-256 key allowed to sign (`ecdsa-p256-sha256`: Key Vault has no Ed25519); the server's identity needs Key Vault Crypto User on it. Any other value stops the server at boot, naming both shapes.",
|
|
530
568
|
example:
|
|
531
569
|
'projects/acme/locations/global/keyRings/kindgi/cryptoKeys/exports/cryptoKeyVersions/1',
|
|
532
570
|
required: false,
|
|
533
571
|
appliesTo: appliesToServer,
|
|
534
572
|
group: 'core',
|
|
535
573
|
},
|
|
574
|
+
{
|
|
575
|
+
name: 'KINDGI_EXPORT_SIGNING_RETIRED_PUBLIC_KEYS_PATH',
|
|
576
|
+
description:
|
|
577
|
+
'Absolute path to a file of one or more PEM public keys (`-----BEGIN PUBLIC KEY-----`, concatenated): export keys this deployment signed with before a rotation. `GET /v1/export-signing-keys` lists them after the active key, with `active: false`, so `kindgi exports verify --from-runtime` still trusts what they signed; they never sign. Ed25519 or EC P-256 keys, public halves only: a private key in the file stops the server at boot. Works with any signing key, file or KMS. Set this or `KINDGI_EXPORT_SIGNING_RETIRED_PUBLIC_KEYS`, not both.',
|
|
578
|
+
example: '/etc/kindgi/export-signing-retired.pem',
|
|
579
|
+
required: false,
|
|
580
|
+
appliesTo: appliesToServer,
|
|
581
|
+
group: 'core',
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
name: 'KINDGI_EXPORT_SIGNING_RETIRED_PUBLIC_KEYS',
|
|
585
|
+
description:
|
|
586
|
+
"The same file's content, base64 (`base64 < retired.pem`): for platforms that give settings as environment variables, such as Cloud Run.",
|
|
587
|
+
example: '',
|
|
588
|
+
required: false,
|
|
589
|
+
appliesTo: appliesToServer,
|
|
590
|
+
group: 'core',
|
|
591
|
+
},
|
|
536
592
|
{
|
|
537
593
|
name: 'KINDGI_CORS_ORIGINS',
|
|
538
594
|
description:
|
|
@@ -560,6 +616,15 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
560
616
|
appliesTo: appliesToServer,
|
|
561
617
|
group: 'core',
|
|
562
618
|
},
|
|
619
|
+
{
|
|
620
|
+
name: 'KINDGI_RUN_ENDED_CHECK_MS',
|
|
621
|
+
description:
|
|
622
|
+
'How often each server stops the runs it executes that were ended from outside (cancelled, on this server or another), in milliseconds. A run stops starting steps at its next write either way; this also stops a step that writes nothing for a while, such as a long model call, within this time of a cancel. Default 5000; at least 1000, or the server refuses to start.',
|
|
623
|
+
example: '5000',
|
|
624
|
+
required: false,
|
|
625
|
+
appliesTo: appliesToServer,
|
|
626
|
+
group: 'core',
|
|
627
|
+
},
|
|
563
628
|
{
|
|
564
629
|
name: 'KINDGI_MEMORY_EMBEDDINGS',
|
|
565
630
|
description:
|
|
@@ -632,6 +697,42 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
632
697
|
appliesTo: appliesToServer,
|
|
633
698
|
group: 'core',
|
|
634
699
|
},
|
|
700
|
+
{
|
|
701
|
+
name: 'KINDGI_PAGINATION_KEY_PATH',
|
|
702
|
+
description:
|
|
703
|
+
"Absolute path to the 32-byte key (mode 0600) every list's page cursors are sealed with, so a cursor never shows the row it points after; the same on every instance. Unset (and no `KINDGI_PAGINATION_KEY`): a key made at boot and kept nowhere, so a cursor handed out before a restart answers 400 after it, and more than one instance behind one address needs the key set. Rotate it yearly (each cursor is sealed with a random nonce): the new key here, the old one in `KINDGI_PAGINATION_PREVIOUS_KEY_PATH` for at least a day. Its own key: never the erasure ledger's or the secrets AAD key. This or `KINDGI_PAGINATION_KEY`, not both.",
|
|
704
|
+
example: '/etc/kindgi/pagination.key',
|
|
705
|
+
required: false,
|
|
706
|
+
appliesTo: appliesToServer,
|
|
707
|
+
group: 'core',
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
name: 'KINDGI_PAGINATION_KEY',
|
|
711
|
+
description:
|
|
712
|
+
'The page-cursor key itself, base64: for platforms that give secrets as environment variables (Cloud Run with Secret Manager). See `KINDGI_PAGINATION_KEY_PATH`; this or that, not both.',
|
|
713
|
+
example: '',
|
|
714
|
+
required: false,
|
|
715
|
+
appliesTo: appliesToServer,
|
|
716
|
+
group: 'core',
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: 'KINDGI_PAGINATION_PREVIOUS_KEY_PATH',
|
|
720
|
+
description:
|
|
721
|
+
"While the page-cursor key rotates, the key before it (a 32-byte file, mode 0600): it still opens the cursors it sealed. Keep it at least a day (a cursor's life) after rotating, then remove it. Needs `KINDGI_PAGINATION_KEY(_PATH)`, and must differ from it. This or `KINDGI_PAGINATION_PREVIOUS_KEY`, not both.",
|
|
722
|
+
example: '/etc/kindgi/pagination.previous.key',
|
|
723
|
+
required: false,
|
|
724
|
+
appliesTo: appliesToServer,
|
|
725
|
+
group: 'core',
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
name: 'KINDGI_PAGINATION_PREVIOUS_KEY',
|
|
729
|
+
description:
|
|
730
|
+
'The previous page-cursor key itself, base64. See `KINDGI_PAGINATION_PREVIOUS_KEY_PATH`; this or that, not both.',
|
|
731
|
+
example: '',
|
|
732
|
+
required: false,
|
|
733
|
+
appliesTo: appliesToServer,
|
|
734
|
+
group: 'core',
|
|
735
|
+
},
|
|
635
736
|
{
|
|
636
737
|
name: 'KINDGI_COMPLIANCE_CLASSIFIER',
|
|
637
738
|
description:
|
|
@@ -694,13 +795,23 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
694
795
|
{
|
|
695
796
|
name: 'KINDGI_SECRETS_BACKEND',
|
|
696
797
|
description:
|
|
697
|
-
'Where secret bytes live. `none` (default; /v1/secrets/* unmounted) | `postgres` (envelope-encrypted, needs KMS) | `dotenv` (`.env` files in a directory; development only, needs `KINDGI_DEV=true`) | `secret-manager` (
|
|
798
|
+
'Where secret bytes live. `none` (default; /v1/secrets/* unmounted) | `postgres` (envelope-encrypted, needs KMS) | `dotenv` (`.env` files in a directory; development only, needs `KINDGI_DEV=true`) | `secret-manager` (your own secret manager holds the bytes; pick it with `KINDGI_SECRETS_MANAGER`).',
|
|
698
799
|
example: 'postgres',
|
|
699
800
|
required: false,
|
|
700
801
|
appliesTo: appliesToServer,
|
|
701
802
|
group: 'secrets',
|
|
702
803
|
allowedValues: ['none', 'postgres', 'dotenv', 'secret-manager'],
|
|
703
804
|
},
|
|
805
|
+
{
|
|
806
|
+
name: 'KINDGI_SECRETS_MANAGER',
|
|
807
|
+
description:
|
|
808
|
+
"Which secret manager the `secret-manager` backend keeps secrets in: `azure` (Azure Key Vault, see `KINDGI_SECRETS_AZURE_VAULT_URL`), `gcp` (Google Secret Manager, in the project `KINDGI_SECRETS_GCP_PROJECT_ID` names; the server's service account needs roles/secretmanager.admin there), `vault` (HashiCorp Vault or OpenBao, see `KINDGI_SECRETS_VAULT_ADDR`) or `aws` (AWS Secrets Manager, used from runtime 0.1.7: in the region `KINDGI_SECRETS_AWS_REGION` names, signed in as the server's AWS identity, `KINDGI_AWS_IDENTITY`; runtime 0.1.6 refuses it at startup). Kindgi reads and writes them with the server's own identity and keeps only their names and version numbers in its database.",
|
|
809
|
+
example: 'azure',
|
|
810
|
+
required: true,
|
|
811
|
+
appliesTo: appliesToSecretManagerBackend,
|
|
812
|
+
group: 'secrets',
|
|
813
|
+
allowedValues: ['azure', 'gcp', 'aws', 'vault'],
|
|
814
|
+
},
|
|
704
815
|
{
|
|
705
816
|
name: 'KINDGI_SECRETS_DOTENV_DIR',
|
|
706
817
|
description:
|
|
@@ -722,12 +833,12 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
722
833
|
{
|
|
723
834
|
name: 'KINDGI_SECRETS_BACKEND_KMS',
|
|
724
835
|
description:
|
|
725
|
-
'Which KMS wraps DEKs (postgres backend only): `gcp` (Google Cloud KMS), or `libsodium`, a key this runtime holds (see `KINDGI_SECRETS_LOCAL_KEY_PATH`). Reserved: `aws`.',
|
|
836
|
+
'Which KMS wraps DEKs (postgres backend only): `gcp` (Google Cloud KMS), `azure` (an Azure Key Vault key, see `KINDGI_SECRETS_AZURE_KEY_ID`), or `libsodium`, a key this runtime holds (see `KINDGI_SECRETS_LOCAL_KEY_PATH`). Reserved: `aws`.',
|
|
726
837
|
example: 'gcp',
|
|
727
838
|
required: true,
|
|
728
839
|
appliesTo: appliesToPostgresBackend,
|
|
729
840
|
group: 'secrets',
|
|
730
|
-
allowedValues: ['gcp', 'aws', 'libsodium'],
|
|
841
|
+
allowedValues: ['gcp', 'azure', 'aws', 'libsodium'],
|
|
731
842
|
},
|
|
732
843
|
{
|
|
733
844
|
name: 'KINDGI_SECRETS_AAD_KEY_PATH',
|
|
@@ -741,7 +852,7 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
741
852
|
{
|
|
742
853
|
name: 'KINDGI_SECRETS_AAD_KEY',
|
|
743
854
|
description:
|
|
744
|
-
"The 32-byte AAD/HMAC key itself, base64: for platforms that give secrets as environment variables (Cloud Run with Secret Manager), where a key file's mode can't be 0600. The postgres backend needs this or `KINDGI_SECRETS_AAD_KEY_PATH`, not both.",
|
|
855
|
+
"The 32-byte AAD/HMAC key itself, base64: for platforms that give secrets as environment variables (Cloud Run with Secret Manager, Container Apps with Key Vault), where a key file's mode can't be 0600. Reference one fixed version of it, never the latest: a new version would make every stored secret unreadable. The postgres backend needs this or `KINDGI_SECRETS_AAD_KEY_PATH`, not both.",
|
|
745
856
|
example: '',
|
|
746
857
|
required: false,
|
|
747
858
|
appliesTo: appliesToPostgresBackend,
|
|
@@ -749,10 +860,11 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
749
860
|
},
|
|
750
861
|
{
|
|
751
862
|
name: 'KINDGI_SECRETS_GCP_PROJECT_ID',
|
|
752
|
-
description:
|
|
863
|
+
description:
|
|
864
|
+
"GCP project id owning the KMS keyring + key (postgres backend, KMS `gcp`), or holding the secrets in its Secret Manager (`secret-manager` backend, manager `gcp`; the server's service account needs to create, add versions to and disable them, e.g. Secret Manager Admin, in a project used for Kindgi's secrets alone).",
|
|
753
865
|
example: 'my-proj',
|
|
754
866
|
required: true,
|
|
755
|
-
appliesTo: appliesToPostgresGcp,
|
|
867
|
+
appliesTo: (t) => appliesToPostgresGcp(t) || appliesToSecretManager('gcp')(t),
|
|
756
868
|
group: 'gcp',
|
|
757
869
|
},
|
|
758
870
|
{
|
|
@@ -779,6 +891,166 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
779
891
|
appliesTo: appliesToPostgresGcp,
|
|
780
892
|
group: 'gcp',
|
|
781
893
|
},
|
|
894
|
+
{
|
|
895
|
+
name: 'KINDGI_AWS_IDENTITY',
|
|
896
|
+
description:
|
|
897
|
+
"Used from runtime 0.1.7; runtime 0.1.6 ignores it. Where the server's AWS credentials come from, for the settings that sign in as it (such as the Bedrock adapter's `auth: aws-identity`). `container`: the task's or pod's role from the container credentials endpoint (ECS and Fargate, and EKS Pod Identity). `instance`: the EC2 instance profile, IMDSv2 only (in a container on EC2, raise the IMDS hop limit to 2, or use `container`). `web-identity`: EKS IRSA, from the projected token file and `AWS_ROLE_ARN`, which the platform sets. `profile`: development only (`KINDGI_DEV=true`), a named profile from `~/.aws` as `aws login` or SSO makes it (`KINDGI_AWS_PROFILE`). Unset: the server has no AWS identity, and a registration that needs one is refused. Never the AWS SDK's default chain or keys in the environment; Kindgi keeps no key.",
|
|
898
|
+
example: 'container',
|
|
899
|
+
required: false,
|
|
900
|
+
appliesTo: appliesToServer,
|
|
901
|
+
group: 'aws',
|
|
902
|
+
allowedValues: ['container', 'instance', 'web-identity', 'profile'],
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: 'KINDGI_AWS_PROFILE',
|
|
906
|
+
description:
|
|
907
|
+
'Used from runtime 0.1.7; runtime 0.1.6 ignores it. With `KINDGI_AWS_IDENTITY=profile` (development only): the profile in `~/.aws/config` the server signs in as. Default: `default`.',
|
|
908
|
+
example: 'kindgi-dev',
|
|
909
|
+
required: false,
|
|
910
|
+
appliesTo: appliesToServer,
|
|
911
|
+
group: 'aws',
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: 'KINDGI_AWS_ROLE_ARN',
|
|
915
|
+
description:
|
|
916
|
+
"Used from runtime 0.1.7; runtime 0.1.6 ignores it. An IAM role the server assumes on top of its AWS identity (STS, 1-hour sessions renewed before they expire): least privilege, or a role in another account. An IAM role's ARN, `arn:aws:iam::<account>:role/<name>`. Unset: the identity's own permissions.",
|
|
917
|
+
example: 'arn:aws:iam::123456789012:role/kindgi-bedrock',
|
|
918
|
+
required: false,
|
|
919
|
+
appliesTo: appliesToServer,
|
|
920
|
+
group: 'aws',
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: 'KINDGI_AWS_ROLE_SESSION_NAME',
|
|
924
|
+
description:
|
|
925
|
+
"Used from runtime 0.1.7; runtime 0.1.6 ignores it. With `KINDGI_AWS_ROLE_ARN`: the role session's name, as CloudTrail shows it. Default: `kindgi-runtime`.",
|
|
926
|
+
example: 'kindgi-runtime',
|
|
927
|
+
required: false,
|
|
928
|
+
appliesTo: appliesToServer,
|
|
929
|
+
group: 'aws',
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
name: 'KINDGI_AWS_STS_REGION',
|
|
933
|
+
description:
|
|
934
|
+
'Used from runtime 0.1.7; runtime 0.1.6 ignores it. With `KINDGI_AWS_ROLE_ARN` or `KINDGI_AWS_IDENTITY=web-identity`: the region whose STS endpoint is used (regional STS, never the global endpoint). Default: `AWS_REGION`. Neither: the server refuses to start.',
|
|
935
|
+
example: 'us-east-2',
|
|
936
|
+
required: false,
|
|
937
|
+
appliesTo: appliesToServer,
|
|
938
|
+
group: 'aws',
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: 'KINDGI_AZURE_CLIENT_ID',
|
|
942
|
+
description:
|
|
943
|
+
"Client id of the user-assigned managed identity the server signs in to Azure with, for its Azure settings (`KINDGI_SECRETS_BACKEND_KMS=azure`, `KINDGI_SECRETS_MANAGER=azure`, `KINDGI_IMAGE_REGISTRY_AUTH=azure`). Unset: the service's system-assigned identity. With `KINDGI_DEV=true` (a laptop), the Azure CLI's sign-in (`az login`) first, then the managed identity. Kindgi keeps no key or secret for it.",
|
|
944
|
+
example: '11111111-2222-3333-4444-555555555555',
|
|
945
|
+
required: false,
|
|
946
|
+
appliesTo: appliesToServer,
|
|
947
|
+
group: 'azure',
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: 'KINDGI_SECRETS_AZURE_KEY_ID',
|
|
951
|
+
description:
|
|
952
|
+
"The Azure Key Vault key that wraps DEKs (postgres backend, KMS `azure`): its URL without a version, `https://<vault>.vault.azure.net/keys/<name>`. New secrets are wrapped with the key's current version and remember it, so rotating the key needs no rewrite. A URL with a version is refused. The server's identity needs wrap and unwrap on the key (the Key Vault Crypto Service Encryption User role).",
|
|
953
|
+
example: 'https://my-vault.vault.azure.net/keys/kindgi-secrets',
|
|
954
|
+
required: true,
|
|
955
|
+
appliesTo: appliesToPostgresAzure,
|
|
956
|
+
group: 'azure',
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
name: 'KINDGI_SECRETS_AZURE_VAULT_URL',
|
|
960
|
+
description:
|
|
961
|
+
"The Azure Key Vault that holds the secrets set through Kindgi's API (`secret-manager` backend, manager `azure`): its URL, `https://<vault>.vault.azure.net`. Use a vault for these alone, not the one your deployment's own secrets are in: the server's identity needs the Key Vault Secrets Officer role on it, to create, version, disable and recover secrets.",
|
|
962
|
+
example: 'https://my-kindgi-secrets.vault.azure.net',
|
|
963
|
+
required: true,
|
|
964
|
+
appliesTo: appliesToSecretManager('azure'),
|
|
965
|
+
group: 'azure',
|
|
966
|
+
},
|
|
967
|
+
|
|
968
|
+
// ---- HashiCorp Vault / OpenBao (`KINDGI_SECRETS_MANAGER=vault`) ----
|
|
969
|
+
{
|
|
970
|
+
name: 'KINDGI_SECRETS_VAULT_ADDR',
|
|
971
|
+
description:
|
|
972
|
+
"The Vault (or OpenBao) that holds the secrets set through Kindgi's API (`secret-manager` backend, manager `vault`): its address. `https://`, or plain `http://` only to a Vault Agent on the same machine (`http://127.0.0.1:8100`) or in development. The server's token needs, on its kv version 2 mount (`KINDGI_SECRETS_VAULT_MOUNT`): `create`, `read`, `update` on `<mount>/data/*`; `read`, `delete`, `list` on `<mount>/metadata/*`; `update` on `<mount>/delete/*` and `<mount>/destroy/*`. A custom CA: `NODE_EXTRA_CA_CERTS`.",
|
|
973
|
+
example: 'https://vault.example.com:8200',
|
|
974
|
+
required: true,
|
|
975
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
976
|
+
group: 'vault',
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: 'KINDGI_SECRETS_VAULT_MOUNT',
|
|
980
|
+
description:
|
|
981
|
+
'The kv version 2 mount Kindgi keeps its secrets in. Use one for these alone. Default `secret`.',
|
|
982
|
+
example: 'kindgi',
|
|
983
|
+
required: false,
|
|
984
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
985
|
+
group: 'vault',
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
name: 'KINDGI_SECRETS_VAULT_NAMESPACE',
|
|
989
|
+
description:
|
|
990
|
+
'The Vault Enterprise or HCP Vault namespace (`admin`, `admin/team`). Unset: none.',
|
|
991
|
+
example: 'admin',
|
|
992
|
+
required: false,
|
|
993
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
994
|
+
group: 'vault',
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
name: 'KINDGI_SECRETS_VAULT_TOKEN_FILE',
|
|
998
|
+
description:
|
|
999
|
+
"A file holding the server's Vault token, kept fresh by the platform: Vault Agent's sink, or a mounted secret. Read again every minute, and when Vault refuses the token. Set this or `KINDGI_SECRETS_VAULT_K8S_ROLE`. Kindgi never reads `VAULT_TOKEN` or `~/.vault-token`.",
|
|
1000
|
+
example: '/vault/secrets/token',
|
|
1001
|
+
required: false,
|
|
1002
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
1003
|
+
group: 'vault',
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
name: 'KINDGI_SECRETS_VAULT_K8S_ROLE',
|
|
1007
|
+
description:
|
|
1008
|
+
"The role of Vault's Kubernetes auth method the server logs in with, using its pod's service account token. Its token is renewed by logging in again before its lease ends. Set this or `KINDGI_SECRETS_VAULT_TOKEN_FILE`.",
|
|
1009
|
+
example: 'kindgi-runtime',
|
|
1010
|
+
required: false,
|
|
1011
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
1012
|
+
group: 'vault',
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
name: 'KINDGI_SECRETS_VAULT_K8S_MOUNT',
|
|
1016
|
+
description:
|
|
1017
|
+
"Where Vault's Kubernetes auth method is mounted, with `KINDGI_SECRETS_VAULT_K8S_ROLE`. Default `kubernetes`.",
|
|
1018
|
+
example: 'kubernetes-prod',
|
|
1019
|
+
required: false,
|
|
1020
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
1021
|
+
group: 'vault',
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
name: 'KINDGI_SECRETS_VAULT_K8S_TOKEN_FILE',
|
|
1025
|
+
description:
|
|
1026
|
+
'The service account token the Kubernetes login sends, with `KINDGI_SECRETS_VAULT_K8S_ROLE`. Default `/var/run/secrets/kubernetes.io/serviceaccount/token`; set it for a projected token with its own audience.',
|
|
1027
|
+
example: '/var/run/secrets/vault/token',
|
|
1028
|
+
required: false,
|
|
1029
|
+
appliesTo: appliesToSecretManager('vault'),
|
|
1030
|
+
group: 'vault',
|
|
1031
|
+
},
|
|
1032
|
+
|
|
1033
|
+
// ---- AWS vendor -------------------------------------------------
|
|
1034
|
+
{
|
|
1035
|
+
name: 'KINDGI_SECRETS_AWS_REGION',
|
|
1036
|
+
description:
|
|
1037
|
+
"Used from runtime 0.1.7 (0.1.6 refuses `KINDGI_SECRETS_MANAGER=aws` at startup). The AWS region whose Secrets Manager holds the secrets set through Kindgi's API (`secret-manager` backend, manager `aws`). The server signs in as its AWS identity (`KINDGI_AWS_IDENTITY`), never with `AWS_*` keys or the SDK's default chain. That identity needs, on `arn:aws:secretsmanager:<region>:<account>:secret:kindgi/*` only: `secretsmanager:CreateSecret`, `TagResource`, `PutSecretValue`, `GetSecretValue`, `DescribeSecret` and `DeleteSecret`. Secrets are named `kindgi/<hash>`, with the scope in their tags.",
|
|
1038
|
+
example: 'ca-central-1',
|
|
1039
|
+
required: true,
|
|
1040
|
+
appliesTo: appliesToSecretManager('aws'),
|
|
1041
|
+
group: 'aws',
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
name: 'KINDGI_SECRETS_AWS_KMS_KEY_ID',
|
|
1045
|
+
description:
|
|
1046
|
+
"Used from runtime 0.1.7 (0.1.6 refuses `KINDGI_SECRETS_MANAGER=aws` at startup). The KMS key AWS Secrets Manager encrypts Kindgi's secrets with (`secret-manager` backend, manager `aws`): a key ARN, key id or `alias/…`. The server's AWS identity then needs `kms:GenerateDataKey` and `kms:Decrypt` on it. Unset: AWS's own `aws/secretsmanager` key.",
|
|
1047
|
+
example: 'alias/kindgi-secrets',
|
|
1048
|
+
required: false,
|
|
1049
|
+
appliesTo: appliesToSecretManager('aws'),
|
|
1050
|
+
group: 'aws',
|
|
1051
|
+
},
|
|
1052
|
+
|
|
1053
|
+
// ---- local key (libsodium) --------------------------------------
|
|
782
1054
|
{
|
|
783
1055
|
name: 'KINDGI_SECRETS_LOCAL_KEY_PATH',
|
|
784
1056
|
description:
|
|
@@ -872,6 +1144,25 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
872
1144
|
group: 'pack-service',
|
|
873
1145
|
allowedValues: ['strict', 'warn'],
|
|
874
1146
|
},
|
|
1147
|
+
{
|
|
1148
|
+
name: 'KINDGI_PACK_ENV_FILTER',
|
|
1149
|
+
description:
|
|
1150
|
+
"Whether the pack service keeps only the names its pack declares (`env.required`, `env.optional`). `on` (default): before the pack's code loads, it drops every other variable from its environment but `KINDGI_*` and the platform's own (the process's basics, the language runtime's settings, `PORT`, proxies and certificates, and Cloud Run's, AWS's and Azure's workload identity and metadata), and logs the dropped names, never their values (`WARN env-dropped`). `off`: every variable reaches the pack's code. `kindgi dev` uses `off`.",
|
|
1151
|
+
example: 'on',
|
|
1152
|
+
required: false,
|
|
1153
|
+
appliesTo: appliesToPackService,
|
|
1154
|
+
group: 'pack-service',
|
|
1155
|
+
allowedValues: ['on', 'off'],
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
name: 'KINDGI_PACK_ENV_DECLARED',
|
|
1159
|
+
description:
|
|
1160
|
+
"A Java or Scala pack service's declared names, comma-separated: the ones its launcher (`kindgi-pack-java`) keeps when `KINDGI_PACK_ENV_FILTER` is on, since a JVM can't drop a variable from its own environment. `kindgi build` sets it in the image from the pack's index; the service won't start when it differs from the index's `env`. Without it, the launcher drops nothing, and the service won't start while a name the pack doesn't declare reaches it.",
|
|
1161
|
+
example: 'DATABASE_URL,CACHE_DIR',
|
|
1162
|
+
required: false,
|
|
1163
|
+
appliesTo: appliesToPackService,
|
|
1164
|
+
group: 'pack-service',
|
|
1165
|
+
},
|
|
875
1166
|
{
|
|
876
1167
|
name: 'KINDGI_IMAGE_REGISTRY_HOST',
|
|
877
1168
|
description:
|
|
@@ -911,12 +1202,12 @@ export const KINDGI_ENV_SCHEMA: readonly EnvVarSpec[] = [
|
|
|
911
1202
|
{
|
|
912
1203
|
name: 'KINDGI_IMAGE_REGISTRY_AUTH',
|
|
913
1204
|
description:
|
|
914
|
-
"How the server signs in to `KINDGI_IMAGE_REGISTRY_HOST`. `static` (default): `KINDGI_IMAGE_REGISTRY_USERNAME` and `_PASSWORD`. `google`: the server's own Google identity (Application Default Credentials: the service's identity on Cloud Run), for Artifact Registry; no username or password is set, and Kindgi keeps no key file.",
|
|
1205
|
+
"How the server signs in to `KINDGI_IMAGE_REGISTRY_HOST`. `static` (default): `KINDGI_IMAGE_REGISTRY_USERNAME` and `_PASSWORD`. `google`: the server's own Google identity (Application Default Credentials: the service's identity on Cloud Run), for Artifact Registry; no username or password is set, and Kindgi keeps no key file. `azure`: the server's own managed identity (see `KINDGI_AZURE_CLIENT_ID`), for Azure Container Registry, where it needs the AcrPull role; no username or password is set either.",
|
|
915
1206
|
example: 'static',
|
|
916
1207
|
required: false,
|
|
917
1208
|
appliesTo: appliesToServer,
|
|
918
1209
|
group: 'image-registry',
|
|
919
|
-
allowedValues: ['static', 'google'],
|
|
1210
|
+
allowedValues: ['static', 'google', 'azure'],
|
|
920
1211
|
},
|
|
921
1212
|
{
|
|
922
1213
|
name: 'KINDGI_PACK_DIR',
|