@wildo-ai/platform-infra-providers 1.1.16 → 1.1.17
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/dist/esm/aws-s3/aws-s3.infra.module.d.ts +10 -10
- package/dist/esm/aws-s3/aws-s3.infra.module.d.ts.map +1 -1
- package/dist/esm/aws-s3/aws-s3.infra.module.js +18 -19
- package/dist/esm/aws-s3/aws-s3.infra.module.js.map +1 -1
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/seaweedfs-self/seaweedfs-self.infra.module.d.ts +39 -0
- package/dist/esm/seaweedfs-self/seaweedfs-self.infra.module.d.ts.map +1 -0
- package/dist/esm/seaweedfs-self/seaweedfs-self.infra.module.js +66 -0
- package/dist/esm/seaweedfs-self/seaweedfs-self.infra.module.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/__tests__/servable-infra-providers.test.ts +1 -1
- package/src/aws-s3/__tests__/aws-s3.infra.module.test.ts +1 -4
- package/src/aws-s3/aws-s3.infra.module.ts +18 -18
- package/src/index.ts +5 -4
- package/src/seaweedfs-self/__tests__/seaweedfs-self.infra.module.test.ts +57 -0
- package/src/seaweedfs-self/seaweedfs-self.infra.module.ts +77 -0
- package/dist/esm/minio-self/minio-self.infra.module.d.ts +0 -61
- package/dist/esm/minio-self/minio-self.infra.module.d.ts.map +0 -1
- package/dist/esm/minio-self/minio-self.infra.module.js +0 -104
- package/dist/esm/minio-self/minio-self.infra.module.js.map +0 -1
- package/src/minio-self/__tests__/minio-self.infra.module.test.ts +0 -69
- package/src/minio-self/minio-self.infra.module.ts +0 -115
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `AwsS3InfraProviderModule` — seventh concrete `InfraProviderModule`.
|
|
3
3
|
*
|
|
4
|
-
* Implements the `AWS_S3` `InfraProvider`. Shares the
|
|
5
|
-
*
|
|
6
|
-
* the only differences are (a) no
|
|
7
|
-
* managed), and (b) the bucket endpoint
|
|
8
|
-
* instead of the in-cluster `
|
|
4
|
+
* Implements the `AWS_S3` `InfraProvider`. Shares the per-application
|
|
5
|
+
* bucket, `applications/<applicationId>/`-keyed object layout of
|
|
6
|
+
* `SeaweedfsSelfInfraProviderModule` — the only differences are (a) no
|
|
7
|
+
* compose / K8s contribution (S3 is managed), and (b) the bucket endpoint
|
|
8
|
+
* is the regional AWS hostname instead of the in-cluster `seaweedfs` service.
|
|
9
9
|
*
|
|
10
10
|
* ## ⚠️ NOT USABLE TODAY — selecting this provider leaves apps with no
|
|
11
11
|
* storage credential (2026-08-10)
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
* ROOT pair, handed to every app, minion and worker. Applications now
|
|
16
16
|
* obtain short-lived, prefix-confined credentials from apps-manager.
|
|
17
17
|
*
|
|
18
|
-
* That replacement is implemented for **
|
|
18
|
+
* That replacement is implemented for **the self-hosted store only**. apps-manager's
|
|
19
19
|
* `ObjectStorageStsBrokerService` speaks STS `AssumeRole` with an inline
|
|
20
20
|
* session policy. Since #2172 it names a role when one is configured
|
|
21
21
|
* (`platformStorage.stsRoleArn` → `STORAGE_STS_ROLE_ARN`), and refuses to
|
|
22
22
|
* issue against AWS STS without one. What still stops an `AWS_S3`
|
|
23
|
-
* deployment is #14: apps-manager admits only `STORAGE_PROVIDER=
|
|
23
|
+
* deployment is #14: apps-manager admits only `STORAGE_PROVIDER=seaweedfs`,
|
|
24
24
|
* the STS signing region is fixed at `us-east-1` rather than the regional
|
|
25
25
|
* endpoint's, and the path is unproven against a real AWS account.
|
|
26
26
|
*
|
|
27
27
|
* No environment selects this provider today (every example uses
|
|
28
|
-
* `BackingServiceSource.SELF` →
|
|
28
|
+
* `BackingServiceSource.SELF` → SeaweedFS), which is why this is recorded as
|
|
29
29
|
* a gap rather than an outage. `s3: { source: MANAGED }` and
|
|
30
30
|
* `provider: 'aws'` still RESOLVE here, but since #1693 such a
|
|
31
31
|
* declaration is refused at authoring time: `unservableReason` below
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
*
|
|
39
39
|
* **Why this module exists despite "no compose / no mint"**: it
|
|
40
40
|
* gives the lockfile a stable digest entry (so a switch from
|
|
41
|
-
* `
|
|
41
|
+
* `seaweedfs-self` to `aws-s3` shows up as a `wildo lock check` drift)
|
|
42
42
|
* AND it formalizes which env vars the operator must set for AWS
|
|
43
43
|
* (`STORAGE_REGION` is mandatory; `STORAGE_ENDPOINT` is optional —
|
|
44
44
|
* defaults to the AWS regional endpoint when unset).
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* to speak AWS STS.
|
|
53
53
|
*
|
|
54
54
|
* Nor should the missing piece be per-app IAM users or roles, which is
|
|
55
|
-
* what this block previously anticipated. The
|
|
55
|
+
* what this block previously anticipated. The self-hosted path deliberately
|
|
56
56
|
* rejected long-lived per-principal accounts in favour of `AssumeRole`
|
|
57
57
|
* with an inline session policy — nothing long-lived exists to leak, and
|
|
58
58
|
* credential-rotation safety dissolves instead of needing a design. The
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-s3.infra.module.d.ts","sourceRoot":"","sources":["../../../src/aws-s3/aws-s3.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,EAIL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"aws-s3.infra.module.d.ts","sourceRoot":"","sources":["../../../src/aws-s3/aws-s3.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,EAIL,mBAAmB,EAGpB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,wBAAwB,EAAE,mBA2DtC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `AwsS3InfraProviderModule` — seventh concrete `InfraProviderModule`.
|
|
3
3
|
*
|
|
4
|
-
* Implements the `AWS_S3` `InfraProvider`. Shares the
|
|
5
|
-
*
|
|
6
|
-
* the only differences are (a) no
|
|
7
|
-
* managed), and (b) the bucket endpoint
|
|
8
|
-
* instead of the in-cluster `
|
|
4
|
+
* Implements the `AWS_S3` `InfraProvider`. Shares the per-application
|
|
5
|
+
* bucket, `applications/<applicationId>/`-keyed object layout of
|
|
6
|
+
* `SeaweedfsSelfInfraProviderModule` — the only differences are (a) no
|
|
7
|
+
* compose / K8s contribution (S3 is managed), and (b) the bucket endpoint
|
|
8
|
+
* is the regional AWS hostname instead of the in-cluster `seaweedfs` service.
|
|
9
9
|
*
|
|
10
10
|
* ## ⚠️ NOT USABLE TODAY — selecting this provider leaves apps with no
|
|
11
11
|
* storage credential (2026-08-10)
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
* ROOT pair, handed to every app, minion and worker. Applications now
|
|
16
16
|
* obtain short-lived, prefix-confined credentials from apps-manager.
|
|
17
17
|
*
|
|
18
|
-
* That replacement is implemented for **
|
|
18
|
+
* That replacement is implemented for **the self-hosted store only**. apps-manager's
|
|
19
19
|
* `ObjectStorageStsBrokerService` speaks STS `AssumeRole` with an inline
|
|
20
20
|
* session policy. Since #2172 it names a role when one is configured
|
|
21
21
|
* (`platformStorage.stsRoleArn` → `STORAGE_STS_ROLE_ARN`), and refuses to
|
|
22
22
|
* issue against AWS STS without one. What still stops an `AWS_S3`
|
|
23
|
-
* deployment is #14: apps-manager admits only `STORAGE_PROVIDER=
|
|
23
|
+
* deployment is #14: apps-manager admits only `STORAGE_PROVIDER=seaweedfs`,
|
|
24
24
|
* the STS signing region is fixed at `us-east-1` rather than the regional
|
|
25
25
|
* endpoint's, and the path is unproven against a real AWS account.
|
|
26
26
|
*
|
|
27
27
|
* No environment selects this provider today (every example uses
|
|
28
|
-
* `BackingServiceSource.SELF` →
|
|
28
|
+
* `BackingServiceSource.SELF` → SeaweedFS), which is why this is recorded as
|
|
29
29
|
* a gap rather than an outage. `s3: { source: MANAGED }` and
|
|
30
30
|
* `provider: 'aws'` still RESOLVE here, but since #1693 such a
|
|
31
31
|
* declaration is refused at authoring time: `unservableReason` below
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
*
|
|
39
39
|
* **Why this module exists despite "no compose / no mint"**: it
|
|
40
40
|
* gives the lockfile a stable digest entry (so a switch from
|
|
41
|
-
* `
|
|
41
|
+
* `seaweedfs-self` to `aws-s3` shows up as a `wildo lock check` drift)
|
|
42
42
|
* AND it formalizes which env vars the operator must set for AWS
|
|
43
43
|
* (`STORAGE_REGION` is mandatory; `STORAGE_ENDPOINT` is optional —
|
|
44
44
|
* defaults to the AWS regional endpoint when unset).
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* to speak AWS STS.
|
|
53
53
|
*
|
|
54
54
|
* Nor should the missing piece be per-app IAM users or roles, which is
|
|
55
|
-
* what this block previously anticipated. The
|
|
55
|
+
* what this block previously anticipated. The self-hosted path deliberately
|
|
56
56
|
* rejected long-lived per-principal accounts in favour of `AssumeRole`
|
|
57
57
|
* with an inline session policy — nothing long-lived exists to leak, and
|
|
58
58
|
* credential-rotation safety dissolves instead of needing a design. The
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* `applications/<applicationId>/`. The broker takes that role since #2172;
|
|
62
62
|
* the rest of the gap is #14 (see above).
|
|
63
63
|
*/
|
|
64
|
-
import { InfraCapability, InfraPlatformAdminConsumer, InfraProvider, } from '@wildo-ai/platform-config-lib';
|
|
64
|
+
import { InfraCapability, InfraPlatformAdminConsumer, InfraProvider, PlatformObjectStorageProvider, } from '@wildo-ai/platform-config-lib';
|
|
65
65
|
export const AwsS3InfraProviderModule = {
|
|
66
66
|
provider: InfraProvider.AWS_S3,
|
|
67
67
|
supportedCapabilities: [InfraCapability.OBJECT_STORAGE],
|
|
@@ -70,8 +70,8 @@ export const AwsS3InfraProviderModule = {
|
|
|
70
70
|
* MANAGED }`, or `provider: 'aws'`) is refused by `wildo config validate` / `config sync` /
|
|
71
71
|
* `lock check` until this field is deleted — in the change that teaches the broker AWS STS (#14).
|
|
72
72
|
*/
|
|
73
|
-
unservableReason: 'The object-storage credential broker is wired and proven only against
|
|
74
|
-
+ 'admits only STORAGE_PROVIDER=
|
|
73
|
+
unservableReason: 'The object-storage credential broker is wired and proven only against the self-hosted SeaweedFS: apps-manager '
|
|
74
|
+
+ 'admits only STORAGE_PROVIDER=seaweedfs and signs STS for us-east-1, so an application on AWS S3 would receive no '
|
|
75
75
|
+ 'storage credential (#14).',
|
|
76
76
|
/**
|
|
77
77
|
* Shared bucket, shared access key — no per-app credential is minted, so there is nothing
|
|
@@ -85,7 +85,7 @@ export const AwsS3InfraProviderModule = {
|
|
|
85
85
|
// No K8s manifest — same reason.
|
|
86
86
|
platformAdmin: {
|
|
87
87
|
envVars: {
|
|
88
|
-
STORAGE_PROVIDER:
|
|
88
|
+
STORAGE_PROVIDER: PlatformObjectStorageProvider.AWS_S3,
|
|
89
89
|
// Endpoint and port have AWS defaults; operator may override
|
|
90
90
|
// for region-specific or VPC-endpoint topologies via the
|
|
91
91
|
// env's authored `backingServices.s3` config.
|
|
@@ -102,12 +102,11 @@ export const AwsS3InfraProviderModule = {
|
|
|
102
102
|
// without breaking the contract.
|
|
103
103
|
'STORAGE_REGION',
|
|
104
104
|
],
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
],
|
|
105
|
+
// apps-manager alone: it is the one service exchanging the key for STS sessions. The companion
|
|
106
|
+
// holds no storage root key (`companion-platform-config.companion.ts` refuses to read one).
|
|
107
|
+
consumers: [InfraPlatformAdminConsumer.APPS_MANAGER],
|
|
109
108
|
},
|
|
110
|
-
// Same
|
|
109
|
+
// Same layout as SEAWEEDFS_SELF. Apps receive the NON-secret
|
|
111
110
|
// `STORAGE_*` values via the bootstrap env contract; the credential
|
|
112
111
|
// half is no longer emitted for any provider — see the ⚠️ block in
|
|
113
112
|
// this module's JSDoc for why that makes AWS_S3 currently unusable.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-s3.infra.module.js","sourceRoot":"","sources":["../../../src/aws-s3/aws-s3.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,aAAa,
|
|
1
|
+
{"version":3,"file":"aws-s3.infra.module.js","sourceRoot":"","sources":["../../../src/aws-s3/aws-s3.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,aAAa,EAGb,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,QAAQ,EAAE,aAAa,CAAC,MAAM;IAC9B,qBAAqB,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC;IAEvD;;;;OAIG;IACH,gBAAgB,EACd,gHAAgH;UAC9G,mHAAmH;UACnH,2BAA2B;IAE/B;;;;OAIG;IACH,2BAA2B,EAAE,EAAE;IAE/B,IAAI;QACF,OAAO;YACL,4CAA4C;YAC5C,iCAAiC;YACjC,aAAa,EAAE;gBACb,OAAO,EAAE;oBACP,gBAAgB,EAAE,6BAA6B,CAAC,MAAM;oBACtD,6DAA6D;oBAC7D,yDAAyD;oBACzD,8CAA8C;oBAC9C,eAAe,EAAE,MAAM;iBACxB;gBACD,aAAa,EAAE;oBACb,oBAAoB;oBACpB,oBAAoB;oBACpB,uDAAuD;oBACvD,yDAAyD;oBACzD,yDAAyD;oBACzD,2DAA2D;oBAC3D,qDAAqD;oBACrD,iCAAiC;oBACjC,gBAAgB;iBACjB;gBACD,+FAA+F;gBAC/F,4FAA4F;gBAC5F,SAAS,EAAE,CAAC,0BAA0B,CAAC,YAAY,CAAC;aACrD;YACD,6DAA6D;YAC7D,oEAAoE;YACpE,mEAAmE;YACnE,oEAAoE;SACrE,CAAC;IACJ,CAAC;IAED,2EAA2E;IAC3E,oEAAoE;IACpE,8EAA8E;IAC9E,0DAA0D;CAC3D,CAAC","sourcesContent":["/**\n * `AwsS3InfraProviderModule` — seventh concrete `InfraProviderModule`.\n *\n * Implements the `AWS_S3` `InfraProvider`. Shares the per-application\n * bucket, `applications/<applicationId>/`-keyed object layout of\n * `SeaweedfsSelfInfraProviderModule` — the only differences are (a) no\n * compose / K8s contribution (S3 is managed), and (b) the bucket endpoint\n * is the regional AWS hostname instead of the in-cluster `seaweedfs` service.\n *\n * ## ⚠️ NOT USABLE TODAY — selecting this provider leaves apps with no\n * storage credential (2026-08-10)\n *\n * The application-tier `STORAGE_ACCESS_KEY` / `STORAGE_SECRET_KEY` env\n * vars were removed **for every provider**: they were the object store's\n * ROOT pair, handed to every app, minion and worker. Applications now\n * obtain short-lived, prefix-confined credentials from apps-manager.\n *\n * That replacement is implemented for **the self-hosted store only**. apps-manager's\n * `ObjectStorageStsBrokerService` speaks STS `AssumeRole` with an inline\n * session policy. Since #2172 it names a role when one is configured\n * (`platformStorage.stsRoleArn` → `STORAGE_STS_ROLE_ARN`), and refuses to\n * issue against AWS STS without one. What still stops an `AWS_S3`\n * deployment is #14: apps-manager admits only `STORAGE_PROVIDER=seaweedfs`,\n * the STS signing region is fixed at `us-east-1` rather than the regional\n * endpoint's, and the path is unproven against a real AWS account.\n *\n * No environment selects this provider today (every example uses\n * `BackingServiceSource.SELF` → SeaweedFS), which is why this is recorded as\n * a gap rather than an outage. `s3: { source: MANAGED }` and\n * `provider: 'aws'` still RESOLVE here, but since #1693 such a\n * declaration is refused at authoring time: `unservableReason` below\n * takes this provider out of the servable set until the AWS STS path\n * exists (#14).\n *\n * The module still reuses the `STORAGE_*` env contract for the\n * NON-secret values (endpoint, region, bucket, provider); it is only the\n * credential half that is gone.\n *\n * **Why this module exists despite \"no compose / no mint\"**: it\n * gives the lockfile a stable digest entry (so a switch from\n * `seaweedfs-self` to `aws-s3` shows up as a `wildo lock check` drift)\n * AND it formalizes which env vars the operator must set for AWS\n * (`STORAGE_REGION` is mandatory; `STORAGE_ENDPOINT` is optional —\n * defaults to the AWS regional endpoint when unset).\n *\n * **No mint methods here** — and the reason is no longer the one this\n * block used to give. It said per-app credentials were out of scope\n * \"because the engine adapter uses a single shared SDK client\", which\n * stopped being true when the adapter moved to a credential provider that\n * rebuilds its client whenever the credential changes. Per-application\n * isolation exists; what is missing for AWS is only the broker's ability\n * to speak AWS STS.\n *\n * Nor should the missing piece be per-app IAM users or roles, which is\n * what this block previously anticipated. The self-hosted path deliberately\n * rejected long-lived per-principal accounts in favour of `AssumeRole`\n * with an inline session policy — nothing long-lived exists to leak, and\n * credential-rotation safety dissolves instead of needing a design. The\n * AWS equivalent is the same shape: `AssumeRole` against a role ARN the\n * operator supplies, with a session policy confining the principal to\n * `applications/<applicationId>/`. The broker takes that role since #2172;\n * the rest of the gap is #14 (see above).\n */\n\nimport {\n InfraCapability,\n InfraPlatformAdminConsumer,\n InfraProvider,\n InfraProviderModule,\n InfraProviderPlanContribution,\n PlatformObjectStorageProvider,\n} from '@wildo-ai/platform-config-lib';\n\nexport const AwsS3InfraProviderModule: InfraProviderModule = {\n provider: InfraProvider.AWS_S3,\n supportedCapabilities: [InfraCapability.OBJECT_STORAGE],\n\n /**\n * What the ⚠️ block above says, made mechanical: a declaration resolving here (`s3: { source:\n * MANAGED }`, or `provider: 'aws'`) is refused by `wildo config validate` / `config sync` /\n * `lock check` until this field is deleted — in the change that teaches the broker AWS STS (#14).\n */\n unservableReason:\n 'The object-storage credential broker is wired and proven only against the self-hosted SeaweedFS: apps-manager '\n + 'admits only STORAGE_PROVIDER=seaweedfs and signs STS for us-east-1, so an application on AWS S3 would receive no '\n + 'storage credential (#14).',\n\n /**\n * Shared bucket, shared access key — no per-app credential is minted, so there is nothing\n * per-principal to confine. Confinement for object storage is done by STS session policy at\n * request time, not by a secret in the application blob.\n */\n perPrincipalSecretBlobPaths: [],\n\n plan(): InfraProviderPlanContribution {\n return {\n // No compose service — S3 is fully managed.\n // No K8s manifest — same reason.\n platformAdmin: {\n envVars: {\n STORAGE_PROVIDER: PlatformObjectStorageProvider.AWS_S3,\n // Endpoint and port have AWS defaults; operator may override\n // for region-specific or VPC-endpoint topologies via the\n // env's authored `backingServices.s3` config.\n STORAGE_USE_SSL: 'true',\n },\n secretEnvVars: [\n 'STORAGE_ACCESS_KEY',\n 'STORAGE_SECRET_KEY',\n // Region is sensitive-ish (deployment topology) and is\n // delivered via the secret env channel for symmetry with\n // the access keys, even though it's not strictly secret.\n // The legacy treatment was env-var, not secret-env-var; if\n // operators object, this can flip to `envVars` later\n // without breaking the contract.\n 'STORAGE_REGION',\n ],\n // apps-manager alone: it is the one service exchanging the key for STS sessions. The companion\n // holds no storage root key (`companion-platform-config.companion.ts` refuses to read one).\n consumers: [InfraPlatformAdminConsumer.APPS_MANAGER],\n },\n // Same layout as SEAWEEDFS_SELF. Apps receive the NON-secret\n // `STORAGE_*` values via the bootstrap env contract; the credential\n // half is no longer emitted for any provider — see the ⚠️ block in\n // this module's JSDoc for why that makes AWS_S3 currently unusable.\n };\n },\n\n // No `mintAppCredentials` / `revokeAppCredentials` — not because the model\n // is shared-bucket (it is, but that is not the reason), but because\n // per-application isolation is delivered by BROKERED STS SESSIONS rather than\n // by minted long-lived accounts. See this module's JSDoc.\n};\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.modu
|
|
|
22
22
|
export { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';
|
|
23
23
|
export { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';
|
|
24
24
|
export { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';
|
|
25
|
-
export
|
|
25
|
+
export * from './seaweedfs-self/seaweedfs-self.infra.module';
|
|
26
26
|
export { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';
|
|
27
27
|
export { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';
|
|
28
28
|
export * from './immudb-self/immudb-self.infra.module';
|
|
@@ -41,7 +41,8 @@ export * from './immudb-self/immudb-self.infra.module';
|
|
|
41
41
|
* - `RABBITMQ_SELF`, `REDIS_SELF`, `POSTGRES_SELF`, `MONGODB_SELF`,
|
|
42
42
|
* `MONGODB_ATLAS` — five stateful modules with mint/revoke
|
|
43
43
|
* methods.
|
|
44
|
-
* - `
|
|
44
|
+
* - `SEAWEEDFS_SELF`, `AWS_S3` — object storage (per-application buckets,
|
|
45
|
+
* STS-confined sessions;
|
|
45
46
|
* no per-app credentials). `AWS_S3` declares `unservableReason`
|
|
46
47
|
* (no AWS STS path in the credential broker, #14), so it plans but is
|
|
47
48
|
* not servable.
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAaxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAaxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,cAAc,wCAAwC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CAYrE,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qCAAqC,EAAE,WAAW,CAAC,aAAa,CAA4B,CAAC;AAE1G;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,IAAI,WAAW,CAAC,aAAa,CAAC,CAM1E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kCAAkC,IAAI,WAAW,CAAC,MAAM,CAAC,CAQxE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,WAAW,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAY7F"}
|
package/dist/esm/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.i
|
|
|
22
22
|
import { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module.js';
|
|
23
23
|
import { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module.js';
|
|
24
24
|
// Object-storage + stateless infra.
|
|
25
|
-
import {
|
|
25
|
+
import { SeaweedfsSelfInfraProviderModule } from './seaweedfs-self/seaweedfs-self.infra.module.js';
|
|
26
26
|
import { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module.js';
|
|
27
27
|
import { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module.js';
|
|
28
28
|
import { ImmudbSelfInfraProviderModule } from './immudb-self/immudb-self.infra.module.js';
|
|
@@ -31,7 +31,7 @@ export { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.modu
|
|
|
31
31
|
export { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module.js';
|
|
32
32
|
export { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module.js';
|
|
33
33
|
export { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module.js';
|
|
34
|
-
export
|
|
34
|
+
export * from './seaweedfs-self/seaweedfs-self.infra.module.js';
|
|
35
35
|
export { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module.js';
|
|
36
36
|
export { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module.js';
|
|
37
37
|
export * from './immudb-self/immudb-self.infra.module.js';
|
|
@@ -50,7 +50,8 @@ export * from './immudb-self/immudb-self.infra.module.js';
|
|
|
50
50
|
* - `RABBITMQ_SELF`, `REDIS_SELF`, `POSTGRES_SELF`, `MONGODB_SELF`,
|
|
51
51
|
* `MONGODB_ATLAS` — five stateful modules with mint/revoke
|
|
52
52
|
* methods.
|
|
53
|
-
* - `
|
|
53
|
+
* - `SEAWEEDFS_SELF`, `AWS_S3` — object storage (per-application buckets,
|
|
54
|
+
* STS-confined sessions;
|
|
54
55
|
* no per-app credentials). `AWS_S3` declares `unservableReason`
|
|
55
56
|
* (no AWS STS path in the credential broker, #14), so it plans but is
|
|
56
57
|
* not servable.
|
|
@@ -74,7 +75,7 @@ export const INFRA_PROVIDER_MODULES = [
|
|
|
74
75
|
PostgresSelfInfraProviderModule,
|
|
75
76
|
MongodbAtlasInfraProviderModule,
|
|
76
77
|
MongodbSelfInfraProviderModule,
|
|
77
|
-
|
|
78
|
+
SeaweedfsSelfInfraProviderModule,
|
|
78
79
|
AwsS3InfraProviderModule,
|
|
79
80
|
ClamavSelfInfraProviderModule,
|
|
80
81
|
// #1696: one immudb database and one confined user per application, replacing the operator-credentialed
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * `@wildo-ai/platform-infra-providers` — concrete `InfraProviderModule`\n * catalog.\n *\n * Tier-portable: the modules import only `@wildo-ai/platform-config-lib`\n * (contracts) and have no DI / mongoose / axios runtime dependencies.\n * This lets both `platform-apps-manager` (orchestrator) and\n * `wildo-cli` (lockfile materializer) consume the same module\n * objects — apps-manager passes a real admin-client implementation\n * via `AppCredentialMintingContext.adminClient`; wildo-cli only\n * needs `module.plan()` for the lockfile digest.\n *\n * Each module is exported by name (no intermediary barrels per\n * platform/CLAUDE.md \"no intermediary index.ts barrels\"). The\n * `INFRA_PROVIDER_MODULES` map below is the canonical catalog —\n * consumers iterate it (or look up by `InfraProvider` value) instead\n * of importing modules one by one.\n */\n\nimport { InfraProvider, type InfraProviderModule } from '@wildo-ai/platform-config-lib';\n\nimport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nimport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nimport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nimport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nimport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\n// Object-storage + stateless infra.\nimport { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';\nimport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nimport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\nimport { ImmudbSelfInfraProviderModule } from './immudb-self/immudb-self.infra.module';\n\nexport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nexport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nexport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nexport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nexport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\nexport { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';\nexport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nexport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\nexport * from './immudb-self/immudb-self.infra.module';\n\n/**\n * Canonical `InfraProvider` → `InfraProviderModule` catalog. Caller\n * (CLI, apps-manager) builds a `Map<InfraProvider, InfraProviderModule>`\n * from this constant when threading modules into\n * `materializeInfraSection`.\n *\n * **Why a const array instead of a `Map` literal**: arrays serialize\n * stably under tsc and roll up to a deterministic order. The\n * downstream `Map` is built once at program start; the catalog\n * itself is a value-level fixture.\n *\n * **Coverage** (Slice 5 baseline, 2026-05-10):\n * - `RABBITMQ_SELF`, `REDIS_SELF`, `POSTGRES_SELF`, `MONGODB_SELF`,\n * `MONGODB_ATLAS` — five stateful modules with mint/revoke\n * methods.\n * - `MINIO_SELF`, `AWS_S3` — object storage (shared-bucket model;\n * no per-app credentials). `AWS_S3` declares `unservableReason`\n * (no AWS STS path in the credential broker, #14), so it plans but is\n * not servable.\n * - `CLAMAV_SELF` — stateless infra (no auth, no per-app state;\n * `plan()` only).\n *\n * **NOT covered** (catalog entries without modules):\n * - `POSTGRES_MANAGED`, `POSTGRES_AWS_RDS`, `POSTGRES_GCP_CLOUD_SQL`,\n * `POSTGRES_AZURE_DATABASE`, `POSTGRES_SUPABASE`, `POSTGRES_NEON`,\n * `POSTGRES_RENDER` — managed-Postgres brand catalog entries\n * (Slice 4.B.0). No module yet; trigger = real customer.\n *\n * A declaration resolving to a provider outside\n * {@link collectServableInfraProviders} is REFUSED by `wildo config\n * validate`, `config sync` and `lock check` (#1693) — it no longer falls\n * through to an authored-entry digest.\n */\nexport const INFRA_PROVIDER_MODULES: ReadonlyArray<InfraProviderModule> = [\n RabbitmqSelfInfraProviderModule,\n RedisSelfInfraProviderModule,\n PostgresSelfInfraProviderModule,\n MongodbAtlasInfraProviderModule,\n MongodbSelfInfraProviderModule,\n MinioSelfInfraProviderModule,\n AwsS3InfraProviderModule,\n ClamavSelfInfraProviderModule,\n // #1696: one immudb database and one confined user per application, replacing the operator-credentialed\n // exemption under which every application logged in as the server's sysadmin.\n ImmudbSelfInfraProviderModule,\n];\n\n/**\n * Providers the platform serves WITHOUT a module in {@link INFRA_PROVIDER_MODULES}, because their\n * application credential is the operator's to supply rather than the catalogue's to mint.\n *\n * ## Why this is the one exception, and why it is a list of exemptions rather than of refusals\n *\n * The servable set is DERIVED from the catalogue ({@link collectServableInfraProviders}); a hand-kept\n * list of refused providers would silently admit every provider added later. So the only thing\n * written down by hand is the exception, and it must be argued for here, one entry at a time.\n *\n * EMPTY since #1696, and kept as the named place such an exemption would be argued. `IMMUDB_SELF` was the one entry:\n * the self-hosted audit store had no module, and every application on the server logged in as its sysadmin into\n * one shared database. Its module now mints one database and one confined user per application, which makes it\n * servable on its own — and REFUSED on a platform that holds no immudb admin credential, like every minting kind.\n */\nexport const OPERATOR_CREDENTIALED_INFRA_PROVIDERS: ReadonlySet<InfraProvider> = new Set<InfraProvider>();\n\n/**\n * The providers a `backingServices` declaration may resolve to — every module in the catalogue that\n * does not declare `unservableReason`, plus {@link OPERATOR_CREDENTIALED_INFRA_PROVIDERS}.\n *\n * The one source both lockfile projections (`wildo config sync`, `wildo lock check`) and\n * `wildo config validate` pass to the shared check in `@wildo-ai/platform-config-lib`\n * (`findUnservableBackingServiceDeclarations`), so all three refuse the same declarations (#1693).\n * Derived, so a module entering the catalogue makes its provider declarable the day it lands.\n */\nexport function collectServableInfraProviders(): ReadonlySet<InfraProvider> {\n const servable = new Set<InfraProvider>(OPERATOR_CREDENTIALED_INFRA_PROVIDERS);\n for (const module of INFRA_PROVIDER_MODULES) {\n if (module.unservableReason === undefined) servable.add(module.provider);\n }\n return servable;\n}\n\n/**\n * Every `Wildo_Application_Secrets` JSON path that ANY provider module can mint per runtime\n * principal — the union of the catalog's own static declarations.\n *\n * ## Why this is derived rather than written down\n *\n * The consumer is the secret-DELIVERY path in apps-manager: it strips exactly this set from the\n * application blob before overlaying a principal's own material, so a principal receives a\n * credential only where one was minted FOR IT. A hand-maintained copy at that consumer would be a\n * second source — add a provider that mints a new credential path and delivery keeps shipping the\n * APPLICATION's value for it, silently. That is the defect class this repo has paid for twice: the\n * party that CONSTRAINS is not the party that DECLARES.\n *\n * Derived from `INFRA_PROVIDER_MODULES`, so a new module is covered the day it enters the catalog.\n *\n * Deliberately the union across ALL modules, not the ones a given application selected: a principal\n * must not receive an application-wide credential for a provider it does not use either, and the\n * selected set is not knowable at the delivery call site without threading app config through it.\n * Stripping a path no module minted for this app is harmless — it is absent from the blob anyway.\n */\nexport function collectPerPrincipalSecretBlobPaths(): ReadonlySet<string> {\n const paths = new Set<string>();\n for (const module of INFRA_PROVIDER_MODULES) {\n for (const path of module.perPrincipalSecretBlobPaths) {\n paths.add(path);\n }\n }\n return paths;\n}\n\n/**\n * Build a `Map<InfraProvider, InfraProviderModule>` for the\n * canonical catalog. Callers store the result once at startup and\n * pass it to `materializeInfraSection` (digest derivation) or to\n * orchestrator paths that look up modules by `InfraProvider`.\n */\nexport function buildInfraProviderModuleMap(): ReadonlyMap<InfraProvider, InfraProviderModule> {\n const map = new Map<InfraProvider, InfraProviderModule>();\n for (const m of INFRA_PROVIDER_MODULES) {\n if (map.has(m.provider)) {\n throw new Error(\n `INFRA_PROVIDER_MODULES contains duplicate provider '${m.provider}' — ` +\n `each InfraProvider may have at most one module.`,\n );\n }\n map.set(m.provider, m);\n }\n return map;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * `@wildo-ai/platform-infra-providers` — concrete `InfraProviderModule`\n * catalog.\n *\n * Tier-portable: the modules import only `@wildo-ai/platform-config-lib`\n * (contracts) and have no DI / mongoose / axios runtime dependencies.\n * This lets both `platform-apps-manager` (orchestrator) and\n * `wildo-cli` (lockfile materializer) consume the same module\n * objects — apps-manager passes a real admin-client implementation\n * via `AppCredentialMintingContext.adminClient`; wildo-cli only\n * needs `module.plan()` for the lockfile digest.\n *\n * Each module is exported by name (no intermediary barrels per\n * platform/CLAUDE.md \"no intermediary index.ts barrels\"). The\n * `INFRA_PROVIDER_MODULES` map below is the canonical catalog —\n * consumers iterate it (or look up by `InfraProvider` value) instead\n * of importing modules one by one.\n */\n\nimport { InfraProvider, type InfraProviderModule } from '@wildo-ai/platform-config-lib';\n\nimport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nimport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nimport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nimport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nimport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\n// Object-storage + stateless infra.\nimport { SeaweedfsSelfInfraProviderModule } from './seaweedfs-self/seaweedfs-self.infra.module';\nimport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nimport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\nimport { ImmudbSelfInfraProviderModule } from './immudb-self/immudb-self.infra.module';\n\nexport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nexport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nexport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nexport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nexport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\nexport * from './seaweedfs-self/seaweedfs-self.infra.module';\nexport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nexport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\nexport * from './immudb-self/immudb-self.infra.module';\n\n/**\n * Canonical `InfraProvider` → `InfraProviderModule` catalog. Caller\n * (CLI, apps-manager) builds a `Map<InfraProvider, InfraProviderModule>`\n * from this constant when threading modules into\n * `materializeInfraSection`.\n *\n * **Why a const array instead of a `Map` literal**: arrays serialize\n * stably under tsc and roll up to a deterministic order. The\n * downstream `Map` is built once at program start; the catalog\n * itself is a value-level fixture.\n *\n * **Coverage** (Slice 5 baseline, 2026-05-10):\n * - `RABBITMQ_SELF`, `REDIS_SELF`, `POSTGRES_SELF`, `MONGODB_SELF`,\n * `MONGODB_ATLAS` — five stateful modules with mint/revoke\n * methods.\n * - `SEAWEEDFS_SELF`, `AWS_S3` — object storage (per-application buckets,\n * STS-confined sessions;\n * no per-app credentials). `AWS_S3` declares `unservableReason`\n * (no AWS STS path in the credential broker, #14), so it plans but is\n * not servable.\n * - `CLAMAV_SELF` — stateless infra (no auth, no per-app state;\n * `plan()` only).\n *\n * **NOT covered** (catalog entries without modules):\n * - `POSTGRES_MANAGED`, `POSTGRES_AWS_RDS`, `POSTGRES_GCP_CLOUD_SQL`,\n * `POSTGRES_AZURE_DATABASE`, `POSTGRES_SUPABASE`, `POSTGRES_NEON`,\n * `POSTGRES_RENDER` — managed-Postgres brand catalog entries\n * (Slice 4.B.0). No module yet; trigger = real customer.\n *\n * A declaration resolving to a provider outside\n * {@link collectServableInfraProviders} is REFUSED by `wildo config\n * validate`, `config sync` and `lock check` (#1693) — it no longer falls\n * through to an authored-entry digest.\n */\nexport const INFRA_PROVIDER_MODULES: ReadonlyArray<InfraProviderModule> = [\n RabbitmqSelfInfraProviderModule,\n RedisSelfInfraProviderModule,\n PostgresSelfInfraProviderModule,\n MongodbAtlasInfraProviderModule,\n MongodbSelfInfraProviderModule,\n SeaweedfsSelfInfraProviderModule,\n AwsS3InfraProviderModule,\n ClamavSelfInfraProviderModule,\n // #1696: one immudb database and one confined user per application, replacing the operator-credentialed\n // exemption under which every application logged in as the server's sysadmin.\n ImmudbSelfInfraProviderModule,\n];\n\n/**\n * Providers the platform serves WITHOUT a module in {@link INFRA_PROVIDER_MODULES}, because their\n * application credential is the operator's to supply rather than the catalogue's to mint.\n *\n * ## Why this is the one exception, and why it is a list of exemptions rather than of refusals\n *\n * The servable set is DERIVED from the catalogue ({@link collectServableInfraProviders}); a hand-kept\n * list of refused providers would silently admit every provider added later. So the only thing\n * written down by hand is the exception, and it must be argued for here, one entry at a time.\n *\n * EMPTY since #1696, and kept as the named place such an exemption would be argued. `IMMUDB_SELF` was the one entry:\n * the self-hosted audit store had no module, and every application on the server logged in as its sysadmin into\n * one shared database. Its module now mints one database and one confined user per application, which makes it\n * servable on its own — and REFUSED on a platform that holds no immudb admin credential, like every minting kind.\n */\nexport const OPERATOR_CREDENTIALED_INFRA_PROVIDERS: ReadonlySet<InfraProvider> = new Set<InfraProvider>();\n\n/**\n * The providers a `backingServices` declaration may resolve to — every module in the catalogue that\n * does not declare `unservableReason`, plus {@link OPERATOR_CREDENTIALED_INFRA_PROVIDERS}.\n *\n * The one source both lockfile projections (`wildo config sync`, `wildo lock check`) and\n * `wildo config validate` pass to the shared check in `@wildo-ai/platform-config-lib`\n * (`findUnservableBackingServiceDeclarations`), so all three refuse the same declarations (#1693).\n * Derived, so a module entering the catalogue makes its provider declarable the day it lands.\n */\nexport function collectServableInfraProviders(): ReadonlySet<InfraProvider> {\n const servable = new Set<InfraProvider>(OPERATOR_CREDENTIALED_INFRA_PROVIDERS);\n for (const module of INFRA_PROVIDER_MODULES) {\n if (module.unservableReason === undefined) servable.add(module.provider);\n }\n return servable;\n}\n\n/**\n * Every `Wildo_Application_Secrets` JSON path that ANY provider module can mint per runtime\n * principal — the union of the catalog's own static declarations.\n *\n * ## Why this is derived rather than written down\n *\n * The consumer is the secret-DELIVERY path in apps-manager: it strips exactly this set from the\n * application blob before overlaying a principal's own material, so a principal receives a\n * credential only where one was minted FOR IT. A hand-maintained copy at that consumer would be a\n * second source — add a provider that mints a new credential path and delivery keeps shipping the\n * APPLICATION's value for it, silently. That is the defect class this repo has paid for twice: the\n * party that CONSTRAINS is not the party that DECLARES.\n *\n * Derived from `INFRA_PROVIDER_MODULES`, so a new module is covered the day it enters the catalog.\n *\n * Deliberately the union across ALL modules, not the ones a given application selected: a principal\n * must not receive an application-wide credential for a provider it does not use either, and the\n * selected set is not knowable at the delivery call site without threading app config through it.\n * Stripping a path no module minted for this app is harmless — it is absent from the blob anyway.\n */\nexport function collectPerPrincipalSecretBlobPaths(): ReadonlySet<string> {\n const paths = new Set<string>();\n for (const module of INFRA_PROVIDER_MODULES) {\n for (const path of module.perPrincipalSecretBlobPaths) {\n paths.add(path);\n }\n }\n return paths;\n}\n\n/**\n * Build a `Map<InfraProvider, InfraProviderModule>` for the\n * canonical catalog. Callers store the result once at startup and\n * pass it to `materializeInfraSection` (digest derivation) or to\n * orchestrator paths that look up modules by `InfraProvider`.\n */\nexport function buildInfraProviderModuleMap(): ReadonlyMap<InfraProvider, InfraProviderModule> {\n const map = new Map<InfraProvider, InfraProviderModule>();\n for (const m of INFRA_PROVIDER_MODULES) {\n if (map.has(m.provider)) {\n throw new Error(\n `INFRA_PROVIDER_MODULES contains duplicate provider '${m.provider}' — ` +\n `each InfraProvider may have at most one module.`,\n );\n }\n map.set(m.provider, m);\n }\n return map;\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `SeaweedfsSelfInfraProviderModule` — the self-hosted object store (#2170, #2173).
|
|
3
|
+
*
|
|
4
|
+
* Implements `InfraProvider.SEAWEEDFS_SELF`. Each application authors its own bucket
|
|
5
|
+
* (`backingServices.s3.bucket`, recorded by apps-manager at registration, #1107), and every object key sits under
|
|
6
|
+
* `<authoredPrefix>applications/<applicationId>/…`.
|
|
7
|
+
*
|
|
8
|
+
* ## Who holds which credential
|
|
9
|
+
*
|
|
10
|
+
* - **The root key** (`secrets.json > storage`) is SeaweedFS's one static identity, `wildo-root`, rendered into the
|
|
11
|
+
* store's identity file by `renderSeaweedfsObjectStorageIdentityConfig`. It is delivered to **apps-manager only**:
|
|
12
|
+
* apps-manager creates buckets with it and exchanges it, through STS, for application credentials.
|
|
13
|
+
* - **Applications, minions, workers and the other platform services** receive no long-lived storage credential at
|
|
14
|
+
* all. apps-manager's `ObjectStorageStsBrokerService` issues each one a short-lived STS session, assuming the role
|
|
15
|
+
* the store's IAM file defines (`SEAWEEDFS_OBJECT_STORAGE_ROLE_ARN`) with an inline policy confined to
|
|
16
|
+
* `applications/<applicationId>/`. The confinement keys on the platform-minted id, never on the authored bucket
|
|
17
|
+
* prefix, which the application chooses and is therefore namespacing, not isolation.
|
|
18
|
+
*
|
|
19
|
+
* So there is no `mintAppCredentials` / `revokeAppCredentials` here: nothing long-lived is created per application,
|
|
20
|
+
* and a session expires by construction. STS needs no admin API, and belongs with the service holding the root key.
|
|
21
|
+
*
|
|
22
|
+
* ## The STS role is not optional on this store
|
|
23
|
+
*
|
|
24
|
+
* SeaweedFS refuses an `AssumeRole` without `RoleSessionName`, and the broker sends one only with a role (#2171), so
|
|
25
|
+
* `STORAGE_PROVIDER=seaweedfs` makes apps-manager derive the role from the provider
|
|
26
|
+
* (`resolvePlatformObjectStorageStsRoleArn`). The role, its trust policy (the root identity and nothing else) and its
|
|
27
|
+
* upper-bound policy are rendered by `renderSeaweedfsObjectStorageIamConfig`, never authored by hand.
|
|
28
|
+
*
|
|
29
|
+
* ## What the deployment lanes do with this plan (#2174)
|
|
30
|
+
*
|
|
31
|
+
* `dockerComposeServices` and `k8sResources` name the SeaweedFS service and manifest the compose and Kubernetes
|
|
32
|
+
* lanes render, and both lanes mount the two rendered files. Until #2174 lands those lanes still render the interim
|
|
33
|
+
* MinIO-compatible store (#2156).
|
|
34
|
+
*/
|
|
35
|
+
import { type InfraProviderModule } from '@wildo-ai/platform-config-lib';
|
|
36
|
+
/** The S3 (and STS) port of `weed server -s3`. */
|
|
37
|
+
export declare const SEAWEEDFS_S3_PORT = 8333;
|
|
38
|
+
export declare const SeaweedfsSelfInfraProviderModule: InfraProviderModule;
|
|
39
|
+
//# sourceMappingURL=seaweedfs-self.infra.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seaweedfs-self.infra.module.d.ts","sourceRoot":"","sources":["../../../src/seaweedfs-self/seaweedfs-self.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAKL,KAAK,mBAAmB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,eAAO,MAAM,gCAAgC,EAAE,mBA6B9C,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `SeaweedfsSelfInfraProviderModule` — the self-hosted object store (#2170, #2173).
|
|
3
|
+
*
|
|
4
|
+
* Implements `InfraProvider.SEAWEEDFS_SELF`. Each application authors its own bucket
|
|
5
|
+
* (`backingServices.s3.bucket`, recorded by apps-manager at registration, #1107), and every object key sits under
|
|
6
|
+
* `<authoredPrefix>applications/<applicationId>/…`.
|
|
7
|
+
*
|
|
8
|
+
* ## Who holds which credential
|
|
9
|
+
*
|
|
10
|
+
* - **The root key** (`secrets.json > storage`) is SeaweedFS's one static identity, `wildo-root`, rendered into the
|
|
11
|
+
* store's identity file by `renderSeaweedfsObjectStorageIdentityConfig`. It is delivered to **apps-manager only**:
|
|
12
|
+
* apps-manager creates buckets with it and exchanges it, through STS, for application credentials.
|
|
13
|
+
* - **Applications, minions, workers and the other platform services** receive no long-lived storage credential at
|
|
14
|
+
* all. apps-manager's `ObjectStorageStsBrokerService` issues each one a short-lived STS session, assuming the role
|
|
15
|
+
* the store's IAM file defines (`SEAWEEDFS_OBJECT_STORAGE_ROLE_ARN`) with an inline policy confined to
|
|
16
|
+
* `applications/<applicationId>/`. The confinement keys on the platform-minted id, never on the authored bucket
|
|
17
|
+
* prefix, which the application chooses and is therefore namespacing, not isolation.
|
|
18
|
+
*
|
|
19
|
+
* So there is no `mintAppCredentials` / `revokeAppCredentials` here: nothing long-lived is created per application,
|
|
20
|
+
* and a session expires by construction. STS needs no admin API, and belongs with the service holding the root key.
|
|
21
|
+
*
|
|
22
|
+
* ## The STS role is not optional on this store
|
|
23
|
+
*
|
|
24
|
+
* SeaweedFS refuses an `AssumeRole` without `RoleSessionName`, and the broker sends one only with a role (#2171), so
|
|
25
|
+
* `STORAGE_PROVIDER=seaweedfs` makes apps-manager derive the role from the provider
|
|
26
|
+
* (`resolvePlatformObjectStorageStsRoleArn`). The role, its trust policy (the root identity and nothing else) and its
|
|
27
|
+
* upper-bound policy are rendered by `renderSeaweedfsObjectStorageIamConfig`, never authored by hand.
|
|
28
|
+
*
|
|
29
|
+
* ## What the deployment lanes do with this plan (#2174)
|
|
30
|
+
*
|
|
31
|
+
* `dockerComposeServices` and `k8sResources` name the SeaweedFS service and manifest the compose and Kubernetes
|
|
32
|
+
* lanes render, and both lanes mount the two rendered files. Until #2174 lands those lanes still render the interim
|
|
33
|
+
* MinIO-compatible store (#2156).
|
|
34
|
+
*/
|
|
35
|
+
import { InfraCapability, InfraPlatformAdminConsumer, InfraProvider, PlatformObjectStorageProvider, } from '@wildo-ai/platform-config-lib';
|
|
36
|
+
/** The S3 (and STS) port of `weed server -s3`. */
|
|
37
|
+
export const SEAWEEDFS_S3_PORT = 8333;
|
|
38
|
+
export const SeaweedfsSelfInfraProviderModule = {
|
|
39
|
+
provider: InfraProvider.SEAWEEDFS_SELF,
|
|
40
|
+
supportedCapabilities: [InfraCapability.OBJECT_STORAGE],
|
|
41
|
+
/**
|
|
42
|
+
* No per-principal secret in the application blob: object-storage confinement is an STS session policy minted per
|
|
43
|
+
* request, the same model as AWS S3.
|
|
44
|
+
*/
|
|
45
|
+
perPrincipalSecretBlobPaths: [],
|
|
46
|
+
plan() {
|
|
47
|
+
return {
|
|
48
|
+
dockerComposeServices: ['seaweedfs'],
|
|
49
|
+
k8sResources: ['templates/infra/k8s/internal/seaweedfs/deployment.yaml.hbs'],
|
|
50
|
+
platformAdmin: {
|
|
51
|
+
envVars: {
|
|
52
|
+
STORAGE_PROVIDER: PlatformObjectStorageProvider.SEAWEEDFS,
|
|
53
|
+
STORAGE_ENDPOINT: 'seaweedfs',
|
|
54
|
+
STORAGE_PORT: String(SEAWEEDFS_S3_PORT),
|
|
55
|
+
STORAGE_USE_SSL: 'false',
|
|
56
|
+
},
|
|
57
|
+
// The store's root key, which apps-manager exchanges for STS sessions and nothing else holds.
|
|
58
|
+
secretEnvVars: ['STORAGE_ACCESS_KEY', 'STORAGE_SECRET_KEY'],
|
|
59
|
+
consumers: [InfraPlatformAdminConsumer.APPS_MANAGER],
|
|
60
|
+
},
|
|
61
|
+
// No `appRuntime`: storage holds no per-application SECRET (sessions are STS-issued by apps-manager). The bucket
|
|
62
|
+
// is per application, but it is addressing, recorded at registration (#1107), not a secret.
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=seaweedfs-self.infra.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seaweedfs-self.infra.module.js","sourceRoot":"","sources":["../../../src/seaweedfs-self/seaweedfs-self.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACb,6BAA6B,GAG9B,MAAM,+BAA+B,CAAC;AAEvC,kDAAkD;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,MAAM,CAAC,MAAM,gCAAgC,GAAwB;IACnE,QAAQ,EAAE,aAAa,CAAC,cAAc;IACtC,qBAAqB,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC;IAEvD;;;OAGG;IACH,2BAA2B,EAAE,EAAE;IAE/B,IAAI;QACF,OAAO;YACL,qBAAqB,EAAE,CAAC,WAAW,CAAC;YACpC,YAAY,EAAE,CAAC,4DAA4D,CAAC;YAC5E,aAAa,EAAE;gBACb,OAAO,EAAE;oBACP,gBAAgB,EAAE,6BAA6B,CAAC,SAAS;oBACzD,gBAAgB,EAAE,WAAW;oBAC7B,YAAY,EAAE,MAAM,CAAC,iBAAiB,CAAC;oBACvC,eAAe,EAAE,OAAO;iBACzB;gBACD,8FAA8F;gBAC9F,aAAa,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;gBAC3D,SAAS,EAAE,CAAC,0BAA0B,CAAC,YAAY,CAAC;aACrD;YACD,iHAAiH;YACjH,4FAA4F;SAC7F,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/**\n * `SeaweedfsSelfInfraProviderModule` — the self-hosted object store (#2170, #2173).\n *\n * Implements `InfraProvider.SEAWEEDFS_SELF`. Each application authors its own bucket\n * (`backingServices.s3.bucket`, recorded by apps-manager at registration, #1107), and every object key sits under\n * `<authoredPrefix>applications/<applicationId>/…`.\n *\n * ## Who holds which credential\n *\n * - **The root key** (`secrets.json > storage`) is SeaweedFS's one static identity, `wildo-root`, rendered into the\n * store's identity file by `renderSeaweedfsObjectStorageIdentityConfig`. It is delivered to **apps-manager only**:\n * apps-manager creates buckets with it and exchanges it, through STS, for application credentials.\n * - **Applications, minions, workers and the other platform services** receive no long-lived storage credential at\n * all. apps-manager's `ObjectStorageStsBrokerService` issues each one a short-lived STS session, assuming the role\n * the store's IAM file defines (`SEAWEEDFS_OBJECT_STORAGE_ROLE_ARN`) with an inline policy confined to\n * `applications/<applicationId>/`. The confinement keys on the platform-minted id, never on the authored bucket\n * prefix, which the application chooses and is therefore namespacing, not isolation.\n *\n * So there is no `mintAppCredentials` / `revokeAppCredentials` here: nothing long-lived is created per application,\n * and a session expires by construction. STS needs no admin API, and belongs with the service holding the root key.\n *\n * ## The STS role is not optional on this store\n *\n * SeaweedFS refuses an `AssumeRole` without `RoleSessionName`, and the broker sends one only with a role (#2171), so\n * `STORAGE_PROVIDER=seaweedfs` makes apps-manager derive the role from the provider\n * (`resolvePlatformObjectStorageStsRoleArn`). The role, its trust policy (the root identity and nothing else) and its\n * upper-bound policy are rendered by `renderSeaweedfsObjectStorageIamConfig`, never authored by hand.\n *\n * ## What the deployment lanes do with this plan (#2174)\n *\n * `dockerComposeServices` and `k8sResources` name the SeaweedFS service and manifest the compose and Kubernetes\n * lanes render, and both lanes mount the two rendered files. Until #2174 lands those lanes still render the interim\n * MinIO-compatible store (#2156).\n */\n\nimport {\n InfraCapability,\n InfraPlatformAdminConsumer,\n InfraProvider,\n PlatformObjectStorageProvider,\n type InfraProviderModule,\n type InfraProviderPlanContribution,\n} from '@wildo-ai/platform-config-lib';\n\n/** The S3 (and STS) port of `weed server -s3`. */\nexport const SEAWEEDFS_S3_PORT = 8333;\n\nexport const SeaweedfsSelfInfraProviderModule: InfraProviderModule = {\n provider: InfraProvider.SEAWEEDFS_SELF,\n supportedCapabilities: [InfraCapability.OBJECT_STORAGE],\n\n /**\n * No per-principal secret in the application blob: object-storage confinement is an STS session policy minted per\n * request, the same model as AWS S3.\n */\n perPrincipalSecretBlobPaths: [],\n\n plan(): InfraProviderPlanContribution {\n return {\n dockerComposeServices: ['seaweedfs'],\n k8sResources: ['templates/infra/k8s/internal/seaweedfs/deployment.yaml.hbs'],\n platformAdmin: {\n envVars: {\n STORAGE_PROVIDER: PlatformObjectStorageProvider.SEAWEEDFS,\n STORAGE_ENDPOINT: 'seaweedfs',\n STORAGE_PORT: String(SEAWEEDFS_S3_PORT),\n STORAGE_USE_SSL: 'false',\n },\n // The store's root key, which apps-manager exchanges for STS sessions and nothing else holds.\n secretEnvVars: ['STORAGE_ACCESS_KEY', 'STORAGE_SECRET_KEY'],\n consumers: [InfraPlatformAdminConsumer.APPS_MANAGER],\n },\n // No `appRuntime`: storage holds no per-application SECRET (sessions are STS-issued by apps-manager). The bucket\n // is per application, but it is addressing, recorded at registration (#1107), not a secret.\n };\n },\n};\n"]}
|