@fabrika/installation-init 0.9.0-dev.31 → 0.9.0-dev.33
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/package.json +6 -6
- package/src/secrets.ts +3 -0
- package/src/service-environment.ts +2 -1
- package/types/src/secrets.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/installation-init",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"zod": "^3.25.76",
|
|
31
|
-
"@fabrika/app": "0.9.0-dev.
|
|
32
|
-
"@fabrika/auth-core": "0.9.0-dev.
|
|
33
|
-
"@fabrika/email": "0.9.0-dev.
|
|
34
|
-
"@fabrika/iam-contract": "0.9.0-dev.
|
|
35
|
-
"@fabrika/proxy-core": "0.9.0-dev.
|
|
31
|
+
"@fabrika/app": "0.9.0-dev.33",
|
|
32
|
+
"@fabrika/auth-core": "0.9.0-dev.33",
|
|
33
|
+
"@fabrika/email": "0.9.0-dev.33",
|
|
34
|
+
"@fabrika/iam-contract": "0.9.0-dev.33",
|
|
35
|
+
"@fabrika/proxy-core": "0.9.0-dev.33"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/secrets.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface InstallationSecrets {
|
|
|
65
65
|
readonly operationsSyncKey: string
|
|
66
66
|
/** The control plane's vault KEK: 32 raw bytes at base64. Its loss is unrecoverable by design. */
|
|
67
67
|
readonly vaultKey: string
|
|
68
|
+
/** IAM's key that seals TOTP secrets (`FABRIKA_IAM_DATA_KEY`): 32 raw bytes at base64. Its loss resets every authenticator. */
|
|
69
|
+
readonly dataKey: string
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
/** Roll one installation's secrets. Pure entropy in, no I/O, nothing persisted. */
|
|
@@ -75,4 +77,5 @@ export const generateInstallationSecrets = (): InstallationSecrets => ({
|
|
|
75
77
|
provisioningKey: randomPxKey(),
|
|
76
78
|
operationsSyncKey: randomSecret(),
|
|
77
79
|
vaultKey: generateVaultKey(),
|
|
80
|
+
dataKey: generateVaultKey(),
|
|
78
81
|
})
|
|
@@ -114,6 +114,7 @@ export const installationServiceEnvironment = (input: InstallationServiceInput):
|
|
|
114
114
|
['FABRIKA_IAM_RPC_KEY', secrets.rpcKey],
|
|
115
115
|
['FABRIKA_IAM_PROXY_KEY', secrets.proxyKey],
|
|
116
116
|
['FABRIKA_IAM_PROVISIONING_KEY', secrets.provisioningKey],
|
|
117
|
+
['FABRIKA_IAM_DATA_KEY', secrets.dataKey],
|
|
117
118
|
...email,
|
|
118
119
|
]),
|
|
119
120
|
operations: new Map([
|
|
@@ -161,7 +162,7 @@ export const installationServiceEnvironment = (input: InstallationServiceInput):
|
|
|
161
162
|
* are written as credentials. A provider adds the names of its own that carry a generated value.
|
|
162
163
|
*/
|
|
163
164
|
export const INSTALLATION_SECRET_VARIABLES: Readonly<Record<PlatformService, readonly string[]>> = {
|
|
164
|
-
iam: ['FABRIKA_IAM_SIGNING_KEYS', 'FABRIKA_IAM_RPC_KEY', 'FABRIKA_IAM_PROXY_KEY', 'FABRIKA_IAM_PROVISIONING_KEY'],
|
|
165
|
+
iam: ['FABRIKA_IAM_SIGNING_KEYS', 'FABRIKA_IAM_RPC_KEY', 'FABRIKA_IAM_PROXY_KEY', 'FABRIKA_IAM_PROVISIONING_KEY', 'FABRIKA_IAM_DATA_KEY'],
|
|
165
166
|
operations: ['OPERATIONS_SYNC_KEY', 'FABRIKA_IAM_RPC_KEY'],
|
|
166
167
|
control: ['FABRIKA_IAM_RPC_KEY', 'OPERATIONS_SYNC_KEY', 'FABRIKA_CONTROL_VAULT_KEY', 'FABRIKA_IAM_PROVISIONING_KEY'],
|
|
167
168
|
proxy: ['FABRIKA_IAM_KEY'],
|
package/types/src/secrets.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface InstallationSecrets {
|
|
|
27
27
|
readonly operationsSyncKey: string;
|
|
28
28
|
/** The control plane's vault KEK: 32 raw bytes at base64. Its loss is unrecoverable by design. */
|
|
29
29
|
readonly vaultKey: string;
|
|
30
|
+
/** IAM's key that seals TOTP secrets (`FABRIKA_IAM_DATA_KEY`): 32 raw bytes at base64. Its loss resets every authenticator. */
|
|
31
|
+
readonly dataKey: string;
|
|
30
32
|
}
|
|
31
33
|
/** Roll one installation's secrets. Pure entropy in, no I/O, nothing persisted. */
|
|
32
34
|
export declare const generateInstallationSecrets: () => InstallationSecrets;
|