@wildo-ai/platform-infra-providers 1.1.11 → 1.1.13
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 +11 -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 +14 -12
- package/dist/esm/aws-s3/aws-s3.infra.module.js.map +1 -1
- package/dist/esm/clamav-self/clamav-self.infra.module.d.ts +1 -2
- package/dist/esm/clamav-self/clamav-self.infra.module.d.ts.map +1 -1
- package/dist/esm/clamav-self/clamav-self.infra.module.js +1 -2
- package/dist/esm/clamav-self/clamav-self.infra.module.js.map +1 -1
- package/dist/esm/immudb-self/immudb-self.infra.module.d.ts.map +1 -1
- package/dist/esm/immudb-self/immudb-self.infra.module.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/minio-self/minio-self.infra.module.d.ts +1 -4
- package/dist/esm/minio-self/minio-self.infra.module.d.ts.map +1 -1
- package/dist/esm/minio-self/minio-self.infra.module.js +1 -4
- package/dist/esm/minio-self/minio-self.infra.module.js.map +1 -1
- package/dist/esm/mongodb-atlas/mongodb-atlas.infra.module.d.ts +1 -2
- package/dist/esm/mongodb-atlas/mongodb-atlas.infra.module.d.ts.map +1 -1
- package/dist/esm/mongodb-atlas/mongodb-atlas.infra.module.js +1 -2
- package/dist/esm/mongodb-atlas/mongodb-atlas.infra.module.js.map +1 -1
- package/dist/esm/mongodb-self/mongodb-self.infra.module.d.ts +1 -2
- package/dist/esm/mongodb-self/mongodb-self.infra.module.d.ts.map +1 -1
- package/dist/esm/mongodb-self/mongodb-self.infra.module.js +1 -2
- package/dist/esm/mongodb-self/mongodb-self.infra.module.js.map +1 -1
- package/dist/esm/postgres-self/postgres-self.infra.module.d.ts +1 -2
- package/dist/esm/postgres-self/postgres-self.infra.module.d.ts.map +1 -1
- package/dist/esm/postgres-self/postgres-self.infra.module.js +1 -2
- package/dist/esm/postgres-self/postgres-self.infra.module.js.map +1 -1
- package/dist/esm/rabbitmq-self/rabbitmq-self.infra.module.d.ts +1 -2
- package/dist/esm/rabbitmq-self/rabbitmq-self.infra.module.d.ts.map +1 -1
- package/dist/esm/rabbitmq-self/rabbitmq-self.infra.module.js +4 -7
- package/dist/esm/rabbitmq-self/rabbitmq-self.infra.module.js.map +1 -1
- package/dist/esm/redis-self/redis-self.infra.module.d.ts +1 -2
- package/dist/esm/redis-self/redis-self.infra.module.d.ts.map +1 -1
- package/dist/esm/redis-self/redis-self.infra.module.js +1 -2
- package/dist/esm/redis-self/redis-self.infra.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/aws-s3/__tests__/aws-s3.infra.module.test.ts +1 -2
- package/src/aws-s3/aws-s3.infra.module.ts +14 -12
- package/src/clamav-self/__tests__/clamav-self.infra.module.test.ts +1 -2
- package/src/clamav-self/clamav-self.infra.module.ts +1 -2
- package/src/index.ts +2 -2
- package/src/minio-self/__tests__/minio-self.infra.module.test.ts +1 -2
- package/src/minio-self/minio-self.infra.module.ts +1 -4
- package/src/mongodb-atlas/__tests__/mongodb-atlas.infra.module.test.ts +3 -2
- package/src/mongodb-atlas/mongodb-atlas.infra.module.ts +1 -2
- package/src/mongodb-self/__tests__/mongodb-self.infra.module.test.ts +11 -7
- package/src/mongodb-self/mongodb-self.infra.module.ts +1 -2
- package/src/postgres-self/__tests__/postgres-self.infra.module.test.ts +3 -4
- package/src/postgres-self/postgres-self.infra.module.ts +1 -2
- package/src/rabbitmq-self/__tests__/rabbitmq-self.infra.module.test.ts +2 -3
- package/src/rabbitmq-self/rabbitmq-self.infra.module.ts +4 -7
- package/src/redis-self/__tests__/redis-self.infra.module.test.ts +1 -2
- package/src/redis-self/redis-self.infra.module.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildo-ai/platform-infra-providers",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "Concrete InfraProviderModule catalog (RabbitMQ_Self, Redis_Self, Postgres_Self, MongoDB_Atlas, MongoDB_Self) — tier-portable, importable by both platform-apps-manager (orchestrator) and wildo-cli (lockfile materializer). Slice 2.5c-1 of infra-provider-planner.md.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Wildo AI",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
"test:watch": "vitest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wildo-ai/platform-config-lib": "1.1.
|
|
33
|
+
"@wildo-ai/platform-config-lib": "1.1.13"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"zod": "^4.
|
|
36
|
+
"zod": "^4.6.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@swc/core": "^1",
|
|
39
|
+
"@swc/core": "^1.15.13",
|
|
40
40
|
"@types/node": "^24.0.15",
|
|
41
|
-
"rimraf": "^6.
|
|
41
|
+
"rimraf": "^6.1.4",
|
|
42
42
|
"tsc-alias": "1.8.16",
|
|
43
43
|
"tsc-watch": "7.2.1",
|
|
44
44
|
"typescript": "5.9.3",
|
|
45
|
-
"vitest": "^1.
|
|
45
|
+
"vitest": "^4.1.12"
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `AwsS3InfraProviderModule` — seventh concrete `InfraProviderModule
|
|
3
|
-
* (Slice 5.1 of `infra-provider-planner.md`).
|
|
2
|
+
* `AwsS3InfraProviderModule` — seventh concrete `InfraProviderModule`.
|
|
4
3
|
*
|
|
5
4
|
* Implements the `AWS_S3` `InfraProvider`. Shares the one-bucket,
|
|
6
5
|
* prefix-namespaced object layout of `MinioSelfInfraProviderModule` —
|
|
@@ -17,10 +16,13 @@
|
|
|
17
16
|
* obtain short-lived, prefix-confined credentials from apps-manager.
|
|
18
17
|
*
|
|
19
18
|
* That replacement is implemented for **MinIO only**. apps-manager's
|
|
20
|
-
* `ObjectStorageStsBrokerService` speaks
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* `ObjectStorageStsBrokerService` speaks STS `AssumeRole` with an inline
|
|
20
|
+
* session policy. Since #2172 it names a role when one is configured
|
|
21
|
+
* (`platformStorage.stsRoleArn` → `STORAGE_STS_ROLE_ARN`), and refuses to
|
|
22
|
+
* issue against AWS STS without one. What still stops an `AWS_S3`
|
|
23
|
+
* deployment is #14: apps-manager admits only `STORAGE_PROVIDER=minio`,
|
|
24
|
+
* the STS signing region is fixed at `us-east-1` rather than the regional
|
|
25
|
+
* endpoint's, and the path is unproven against a real AWS account.
|
|
24
26
|
*
|
|
25
27
|
* No environment selects this provider today (every example uses
|
|
26
28
|
* `BackingServiceSource.SELF` → MinIO), which is why this is recorded as
|
|
@@ -28,8 +30,7 @@
|
|
|
28
30
|
* `provider: 'aws'` still RESOLVE here, but since #1693 such a
|
|
29
31
|
* declaration is refused at authoring time: `unservableReason` below
|
|
30
32
|
* takes this provider out of the servable set until the AWS STS path
|
|
31
|
-
* exists.
|
|
32
|
-
* `.claude/plans/object-storage-root-credential-distribution.md`.
|
|
33
|
+
* exists (#14).
|
|
33
34
|
*
|
|
34
35
|
* The module still reuses the `STORAGE_*` env contract for the
|
|
35
36
|
* NON-secret values (endpoint, region, bucket, provider); it is only the
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
* credential-rotation safety dissolves instead of needing a design. The
|
|
58
59
|
* AWS equivalent is the same shape: `AssumeRole` against a role ARN the
|
|
59
60
|
* operator supplies, with a session policy confining the principal to
|
|
60
|
-
* `applications/<applicationId>/`.
|
|
61
|
-
*
|
|
61
|
+
* `applications/<applicationId>/`. The broker takes that role since #2172;
|
|
62
|
+
* the rest of the gap is #14 (see above).
|
|
62
63
|
*/
|
|
63
64
|
|
|
64
65
|
import {
|
|
@@ -79,8 +80,9 @@ export const AwsS3InfraProviderModule: InfraProviderModule = {
|
|
|
79
80
|
* `lock check` until this field is deleted — in the change that teaches the broker AWS STS (#14).
|
|
80
81
|
*/
|
|
81
82
|
unservableReason:
|
|
82
|
-
'The object-storage credential broker
|
|
83
|
-
+ 'would receive no
|
|
83
|
+
'The object-storage credential broker is wired and proven only against a MinIO-compatible store: apps-manager '
|
|
84
|
+
+ 'admits only STORAGE_PROVIDER=minio and signs STS for us-east-1, so an application on AWS S3 would receive no '
|
|
85
|
+
+ 'storage credential (#14).',
|
|
84
86
|
|
|
85
87
|
/**
|
|
86
88
|
* Shared bucket, shared access key — no per-app credential is minted, so there is nothing
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ClamavSelfInfraProviderModule` — eighth concrete `InfraProviderModule
|
|
3
|
-
* (Slice 5.2 of `infra-provider-planner.md`).
|
|
2
|
+
* `ClamavSelfInfraProviderModule` — eighth concrete `InfraProviderModule`.
|
|
4
3
|
*
|
|
5
4
|
* Implements the `CLAMAV_SELF` `InfraProvider`. **Stateless**: ClamAV
|
|
6
5
|
* is a network virus-scanning service with no auth and no per-tenant
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@wildo-ai/platform-infra-providers` — concrete `InfraProviderModule`
|
|
3
|
-
* catalog
|
|
3
|
+
* catalog.
|
|
4
4
|
*
|
|
5
5
|
* Tier-portable: the modules import only `@wildo-ai/platform-config-lib`
|
|
6
6
|
* (contracts) and have no DI / mongoose / axios runtime dependencies.
|
|
@@ -24,7 +24,7 @@ import { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.modu
|
|
|
24
24
|
import { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';
|
|
25
25
|
import { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';
|
|
26
26
|
import { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';
|
|
27
|
-
//
|
|
27
|
+
// Object-storage + stateless infra.
|
|
28
28
|
import { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';
|
|
29
29
|
import { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';
|
|
30
30
|
import { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `MinioSelfInfraProviderModule` — sixth concrete `InfraProviderModule`
|
|
3
|
-
* (
|
|
4
|
-
* Slice 2 / 4.B pattern to object storage).
|
|
3
|
+
* (generalizing the module pattern to object storage).
|
|
5
4
|
*
|
|
6
5
|
* Implements the `MINIO_SELF` `InfraProvider`. One shared MinIO bucket
|
|
7
6
|
* serves every application; the object-key tree is namespaced
|
|
@@ -56,8 +55,6 @@
|
|
|
56
55
|
* but applications DO receive a per-application storage credential at
|
|
57
56
|
* runtime, from apps-manager. "No app-scoped audience in this module" is
|
|
58
57
|
* not "no app-scoped credential in the system".
|
|
59
|
-
*
|
|
60
|
-
* See `.claude/plans/object-storage-root-credential-distribution.md`.
|
|
61
58
|
*/
|
|
62
59
|
|
|
63
60
|
import {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tests for `MongodbAtlasInfraProviderModule
|
|
3
|
-
* `infra-provider-planner.md`).
|
|
2
|
+
* Tests for `MongodbAtlasInfraProviderModule`.
|
|
4
3
|
*/
|
|
5
4
|
|
|
6
5
|
import { describe, expect, it, vi } from 'vitest';
|
|
@@ -243,6 +242,7 @@ describe('MongodbAtlasInfraProviderModule per-principal path (#1694)', () => {
|
|
|
243
242
|
// same derivation as the self-hosted module, in Atlas's action vocabulary. No database-wide entry.
|
|
244
243
|
expect(call.privileges).toEqual([
|
|
245
244
|
{ resource: { db: 'wonder_todos', collection: 'applicationDataKeys' }, actions: ['FIND'] },
|
|
245
|
+
{ resource: { db: 'wonder_todos', collection: 'applicationProviderCredentials' }, actions: ['FIND'] },
|
|
246
246
|
{ resource: { db: 'wonder_todos', collection: 'applications' }, actions: ['FIND'] },
|
|
247
247
|
{ resource: { db: 'wonder_todos', collection: 'jobExecutions' }, actions: ['FIND'] },
|
|
248
248
|
{ resource: { db: 'wonder_todos', collection: 'jobPayloadStorage' }, actions: ['FIND'] },
|
|
@@ -250,6 +250,7 @@ describe('MongodbAtlasInfraProviderModule per-principal path (#1694)', () => {
|
|
|
250
250
|
{ resource: { db: 'wonder_todos', collection: 'auditLogs' }, actions: ['INSERT', 'FIND'] },
|
|
251
251
|
{ resource: { db: 'wonder_todos', collection: 'jobPayloadStorage' }, actions: ['INSERT', 'FIND'] },
|
|
252
252
|
{ resource: { db: 'wonder_todos', collection: 'applicationDataKeys' }, actions: ['INSERT', 'FIND', 'UPDATE'] },
|
|
253
|
+
{ resource: { db: 'wonder_todos', collection: 'applicationProviderCredentials' }, actions: ['INSERT', 'FIND', 'UPDATE'] },
|
|
253
254
|
{ resource: { db: 'wonder_todos', collection: 'jobExecutions' }, actions: ['INSERT', 'FIND', 'UPDATE'] },
|
|
254
255
|
]);
|
|
255
256
|
expect(result.secretBlobValues).toEqual({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `MongodbAtlasInfraProviderModule` — fourth concrete `InfraProviderModule`
|
|
3
|
-
* (
|
|
4
|
-
* 2 / 4.B.1 / 4.B.2 pattern to MongoDB Atlas).
|
|
3
|
+
* (generalizing the RabbitMQ / Redis / PostgreSQL module pattern to MongoDB Atlas).
|
|
5
4
|
*
|
|
6
5
|
* Implements the `MONGODB_ATLAS` `InfraProvider` over the
|
|
7
6
|
* `IMongoAtlasClient` transport (Atlas REST API + digest auth, exposed
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tests for `MongodbSelfInfraProviderModule
|
|
3
|
-
* `infra-provider-planner.md`).
|
|
2
|
+
* Tests for `MongodbSelfInfraProviderModule`.
|
|
4
3
|
*/
|
|
5
4
|
|
|
6
5
|
import { describe, expect, it, vi } from 'vitest';
|
|
@@ -25,8 +24,8 @@ import { MongodbSelfInfraProviderModule, buildMinionMongodbPrivileges } from '..
|
|
|
25
24
|
function makeAdminClientStub(): IMongoSelfAdminClient & {
|
|
26
25
|
upsertApplicationDatabaseUserSpy: ReturnType<typeof vi.fn>;
|
|
27
26
|
deleteApplicationDatabaseUserSpy: ReturnType<typeof vi.fn>;
|
|
28
|
-
upsertCollectionScopedDatabaseUserSpy: Mock<
|
|
29
|
-
dropCollectionScopedDatabaseUserSpy: Mock<
|
|
27
|
+
upsertCollectionScopedDatabaseUserSpy: Mock<(call: CollectionScopedUpsertCall) => Promise<undefined>>;
|
|
28
|
+
dropCollectionScopedDatabaseUserSpy: Mock<(call: CollectionScopedDropCall) => Promise<undefined>>;
|
|
30
29
|
} {
|
|
31
30
|
const upsertApplicationDatabaseUserSpy = vi.fn().mockResolvedValue(undefined);
|
|
32
31
|
const deleteApplicationDatabaseUserSpy = vi.fn().mockResolvedValue(undefined);
|
|
@@ -316,6 +315,7 @@ describe('MongodbSelfInfraProviderModule per-principal users (Step 3 / R1 / D14)
|
|
|
316
315
|
// updates through `findOneAndUpdate`, which is Unauthorized without it.
|
|
317
316
|
expect(call.privileges).toEqual([
|
|
318
317
|
{ resource: { db: 'wonder-todos', collection: 'applicationDataKeys' }, actions: ['find'] },
|
|
318
|
+
{ resource: { db: 'wonder-todos', collection: 'applicationProviderCredentials' }, actions: ['find'] },
|
|
319
319
|
{ resource: { db: 'wonder-todos', collection: 'applications' }, actions: ['find'] },
|
|
320
320
|
{ resource: { db: 'wonder-todos', collection: 'jobExecutions' }, actions: ['find'] },
|
|
321
321
|
{ resource: { db: 'wonder-todos', collection: 'jobPayloadStorage' }, actions: ['find'] },
|
|
@@ -324,6 +324,7 @@ describe('MongodbSelfInfraProviderModule per-principal users (Step 3 / R1 / D14)
|
|
|
324
324
|
{ resource: { db: 'wonder-todos', collection: 'auditLogs' }, actions: ['insert', 'find'] },
|
|
325
325
|
{ resource: { db: 'wonder-todos', collection: 'jobPayloadStorage' }, actions: ['insert', 'find'] },
|
|
326
326
|
{ resource: { db: 'wonder-todos', collection: 'applicationDataKeys' }, actions: ['insert', 'find', 'update'] },
|
|
327
|
+
{ resource: { db: 'wonder-todos', collection: 'applicationProviderCredentials' }, actions: ['insert', 'find', 'update'] },
|
|
327
328
|
{ resource: { db: 'wonder-todos', collection: 'jobExecutions' }, actions: ['insert', 'find', 'update'] },
|
|
328
329
|
]);
|
|
329
330
|
});
|
|
@@ -370,8 +371,9 @@ describe('MongodbSelfInfraProviderModule per-principal users (Step 3 / R1 / D14)
|
|
|
370
371
|
it('REFUSES a named principal with no grants rather than falling back to the wide user', async () => {
|
|
371
372
|
// The failure mode this guards: falling back would hand a minion
|
|
372
373
|
// `readWrite` + `dbAdmin` on the whole database through a code path that
|
|
373
|
-
// looks like it is doing the narrow thing.
|
|
374
|
-
// is
|
|
374
|
+
// looks like it is doing the narrow thing. A minion that declared no
|
|
375
|
+
// `resourceAccess` is passed an explicit EMPTY grant by the orchestrator and
|
|
376
|
+
// gets the engine floor (#1771); a missing grant here is a caller defect.
|
|
375
377
|
const admin = makeAdmin();
|
|
376
378
|
await expect(MongodbSelfInfraProviderModule.mintAppCredentials!({
|
|
377
379
|
...baseContext, adminClient: admin, principal: MINION,
|
|
@@ -403,19 +405,21 @@ describe('MongodbSelfInfraProviderModule per-principal users (Step 3 / R1 / D14)
|
|
|
403
405
|
};
|
|
404
406
|
expect(privileges).toEqual([
|
|
405
407
|
{ resource: { db: 'wonder-todos', collection: 'applicationDataKeys' }, actions: ['find'] },
|
|
408
|
+
{ resource: { db: 'wonder-todos', collection: 'applicationProviderCredentials' }, actions: ['find'] },
|
|
406
409
|
{ resource: { db: 'wonder-todos', collection: 'applications' }, actions: ['find'] },
|
|
407
410
|
{ resource: { db: 'wonder-todos', collection: 'jobExecutions' }, actions: ['find'] },
|
|
408
411
|
{ resource: { db: 'wonder-todos', collection: 'jobPayloadStorage' }, actions: ['find'] },
|
|
409
412
|
{ resource: { db: 'wonder-todos', collection: 'auditLogs' }, actions: ['insert', 'find'] },
|
|
410
413
|
{ resource: { db: 'wonder-todos', collection: 'jobPayloadStorage' }, actions: ['insert', 'find'] },
|
|
411
414
|
{ resource: { db: 'wonder-todos', collection: 'applicationDataKeys' }, actions: ['insert', 'find', 'update'] },
|
|
415
|
+
{ resource: { db: 'wonder-todos', collection: 'applicationProviderCredentials' }, actions: ['insert', 'find', 'update'] },
|
|
412
416
|
{ resource: { db: 'wonder-todos', collection: 'jobExecutions' }, actions: ['insert', 'find', 'update'] },
|
|
413
417
|
]);
|
|
414
418
|
// The property the original pin existed for, asserted directly rather than
|
|
415
419
|
// implied by an empty list: never database-wide, and never a mutating verb
|
|
416
420
|
// on anything the declaration did not name.
|
|
417
421
|
expect(privileges.every((p) => p.resource.collection !== '')).toBe(true);
|
|
418
|
-
expect(privileges.filter((p) => !['jobExecutions', 'applicationDataKeys'].includes(p.resource.collection)).flatMap((p) => p.actions)).not.toContain('update');
|
|
422
|
+
expect(privileges.filter((p) => !['jobExecutions', 'applicationDataKeys', 'applicationProviderCredentials'].includes(p.resource.collection)).flatMap((p) => p.actions)).not.toContain('update');
|
|
419
423
|
expect(privileges.flatMap((p) => p.actions)).not.toContain('remove');
|
|
420
424
|
});
|
|
421
425
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `MongodbSelfInfraProviderModule` — fifth concrete `InfraProviderModule`
|
|
3
|
-
* (
|
|
4
|
-
* pattern to self-managed MongoDB).
|
|
3
|
+
* (generalizing the pattern to self-managed MongoDB).
|
|
5
4
|
*
|
|
6
5
|
* Implements the `MONGODB_SELF` `InfraProvider` over the
|
|
7
6
|
* `IMongoSelfAdminClient` transport (admin-side mongoose connection,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tests for `PostgresSelfInfraProviderModule
|
|
3
|
-
* `infra-provider-planner.md`).
|
|
2
|
+
* Tests for `PostgresSelfInfraProviderModule`.
|
|
4
3
|
*
|
|
5
4
|
* Goals:
|
|
6
5
|
* - Pin the `plan()` shape so a future regression that drops e.g.
|
|
@@ -291,9 +290,9 @@ describe('PostgresSelfInfraProviderModule — per-principal table-scoped role',
|
|
|
291
290
|
// The authored declaration, plus the engine floor `deriveMinionDatabaseGrants`
|
|
292
291
|
// adds — `applications`, which every APPLICATION-scoped operation reads before
|
|
293
292
|
// it reaches a declared table, and which no `resourceAccess` can express.
|
|
294
|
-
expect(call.readTables).toEqual(['applicationDataKeys', 'applications', 'jobExecutions', 'jobPayloadStorage', 'todos']);
|
|
293
|
+
expect(call.readTables).toEqual(['applicationDataKeys', 'applicationProviderCredentials', 'applications', 'jobExecutions', 'jobPayloadStorage', 'todos']);
|
|
295
294
|
expect(call.appendTables).toEqual(['auditLogs', 'jobPayloadStorage']);
|
|
296
|
-
expect(call.maintainTables).toEqual(['applicationDataKeys', 'jobExecutions']);
|
|
295
|
+
expect(call.maintainTables).toEqual(['applicationDataKeys', 'applicationProviderCredentials', 'jobExecutions']);
|
|
297
296
|
// `write` does NOT widen into `read` — the axes stay exactly as declared,
|
|
298
297
|
// which is the property that makes the authored declaration describe the
|
|
299
298
|
// outcome. Asserting `readTables` does not contain 'events' is the half
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `PostgresSelfInfraProviderModule` — third concrete `InfraProviderModule`
|
|
3
|
-
* (
|
|
4
|
-
* Slice 2 / 4.B.1 pattern).
|
|
3
|
+
* (generalizing the RabbitMQ / Redis module pattern).
|
|
5
4
|
*
|
|
6
5
|
* Implements the `POSTGRES_SELF` `InfraProvider` over the
|
|
7
6
|
* `IPostgresAdminClient` transport (raw `pg` Pool against the
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tests for `RabbitmqSelfInfraProviderModule
|
|
3
|
-
* `infra-provider-planner.md`).
|
|
2
|
+
* Tests for `RabbitmqSelfInfraProviderModule`.
|
|
4
3
|
*
|
|
5
4
|
* Goals:
|
|
6
5
|
* - Pin the `plan()` shape so a future regression that drops e.g.
|
|
@@ -227,7 +226,7 @@ describe('RabbitmqSelfInfraProviderModule.mintAppCredentials()', () => {
|
|
|
227
226
|
expect(admin.setPermissionsSpy.mock.calls[0]![0]).toBe('/');
|
|
228
227
|
});
|
|
229
228
|
|
|
230
|
-
// Per-app-vhost cron delivery
|
|
229
|
+
// Per-app-vhost cron delivery.
|
|
231
230
|
it('per-app vhost: grants the crontabs publisher publish-only access on the app vhost, scoped to the app queue namespace', async () => {
|
|
232
231
|
const admin = makeAdminClientStub();
|
|
233
232
|
await RabbitmqSelfInfraProviderModule.mintAppCredentials!({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `RabbitmqSelfInfraProviderModule` — first concrete `InfraProviderModule
|
|
3
|
-
* (Slices 1–2.5 of `infra-provider-planner.md`).
|
|
2
|
+
* `RabbitmqSelfInfraProviderModule` — first concrete `InfraProviderModule`.
|
|
4
3
|
*
|
|
5
4
|
* Implements the `RABBITMQ_SELF` `InfraProvider` over the
|
|
6
5
|
* `IRabbitMQManagementClient` transport (raw HTTP `PUT /api/users` etc.,
|
|
@@ -147,16 +146,14 @@ const PER_PRINCIPAL_SECRET_BLOB_PATHS: ReadonlyArray<string> = [RABBITMQ_USERNAM
|
|
|
147
146
|
* `AppCredentialMintingContext.applicationConfigInputs` to read the
|
|
148
147
|
* optional per-app virtual host. Documented here as the public
|
|
149
148
|
* contract: the orchestrator supplies the vhost via this key, the
|
|
150
|
-
* module reads it via this key.
|
|
151
|
-
* `infra-provider-planner.md`.
|
|
149
|
+
* module reads it via this key.
|
|
152
150
|
*/
|
|
153
151
|
const VHOST_INPUT_KEY = 'vhost';
|
|
154
152
|
|
|
155
153
|
/**
|
|
156
154
|
* Key the module looks for in
|
|
157
155
|
* `PlatformServiceCredentialMintingContext.secretInputs` to read the
|
|
158
|
-
* orchestrator-supplied platform-service password.
|
|
159
|
-
* of `infra-provider-planner.md` — extracted as a constant for
|
|
156
|
+
* orchestrator-supplied platform-service password. Extracted as a constant for
|
|
160
157
|
* symmetry with `RABBITMQ_PASSWORD_PATH` (used by `mintAppCredentials`),
|
|
161
158
|
* so a future rename touches one site instead of drifting silently.
|
|
162
159
|
*/
|
|
@@ -460,7 +457,7 @@ export const RabbitmqSelfInfraProviderModule: InfraProviderModule = {
|
|
|
460
457
|
read: readRegex,
|
|
461
458
|
});
|
|
462
459
|
|
|
463
|
-
// Per-app-vhost cron delivery
|
|
460
|
+
// Per-app-vhost cron delivery.
|
|
464
461
|
//
|
|
465
462
|
// A per-app vhost is a HARD broker isolation boundary: the platform
|
|
466
463
|
// cron/minion publisher (`platform_crontabs_batches_manager`) — a single
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `RedisSelfInfraProviderModule` — second concrete `InfraProviderModule`
|
|
3
|
-
* (
|
|
4
|
-
* Slice 2 `RabbitmqSelfInfraProviderModule` pattern).
|
|
3
|
+
* (generalizing the `RabbitmqSelfInfraProviderModule` pattern).
|
|
5
4
|
*
|
|
6
5
|
* Implements the `REDIS_SELF` `InfraProvider` over the
|
|
7
6
|
* `IRedisAclClient` transport (Valkey/Redis ACL commands, exposed by
|