@bsb/config-vault 9.6.9 → 9.6.11
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 +24 -10
- package/lib/plugins/service-config-vault/http-server.d.ts +1 -0
- package/lib/plugins/service-config-vault/http-server.d.ts.map +1 -1
- package/lib/plugins/service-config-vault/http-server.js +563 -83
- package/lib/plugins/service-config-vault/http-server.js.map +1 -1
- package/lib/plugins/service-config-vault/index.d.ts +3 -0
- package/lib/plugins/service-config-vault/index.d.ts.map +1 -1
- package/lib/plugins/service-config-vault/index.js +2 -0
- package/lib/plugins/service-config-vault/index.js.map +1 -1
- package/lib/plugins/service-config-vault/store.d.ts +7 -0
- package/lib/plugins/service-config-vault/store.d.ts.map +1 -1
- package/lib/plugins/service-config-vault/store.js +32 -2
- package/lib/plugins/service-config-vault/store.js.map +1 -1
- package/lib/plugins/service-config-vault/vault.d.ts +47 -1
- package/lib/plugins/service-config-vault/vault.d.ts.map +1 -1
- package/lib/plugins/service-config-vault/vault.js +291 -0
- package/lib/plugins/service-config-vault/vault.js.map +1 -1
- package/lib/schemas/config-vault.json +1 -1
- package/lib/schemas/config-vault.plugin.json +1 -1
- package/lib/schemas/service-config-vault.json +10 -2
- package/lib/schemas/service-config-vault.plugin.json +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,15 +11,14 @@ Runtime containers do not choose applications, groups, profiles, or versions. Th
|
|
|
11
11
|
|
|
12
12
|
## Runtime
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
apiSecret: vs_xxx
|
|
14
|
+
Runtime containers activate Vault as the BSB config plugin with env vars:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
BSB_CONFIG_PLUGIN=config-vault
|
|
18
|
+
BSB_CONFIG_PLUGIN_PACKAGE=@bsb/config-vault
|
|
19
|
+
vaultUrl=https://vault.example.com
|
|
20
|
+
apiKeyId=vk_xxx
|
|
21
|
+
apiSecret=vs_xxx
|
|
23
22
|
```
|
|
24
23
|
|
|
25
24
|
When a container restarts, it pulls the active published version for the API key's bound deployment profile.
|
|
@@ -38,6 +37,7 @@ service-config-vault:
|
|
|
38
37
|
production: true
|
|
39
38
|
databaseUrl: postgres://vault:secret@postgres:5432/vault
|
|
40
39
|
masterKey: BASE64_32_BYTE_KEY
|
|
40
|
+
registryUrl: https://io.bsbcode.dev
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
`masterKey` must be a base64 encoded 32-byte key. Generate one with:
|
|
@@ -52,10 +52,24 @@ Keep the value stable. If the key changes, Vault cannot decrypt configs already
|
|
|
52
52
|
|
|
53
53
|
On first startup, Vault logs a one-time setup code. Open `/setup`, enter the code, create the admin user, and confirm the password. Vault generates the TOTP enrollment secret and authenticator URI after the user is created.
|
|
54
54
|
|
|
55
|
+
Vault has exactly one admin user. Treat that as part of the security model, not a missing team-management feature.
|
|
56
|
+
|
|
55
57
|
On the first login, Vault verifies password and TOTP, then checks whether the admin has a registered passkey. If no passkey exists, Vault sends the admin through browser passkey enrollment and then forces a fresh login.
|
|
56
58
|
|
|
57
59
|
After enrollment, every admin login requires password, TOTP, and a browser passkey assertion. Passkeys require HTTPS in browsers unless you are using localhost for local development, and `publicUrl` must match the external URL used to open Vault.
|
|
58
60
|
|
|
59
61
|
## Admin UI
|
|
60
62
|
|
|
61
|
-
Vault has
|
|
63
|
+
Vault has pages for Overview, Applications, Deployments, Plugins, and Profile. Deployment profiles own config drafts, publishing, and container key create/rotate flows.
|
|
64
|
+
|
|
65
|
+
Vault stores profile config internally as the profile body:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"observable": {},
|
|
70
|
+
"events": {},
|
|
71
|
+
"services": {}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The admin UI builds that body from plugin catalog entries and generated config schemas. Add a plugin, enable or disable it, then fill out the schema-derived fields instead of editing JSON. Vault validates those fields server-side, applies defaults, strips unknown keys, and rejects invalid values before encrypting drafts. Vault wraps the body under the profile name internally. Container keys are generated from the deployment profile page and the UI shows the BSB container env vars once on creation or rotation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-config-vault/http-server.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,OAAO,EAAE,gBAAgB;IAI/B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-config-vault/http-server.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,OAAO,EAAE,gBAAgB;IAI/B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoVtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAUb,WAAW;YAUX,gBAAgB;IAY9B,OAAO,CAAC,IAAI;CAGb"}
|