@reventlessdev/reventless-aws 3.0.0-alpha.393 → 3.0.0-alpha.395
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.395 (2026-10-22)
|
|
7
|
+
|
|
8
|
+
* feat(aws)!: the host shell's config.json names the identity provider under the neutral keys only ([6ce24ba](https://github.com/ReventlessDev/reventless-core/commit/6ce24ba7dde27da02f76f7f9f6284ad09a48f15a))
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **local:** the local platform provisions an identity provider over the accounts file ([1a46867](https://github.com/ReventlessDev/reventless-core/commit/1a46867ac391b3b4a2d6973606d782547190dcb8))
|
|
12
|
+
|
|
13
|
+
### BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* a reader of the host shell's config.json that only knows cognitoClientId
|
|
16
|
+
or cognitoUserPoolId finds neither; read identityProviderClientId and identityProviderId.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# 3.0.0-alpha.394 (2026-10-22)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **local:** the local platform provisions an identity provider over the accounts file ([1a46867](https://github.com/ReventlessDev/reventless-core/commit/1a46867ac391b3b4a2d6973606d782547190dcb8))
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
# 3.0.0-alpha.393 (2026-10-21)
|
|
7
28
|
|
|
8
29
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-aws",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.395",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
"uuid": "^13.0.0",
|
|
24
24
|
"yaml": "^2.8.3",
|
|
25
25
|
"@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.33",
|
|
26
|
+
"@reventlessdev/rescript-effect": "1.0.0-alpha.1",
|
|
26
27
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.13",
|
|
27
28
|
"@reventlessdev/rescript-node": "2.0.0-alpha.23",
|
|
28
|
-
"@reventlessdev/rescript-effect": "1.0.0-alpha.1",
|
|
29
29
|
"@reventlessdev/rescript-pulumi-aws": "3.0.0-alpha.31",
|
|
30
30
|
"@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
|
|
31
31
|
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
32
32
|
"@reventlessdev/rescript-web": "1.0.0-alpha.8",
|
|
33
|
-
"@reventlessdev/reventless-
|
|
34
|
-
"@reventlessdev/reventless-postgres": "3.0.0-alpha.168",
|
|
33
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.306",
|
|
35
34
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.42",
|
|
36
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.
|
|
37
|
-
"@reventlessdev/reventless-
|
|
35
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.175",
|
|
36
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.203",
|
|
37
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.170"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"rescript": "12.3.1",
|
package/src/Platform.res
CHANGED
|
@@ -1287,6 +1287,10 @@ module MakeWithConfig = (
|
|
|
1287
1287
|
// door: unlike geocoding, a browser has no business sending mail from the
|
|
1288
1288
|
// deployment's identity. Unset ⇒ no export, no grant.
|
|
1289
1289
|
messagingSender?: ReventlessInfra.Platform.messagingSender,
|
|
1290
|
+
// Ignored here: an in-process provider cannot reach a Lambda, and no
|
|
1291
|
+
// pool-backed handle exists yet. The deploy gate refuses a plugin that
|
|
1292
|
+
// declares the need, naming this.
|
|
1293
|
+
identityProvider?: Reventless.IdentityProvider.t,
|
|
1290
1294
|
// Optional object store for direct-to-S3 uploads, as returned by
|
|
1291
1295
|
// `Capability_ObjectStore_S3.make`. When set, the deploy registers it with
|
|
1292
1296
|
// the platform's one Upload service (`Upload_Presign_S3`) under the `uploads`
|
|
@@ -2375,7 +2379,7 @@ module MakeWithConfig = (
|
|
|
2375
2379
|
->Pulumi.Output.apply((((domainEp, platformEp, poolId, clientId), eventsEpOpt)) => {
|
|
2376
2380
|
// `authMode` stays `"cognito"`: it is a value naming which provider
|
|
2377
2381
|
// authenticates this deployment, and that is true. The identity *keys*
|
|
2378
|
-
//
|
|
2382
|
+
// are provider-neutral — see [Util_ShellConfig.identityFields].
|
|
2379
2383
|
let computed =
|
|
2380
2384
|
[
|
|
2381
2385
|
("apiEndpoint", JSON.Encode.string(domainEp)),
|
|
@@ -32,31 +32,20 @@ let modeOptions = (mode: Platform.viewMode): array<(string, JSON.t)> =>
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
The identity fields a shell reads,
|
|
35
|
+
The identity fields a shell reads. The concept is not AWS-specific, so a second
|
|
36
|
+
cloud's adapter meets the same names.
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
The `cognitoUserPoolId` / `cognitoClientId` pair travelled beside these through
|
|
39
|
+
the rename, because a shell reads `config.json` at runtime and a bundle that
|
|
40
|
+
cannot find its client id gets `None` and a login that silently fails. It went
|
|
41
|
+
once every pinned shell read these names (host shell 3.0.0-alpha.122 and later).
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
where the served bundle and the served config disagree. `cognitoClientId` is read
|
|
44
|
-
into an `option`: a bundle that cannot find its key does not error, it gets
|
|
45
|
-
`None`, and login, silent refresh and token refresh all quietly fall through —
|
|
46
|
-
the window is a total auth outage that reports nothing.
|
|
47
|
-
|
|
48
|
-
Writing both removes the ordering dependency rather than managing it: any bundle,
|
|
49
|
-
old or new or stale in a CDN, finds one it understands. The `cognito*` pair goes
|
|
50
|
-
once the shell that prefers the other is the pinned one.
|
|
51
|
-
|
|
52
|
-
Here rather than inline at the call site so the pairing is one fact in one place,
|
|
53
|
-
and so the property can be asserted without a deploy.
|
|
43
|
+
Here rather than inline at the call site so the key set is one fact in one place,
|
|
44
|
+
and so it can be asserted without a deploy.
|
|
54
45
|
*/
|
|
55
46
|
let identityFields = (~providerId: string, ~clientId: string): array<(string, JSON.t)> => [
|
|
56
47
|
("identityProviderId", JSON.Encode.string(providerId)),
|
|
57
48
|
("identityProviderClientId", JSON.Encode.string(clientId)),
|
|
58
|
-
("cognitoUserPoolId", JSON.Encode.string(providerId)),
|
|
59
|
-
("cognitoClientId", JSON.Encode.string(clientId)),
|
|
60
49
|
]
|
|
61
50
|
|
|
62
51
|
/**
|
|
@@ -298,50 +298,25 @@ describe("Util_ShellConfig.fields — shellConfig passthrough", () => {
|
|
|
298
298
|
})
|
|
299
299
|
})
|
|
300
300
|
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
305
|
-
// read into an option, so a bundle that cannot find its key does not error, it
|
|
306
|
-
// gets `None` and login silently stops working.
|
|
307
|
-
//
|
|
308
|
-
// These assert the property that removes that window, not the spelling.
|
|
301
|
+
// A shell reads config.json at runtime, and `identityProviderClientId` is read
|
|
302
|
+
// into an option: a bundle that cannot find it gets `None` and a login that
|
|
303
|
+
// silently stops working. These assert the key set, so a rename cannot slip out
|
|
304
|
+
// in a refactor without a test naming it.
|
|
309
305
|
describe("Util_ShellConfig.identityFields", () => {
|
|
310
306
|
let fields = Util_ShellConfig.identityFields(~providerId="eu-west-1_x", ~clientId="7cl13nt")
|
|
311
307
|
let get = key => fields->Array.find(((k, _)) => k == key)->Option.map(((_, v)) => v)
|
|
312
308
|
|
|
313
|
-
testSync("the
|
|
309
|
+
testSync("the identity keys carry the pool and the client", () =>
|
|
314
310
|
expect((get("identityProviderId"), get("identityProviderClientId")))->toEqual((
|
|
315
311
|
Some(JSON.Encode.string("eu-west-1_x")),
|
|
316
312
|
Some(JSON.Encode.string("7cl13nt")),
|
|
317
313
|
))
|
|
318
314
|
)
|
|
319
315
|
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
testSync("the deprecated spelling is present too", () =>
|
|
323
|
-
expect((get("cognitoUserPoolId"), get("cognitoClientId")))->toEqual((
|
|
324
|
-
Some(JSON.Encode.string("eu-west-1_x")),
|
|
325
|
-
Some(JSON.Encode.string("7cl13nt")),
|
|
326
|
-
))
|
|
327
|
-
)
|
|
328
|
-
|
|
329
|
-
// The whole point: a bundle reading either name gets the same answer. Two keys
|
|
330
|
-
// carrying different values would be worse than one key, not better.
|
|
331
|
-
testSync("both spellings carry identical values", () =>
|
|
332
|
-
expect((
|
|
333
|
-
get("identityProviderId") == get("cognitoUserPoolId"),
|
|
334
|
-
get("identityProviderClientId") == get("cognitoClientId"),
|
|
335
|
-
))->toEqual((true, true))
|
|
336
|
-
)
|
|
337
|
-
|
|
338
|
-
// The client id is the load-bearing one — it is what the shell's auth provider
|
|
339
|
-
// branches on. The pool id is currently discarded by the shell, which is
|
|
340
|
-
// exactly why a `cognito*` sweep is dangerous: the safe one gives no warning.
|
|
316
|
+
// The transitional `cognito*` pair is gone: every pinned shell reads the
|
|
317
|
+
// names above, and a reader that still wants the old ones is the defect.
|
|
341
318
|
testSync("nothing else sneaks into the identity field set", () =>
|
|
342
319
|
expect(fields->Array.map(((k, _)) => k)->Array.toSorted(String.compare))->toEqual([
|
|
343
|
-
"cognitoClientId",
|
|
344
|
-
"cognitoUserPoolId",
|
|
345
320
|
"identityProviderClientId",
|
|
346
321
|
"identityProviderId",
|
|
347
322
|
])
|
|
@@ -5,7 +5,6 @@ import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
|
|
|
5
5
|
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
6
6
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
7
7
|
import * as Role$Reventless from "@reventlessdev/reventless-spec/src/types/Role.res.mjs";
|
|
8
|
-
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
|
|
9
8
|
import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.js";
|
|
10
9
|
import * as Primitive_exceptions from "@rescript/runtime/lib/es6/Primitive_exceptions.js";
|
|
11
10
|
import * as Util_ShellConfig$ReventlessAws from "../src/util/Util_ShellConfig.res.mjs";
|
|
@@ -351,7 +350,7 @@ globalThis.describe("Util_ShellConfig.fields — shellConfig passthrough", () =>
|
|
|
351
350
|
globalThis.describe("Util_ShellConfig.identityFields", () => {
|
|
352
351
|
let fields = Util_ShellConfig$ReventlessAws.identityFields("eu-west-1_x", "7cl13nt");
|
|
353
352
|
let get = key => Stdlib_Option.map(fields.find(param => param[0] === key), param => param[1]);
|
|
354
|
-
globalThis.test("the
|
|
353
|
+
globalThis.test("the identity keys carry the pool and the client", () => {
|
|
355
354
|
globalThis.expect([
|
|
356
355
|
get("identityProviderId"),
|
|
357
356
|
get("identityProviderClientId")
|
|
@@ -360,28 +359,8 @@ globalThis.describe("Util_ShellConfig.identityFields", () => {
|
|
|
360
359
|
"7cl13nt"
|
|
361
360
|
]);
|
|
362
361
|
});
|
|
363
|
-
globalThis.test("the deprecated spelling is present too", () => {
|
|
364
|
-
globalThis.expect([
|
|
365
|
-
get("cognitoUserPoolId"),
|
|
366
|
-
get("cognitoClientId")
|
|
367
|
-
]).toEqual([
|
|
368
|
-
"eu-west-1_x",
|
|
369
|
-
"7cl13nt"
|
|
370
|
-
]);
|
|
371
|
-
});
|
|
372
|
-
globalThis.test("both spellings carry identical values", () => {
|
|
373
|
-
globalThis.expect([
|
|
374
|
-
Primitive_object.equal(get("identityProviderId"), get("cognitoUserPoolId")),
|
|
375
|
-
Primitive_object.equal(get("identityProviderClientId"), get("cognitoClientId"))
|
|
376
|
-
]).toEqual([
|
|
377
|
-
true,
|
|
378
|
-
true
|
|
379
|
-
]);
|
|
380
|
-
});
|
|
381
362
|
globalThis.test("nothing else sneaks into the identity field set", () => {
|
|
382
363
|
globalThis.expect(fields.map(param => param[0]).toSorted(Primitive_string.compare)).toEqual([
|
|
383
|
-
"cognitoClientId",
|
|
384
|
-
"cognitoUserPoolId",
|
|
385
364
|
"identityProviderClientId",
|
|
386
365
|
"identityProviderId"
|
|
387
366
|
]);
|