@kensio/yulin 1.18.0 → 1.18.1
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/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +8 -2
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +9 -3
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.d.ts +25 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.js +36 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.js.map +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +6 -5
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-authorizer.d.ts +6 -4
- package/dist/service/s3/command/list-objects/list-objects-authorizer.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-authorizer.js +6 -4
- package/dist/service/s3/command/list-objects/list-objects-authorizer.js.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-page-builder.d.ts +4 -2
- package/dist/service/s3/command/list-objects/list-objects-page-builder.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-page-builder.js +8 -2
- package/dist/service/s3/command/list-objects/list-objects-page-builder.js.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.command.d.ts +7 -0
- package/dist/service/s3/command/list-objects/list-objects.command.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.handler.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.handler.js +2 -0
- package/dist/service/s3/command/list-objects/list-objects.handler.js.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.d.ts +1 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.js +6 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.js.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.command.d.ts +8 -2
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.command.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.js +2 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.js.map +1 -1
- package/dist/service/s3/object/s3-common-prefix.d.ts +22 -0
- package/dist/service/s3/object/s3-common-prefix.d.ts.map +1 -0
- package/dist/service/s3/object/s3-common-prefix.js +16 -0
- package/dist/service/s3/object/s3-common-prefix.js.map +1 -0
- package/dist/service/s3/object/s3-object-listing.d.ts +9 -2
- package/dist/service/s3/object/s3-object-listing.d.ts.map +1 -1
- package/dist/service/s3/object/s3-object-listing.js +70 -13
- package/dist/service/s3/object/s3-object-listing.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.js +2 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts +5 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.js +6 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.js.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.d.ts +4 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.js +9 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.js.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.d.ts +22 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.d.ts.map +1 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.js +28 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.js.map +1 -0
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.d.ts +25 -6
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.js +32 -7
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.js.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.d.ts +16 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.d.ts.map +1 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.js +22 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.js.map +1 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.d.ts +13 -4
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.js +21 -11
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.js.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.d.ts +11 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.js +19 -2
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.js.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.d.ts +9 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.d.ts.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.js +9 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.js.map +1 -1
- package/dist/service/wafv2/sim-wafv2.d.ts +12 -0
- package/dist/service/wafv2/sim-wafv2.d.ts.map +1 -1
- package/dist/service/wafv2/sim-wafv2.js +17 -0
- package/dist/service/wafv2/sim-wafv2.js.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.d.ts +26 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.d.ts.map +1 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.js +34 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3-common-prefix.js","sourceRoot":"","sources":["../../../../src/service/s3/object/s3-common-prefix.ts"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAA2B;IAE3B,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC;QAC1B,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -8,6 +8,10 @@ import type { SimS3Object } from "./s3-object.js";
|
|
|
8
8
|
export declare const simS3DefaultMaxKeysPerPage = 1000;
|
|
9
9
|
interface SimS3ObjectPageRequest {
|
|
10
10
|
readonly objects: readonly SimS3Object[];
|
|
11
|
+
/** The prefix the listing asked for, which a delimiter rolls up beneath. */
|
|
12
|
+
readonly prefix?: string | undefined;
|
|
13
|
+
/** The delimiter to roll keys up under, or nothing to list them flat. */
|
|
14
|
+
readonly delimiter?: string | undefined;
|
|
11
15
|
/** The key to resume after, exclusive, or nothing to start at the first. */
|
|
12
16
|
readonly startAfter?: string | undefined;
|
|
13
17
|
readonly maxKeys: number;
|
|
@@ -17,10 +21,13 @@ interface SimS3ObjectPageRequest {
|
|
|
17
21
|
*/
|
|
18
22
|
export interface SimS3ObjectPage {
|
|
19
23
|
readonly objects: readonly SimS3Object[];
|
|
24
|
+
/** The prefixes keys were rolled up into, empty without a delimiter. */
|
|
25
|
+
readonly commonPrefixes: readonly string[];
|
|
20
26
|
readonly isTruncated: boolean;
|
|
21
27
|
/**
|
|
22
|
-
* The key the next page resumes after, which is there
|
|
23
|
-
* listing is truncated, so a caller cannot be offered one
|
|
28
|
+
* The key or common prefix the next page resumes after, which is there
|
|
29
|
+
* exactly when the listing is truncated, so a caller cannot be offered one
|
|
30
|
+
* that goes nowhere.
|
|
24
31
|
*/
|
|
25
32
|
readonly resumeAfter: string | undefined;
|
|
26
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3-object-listing.d.ts","sourceRoot":"","sources":["../../../../src/service/s3/object/s3-object-listing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"s3-object-listing.d.ts","sourceRoot":"","sources":["../../../../src/service/s3/object/s3-object-listing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,GAC9B,eAAe,CAsBjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,cAAc,EAAE,MAAM,GACrB,MAAM,CAQR"}
|
|
@@ -19,24 +19,23 @@ export const simS3DefaultMaxKeysPerPage = 1000;
|
|
|
19
19
|
* not made of characters outside the basic multilingual plane.
|
|
20
20
|
*/
|
|
21
21
|
export function simS3ObjectPage(request) {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// A
|
|
28
|
-
// so a page with no room is empty rather than backwards.
|
|
29
|
-
const objects = remaining.slice(0, Math.max(0, request.maxKeys));
|
|
30
|
-
const lastKey = objects.at(-1)?.key;
|
|
31
|
-
// A page that returned no keys has nowhere for a caller to carry on from, so
|
|
22
|
+
const entries = listingEntries(request);
|
|
23
|
+
// A negative page size would slice entries off the end rather than take
|
|
24
|
+
// none, so a page with no room is empty rather than backwards.
|
|
25
|
+
const page = entries.slice(0, Math.max(0, request.maxKeys));
|
|
26
|
+
const last = page.at(-1);
|
|
27
|
+
// A page that returned nothing has nowhere for a caller to carry on from, so
|
|
32
28
|
// it is complete however much the Bucket still holds. Reporting it truncated
|
|
33
29
|
// would offer a continuation that cannot exist, and a caller looping until
|
|
34
30
|
// the listing is complete would never stop.
|
|
35
|
-
const isTruncated =
|
|
31
|
+
const isTruncated = last !== undefined && page.length < entries.length;
|
|
36
32
|
return {
|
|
37
|
-
objects,
|
|
33
|
+
objects: page.filter(hasObject).map((entry) => entry.object),
|
|
34
|
+
commonPrefixes: page
|
|
35
|
+
.filter((entry) => entry.object === undefined)
|
|
36
|
+
.map((entry) => entry.name),
|
|
38
37
|
isTruncated,
|
|
39
|
-
resumeAfter: isTruncated ?
|
|
38
|
+
resumeAfter: isTruncated ? last.name : undefined,
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
@@ -54,6 +53,64 @@ export function simS3EffectiveMaxKeys(requestedMaxKeys, maxKeysPerPage) {
|
|
|
54
53
|
}
|
|
55
54
|
return Math.min(requestedMaxKeys ?? maxKeysPerPage, maxKeysPerPage);
|
|
56
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* The prefix a delimiter rolls a key up into, or nothing when it holds none.
|
|
58
|
+
*
|
|
59
|
+
* The search starts past the listing's own prefix, because a delimiter inside
|
|
60
|
+
* the prefix a caller asked for has already been walked past. Everything from
|
|
61
|
+
* the start of the key through the first delimiter after that becomes the
|
|
62
|
+
* common prefix, so `img/` covers `img/a.png` and `img/b.png` alike.
|
|
63
|
+
*/
|
|
64
|
+
function simS3CommonPrefix(key, prefix, delimiter) {
|
|
65
|
+
// An empty delimiter appears in no key, and real S3 lists flat for one.
|
|
66
|
+
if (delimiter === undefined || delimiter === "") {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
const at = key.indexOf(delimiter, (prefix ?? "").length);
|
|
70
|
+
return at === -1 ? undefined : key.slice(0, at + delimiter.length);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Everything a listing would return, in order, before the page is taken.
|
|
74
|
+
*
|
|
75
|
+
* Keys arrive sorted, so the keys of one common prefix are neighbours and a
|
|
76
|
+
* rolled-up prefix is recognised by the one before it.
|
|
77
|
+
*/
|
|
78
|
+
function listingEntries(request) {
|
|
79
|
+
const entries = [];
|
|
80
|
+
let rolledUp;
|
|
81
|
+
for (const object of request.objects.toSorted(compareObjectKeys)) {
|
|
82
|
+
const commonPrefix = simS3CommonPrefix(object.key, request.prefix, request.delimiter);
|
|
83
|
+
if (isBehindTheListing(request.startAfter, object.key, commonPrefix)) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (commonPrefix === undefined) {
|
|
87
|
+
entries.push({ name: object.key, object });
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (commonPrefix !== rolledUp) {
|
|
91
|
+
rolledUp = commonPrefix;
|
|
92
|
+
entries.push({ name: commonPrefix });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return entries;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Whether a listing resuming after something has already passed a key.
|
|
99
|
+
*
|
|
100
|
+
* A page ending on a common prefix resumes after the prefix itself, and the
|
|
101
|
+
* whole of it is behind the listing however many keys it holds. Resuming after
|
|
102
|
+
* a key compares against the key, as a flat listing does, so a caller that
|
|
103
|
+
* picked its own StartAfter inside a folder still gets that folder back.
|
|
104
|
+
*/
|
|
105
|
+
function isBehindTheListing(startAfter, key, commonPrefix) {
|
|
106
|
+
if (startAfter === undefined) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
return commonPrefix === startAfter || key <= startAfter;
|
|
110
|
+
}
|
|
111
|
+
function hasObject(entry) {
|
|
112
|
+
return entry.object !== undefined;
|
|
113
|
+
}
|
|
57
114
|
function compareObjectKeys(a, b) {
|
|
58
115
|
/* v8 ignore if -- a Bucket holds one Object per key, so no two keys are equal */
|
|
59
116
|
if (a.key === b.key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3-object-listing.js","sourceRoot":"","sources":["../../../../src/service/s3/object/s3-object-listing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"s3-object-listing.js","sourceRoot":"","sources":["../../../../src/service/s3/object/s3-object-listing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAyC/C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA+B;IAE/B,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAExC,wEAAwE;IACxE,+DAA+D;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzB,6EAA6E;IAC7E,6EAA6E;IAC7E,2EAA2E;IAC3E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;AAED,SAAS,iBAAiB,CAAC,CAAc,EAAE,CAAc;IACvD,iFAAiF;IACjF,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-s3-api-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,GACxB,MAAM,CAER;AAED;;;;;GAKG;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAMjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"sim-s3-api-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,GACxB,MAAM,CAER;AAED;;;;;GAKG;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAMjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CASnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAQjE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAWA;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE7C"}
|
|
@@ -34,6 +34,7 @@ export function listObjectsV2Input(request) {
|
|
|
34
34
|
return {
|
|
35
35
|
Bucket: request.bucketName,
|
|
36
36
|
...optional("Prefix", request.query.get("prefix")),
|
|
37
|
+
...optional("Delimiter", request.query.get("delimiter")),
|
|
37
38
|
...optional("ContinuationToken", request.query.get("continuation-token")),
|
|
38
39
|
...optional("StartAfter", request.query.get("start-after")),
|
|
39
40
|
...optionalNumber("MaxKeys", request.query.get("max-keys")),
|
|
@@ -46,6 +47,7 @@ export function listObjectsInput(request) {
|
|
|
46
47
|
return {
|
|
47
48
|
Bucket: request.bucketName,
|
|
48
49
|
...optional("Prefix", request.query.get("prefix")),
|
|
50
|
+
...optional("Delimiter", request.query.get("delimiter")),
|
|
49
51
|
...optional("Marker", request.query.get("marker")),
|
|
50
52
|
...optionalNumber("MaxKeys", request.query.get("max-keys")),
|
|
51
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-s3-api-input.js","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-input.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,OAAwB;IAClD,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;AACxC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAwB,EACxB,MAAc,EACd,IAAyB;IAEzB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAwB;IACvD,OAAO;QACL,GAAG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClD,GAAG,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACzE,GAAG,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;KAClE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAwB;IACzD,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,UAAU;QAC1B,GAAG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClD,GAAG,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC,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AE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,IAAgB;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -9,10 +9,15 @@ interface ObjectSummary {
|
|
|
9
9
|
readonly LastModified?: Date | undefined;
|
|
10
10
|
readonly StorageClass?: string | undefined;
|
|
11
11
|
}
|
|
12
|
+
interface CommonPrefix {
|
|
13
|
+
readonly Prefix?: string | undefined;
|
|
14
|
+
}
|
|
12
15
|
interface ListObjectsOutput {
|
|
13
16
|
readonly Contents?: readonly ObjectSummary[] | undefined;
|
|
17
|
+
readonly CommonPrefixes?: readonly CommonPrefix[] | undefined;
|
|
14
18
|
readonly Name?: string | undefined;
|
|
15
19
|
readonly Prefix?: string | undefined;
|
|
20
|
+
readonly Delimiter?: string | undefined;
|
|
16
21
|
readonly MaxKeys?: number | undefined;
|
|
17
22
|
readonly IsTruncated?: boolean | undefined;
|
|
18
23
|
readonly KeyCount?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-s3-api-listing.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-listing.ts"],"names":[],"mappings":"AAMA,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC1C;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,GAAG,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C,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,UAAU,iBAAiB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAiBrE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,CAAC,GAAG,CAAC,GACb,MAAM,CAmBR"}
|
|
@@ -20,12 +20,17 @@ export function simS3ListBucketsXml(output) {
|
|
|
20
20
|
*/
|
|
21
21
|
export function simS3ListObjectsXml(output, version) {
|
|
22
22
|
const contents = (output.Contents ?? []).map(objectSummaryXml).join("");
|
|
23
|
+
const commonPrefixes = (output.CommonPrefixes ?? [])
|
|
24
|
+
.map((commonPrefix) => xmlElement("CommonPrefixes", xmlValue("Prefix", commonPrefix.Prefix)))
|
|
25
|
+
.join("");
|
|
23
26
|
return xmlDocument("ListBucketResult", xmlValue("Name", output.Name) +
|
|
24
27
|
xmlValue("Prefix", output.Prefix) +
|
|
28
|
+
xmlValue("Delimiter", output.Delimiter) +
|
|
25
29
|
xmlValue("MaxKeys", output.MaxKeys) +
|
|
26
30
|
xmlValue("IsTruncated", output.IsTruncated ?? false) +
|
|
27
31
|
pagingXml(output, version) +
|
|
28
|
-
contents
|
|
32
|
+
contents +
|
|
33
|
+
commonPrefixes);
|
|
29
34
|
}
|
|
30
35
|
/**
|
|
31
36
|
* The elements that say where a page started and where the next one does.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-s3-api-listing.js","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-listing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,GACT,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-s3-api-listing.js","sourceRoot":"","sources":["../../../../../src/service/s3/serve/api/sim-s3-api-listing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAyC5C;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAyB;IAC3D,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;SACnC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACd,UAAU,CACR,QAAQ,EACR,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;QAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,CAChD,CACF;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO,WAAW,CAChB,wBAAwB,EACxB,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC;QAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;QACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAyB,EACzB,OAAc;IAEd,MAAM,QAAQ,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,C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B,CAAC,OAAsB;IAC9C,OAAO,UAAU,CACf,UAAU,EACV,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC;QAC1B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,YAAY,CAAC;QAC9C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;QAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;QAC9B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC,CAC/D,CAAC;AACJ,CAAC"}
|
|
@@ -15,6 +15,10 @@ interface SimCfnWafAssociationCreatorProperties {
|
|
|
15
15
|
* resource this simulation does not hold, and a `CLOUDFRONT` scope web ACL,
|
|
16
16
|
* which reaches a distribution through the distribution's own `WebACLId`
|
|
17
17
|
* rather than through an association.
|
|
18
|
+
*
|
|
19
|
+
* Two things are a skip rather than a failure. A resource type AWS WAF
|
|
20
|
+
* protects and this simulation does not, and a web ACL that is not here at
|
|
21
|
+
* all.
|
|
18
22
|
*/
|
|
19
23
|
export declare class SimCfnWafAssociationCreator {
|
|
20
24
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-waf-association-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAElH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-association-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAElH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAKnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,2BAA2B;;IAGtC,YAAY,UAAU,EAAE,qCAAqC,EAE5D;IAED;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,0BAA0B,CAAC,CA8BrC;IAED;;;;;;;;;;;;OAYG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,0BAA0B,GACtC,OAAO,CAAC,IAAI,CAAC,CAgBf;CACF"}
|
|
@@ -2,6 +2,7 @@ import { SimWafUnavailableEntityException } from "../../error/sim-wafv2.error.js
|
|
|
2
2
|
import { simCfnWafResourceCommand } from "../sim-cfn-waf-resource-error.js";
|
|
3
3
|
import { wafWebAclAssociationResourceType } from "../sim-cfn-waf-resource-types.js";
|
|
4
4
|
import { SimCfnWafAssociationConfig } from "./sim-cfn-waf-association-config.js";
|
|
5
|
+
import { simCfnWafAssociationSkipError } from "./sim-cfn-waf-association-skip.js";
|
|
5
6
|
import { SimWafCfnWebAclAssociation } from "./sim-cfn-waf-web-acl-association.js";
|
|
6
7
|
/**
|
|
7
8
|
* Puts a web ACL in front of a resource from an AWS::WAFv2::WebACLAssociation
|
|
@@ -13,6 +14,10 @@ import { SimWafCfnWebAclAssociation } from "./sim-cfn-waf-web-acl-association.js
|
|
|
13
14
|
* resource this simulation does not hold, and a `CLOUDFRONT` scope web ACL,
|
|
14
15
|
* which reaches a distribution through the distribution's own `WebACLId`
|
|
15
16
|
* rather than through an association.
|
|
17
|
+
*
|
|
18
|
+
* Two things are a skip rather than a failure. A resource type AWS WAF
|
|
19
|
+
* protects and this simulation does not, and a web ACL that is not here at
|
|
20
|
+
* all.
|
|
16
21
|
*/
|
|
17
22
|
export class SimCfnWafAssociationCreator {
|
|
18
23
|
#wafV2;
|
|
@@ -28,6 +33,10 @@ export class SimCfnWafAssociationCreator {
|
|
|
28
33
|
resourceArn: config.resourceArn(),
|
|
29
34
|
webAclArn: config.webAclArn(),
|
|
30
35
|
});
|
|
36
|
+
const skipError = simCfnWafAssociationSkipError(this.#wafV2, resource, association.webAclArn);
|
|
37
|
+
if (skipError !== undefined) {
|
|
38
|
+
throw skipError;
|
|
39
|
+
}
|
|
31
40
|
return await simCfnWafResourceCommand(wafWebAclAssociationResourceType, resource.logicalId, async () => {
|
|
32
41
|
await this.#wafV2.associateWebAcl({
|
|
33
42
|
input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-waf-association-creator.js","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-creator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAMlF
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-association-creator.js","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-creator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,q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T,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;oBACnC,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE;iBAChD,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,CAAC,KAAK,YAAY,gCAAgC,CAAC,EAAE,CAAC;oBACzD,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimWafV2 } from "../../sim-wafv2.js";
|
|
3
|
+
/**
|
|
4
|
+
* The error an association naming a web ACL that is not here is skipped with,
|
|
5
|
+
* or nothing when the web ACL is there.
|
|
6
|
+
*
|
|
7
|
+
* An association is the pair of ARNs it holds, and this one has lost half of
|
|
8
|
+
* itself. There is nothing to put in front of the resource, so the association
|
|
9
|
+
* is recorded and stepped over.
|
|
10
|
+
*
|
|
11
|
+
* That covers a template naming a web ACL from a real account, and one whose
|
|
12
|
+
* web ACL is in another Region or another Account. Skipping the association
|
|
13
|
+
* costs the rest of the template nothing, because an association is the only
|
|
14
|
+
* Resource that carries the reference. Whatever it would have gone in front of
|
|
15
|
+
* deploys and serves, unprotected.
|
|
16
|
+
*
|
|
17
|
+
* `AssociateWebACL` refuses the same ARN, as real WAFv2 refuses it. A request
|
|
18
|
+
* that asks for an association gets an answer about that association, and a
|
|
19
|
+
* template asking for twelve Resources gets the eleven that are left.
|
|
20
|
+
*/
|
|
21
|
+
export declare function simCfnWafAssociationSkipError(wafV2: SimWafV2, resource: SimCfnResource, webAclArn: string): Error | undefined;
|
|
22
|
+
//# sourceMappingURL=sim-cfn-waf-association-skip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-association-skip.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-skip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAM,GAChB,KAAK,GAAG,SAAS,CAWnB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { simCfnWafSkippedResourceError } from "../sim-cfn-waf-resource-error.js";
|
|
2
|
+
import { wafWebAclAssociationResourceType } from "../sim-cfn-waf-resource-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The error an association naming a web ACL that is not here is skipped with,
|
|
5
|
+
* or nothing when the web ACL is there.
|
|
6
|
+
*
|
|
7
|
+
* An association is the pair of ARNs it holds, and this one has lost half of
|
|
8
|
+
* itself. There is nothing to put in front of the resource, so the association
|
|
9
|
+
* is recorded and stepped over.
|
|
10
|
+
*
|
|
11
|
+
* That covers a template naming a web ACL from a real account, and one whose
|
|
12
|
+
* web ACL is in another Region or another Account. Skipping the association
|
|
13
|
+
* costs the rest of the template nothing, because an association is the only
|
|
14
|
+
* Resource that carries the reference. Whatever it would have gone in front of
|
|
15
|
+
* deploys and serves, unprotected.
|
|
16
|
+
*
|
|
17
|
+
* `AssociateWebACL` refuses the same ARN, as real WAFv2 refuses it. A request
|
|
18
|
+
* that asks for an association gets an answer about that association, and a
|
|
19
|
+
* template asking for twelve Resources gets the eleven that are left.
|
|
20
|
+
*/
|
|
21
|
+
export function simCfnWafAssociationSkipError(wafV2, resource, webAclArn) {
|
|
22
|
+
if (wafV2.findWebAclByArn(webAclArn) !== undefined) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return simCfnWafSkippedResourceError(wafWebAclAssociationResourceType, resource.logicalId, `it names web ACL ${webAclArn}, which this simulation does not hold, so ` +
|
|
26
|
+
`there is nothing to put in front of the resource`);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=sim-cfn-waf-association-skip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-association-skip.js","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/association/sim-cfn-waf-association-skip.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,6BAA6B,CAC3C,KAAe,EACf,QAAwB,EACxB,SAAiB;IAEjB,IAAI,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,6BAA6B,CAClC,gCAAgC,EAChC,QAAQ,CAAC,SAAS,EAClB,oBAAoB,SAAS,4CAA4C;QACvE,kDAAkD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build the error a Resource of a simulated WAFv2 type is refused with.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* invalid.
|
|
4
|
+
* Sim CloudFormation fails a stack on this one, so it is kept for a Resource
|
|
5
|
+
* nothing coherent could be deployed from: a `Rules` property that is not a
|
|
6
|
+
* list, a scope outside `REGIONAL` and `CLOUDFRONT`, an association naming no
|
|
7
|
+
* resource. Something WAFv2 cannot evaluate is a different thing and takes the
|
|
8
|
+
* skip below.
|
|
10
9
|
*/
|
|
11
10
|
export declare function simCfnWafResourceError(resourceType: string, logicalId: string, reason: string, cause?: unknown): Error;
|
|
11
|
+
/**
|
|
12
|
+
* Build the error a Resource carrying something WAFv2 cannot evaluate is
|
|
13
|
+
* skipped with.
|
|
14
|
+
*
|
|
15
|
+
* The "Unsupported sim ... CloudFormation" wording is what sim CloudFormation
|
|
16
|
+
* reads as a Resource to record and step over, so the Resource lands on
|
|
17
|
+
* `stack.skippedResources` carrying the reason WAFv2 gave, and the rest of the
|
|
18
|
+
* template deploys.
|
|
19
|
+
*
|
|
20
|
+
* Skipping keeps the caution the refusal was written with. A web ACL that
|
|
21
|
+
* accepted a rule it cannot evaluate would allow a request AWS blocks, and a
|
|
22
|
+
* web ACL that is missing allows exactly as much as a stack that never
|
|
23
|
+
* deployed. What it drops is the blast radius: a user pool, a table, a secret
|
|
24
|
+
* and two functions in the same template are no business of one rule.
|
|
25
|
+
*/
|
|
26
|
+
export declare function simCfnWafSkippedResourceError(resourceType: string, logicalId: string, reason: string, cause?: unknown): Error;
|
|
12
27
|
/**
|
|
13
28
|
* Run the simulated WAFv2 commands one Resource is made of, naming the
|
|
14
29
|
* Resource in whatever they refuse.
|
|
@@ -21,6 +36,10 @@ export declare function simCfnWafResourceError(resourceType: string, logicalId:
|
|
|
21
36
|
* a template can hold several. Only WAFv2's own errors are renamed, so a
|
|
22
37
|
* refusal the CloudFormation layer decided keeps the wording it was written
|
|
23
38
|
* with.
|
|
39
|
+
*
|
|
40
|
+
* The two kinds of refusal part company here. Input WAFv2 will not take is a
|
|
41
|
+
* failed Resource, and input it takes and this simulation cannot evaluate is a
|
|
42
|
+
* skipped one.
|
|
24
43
|
*/
|
|
25
44
|
export declare function simCfnWafResourceCommand<T>(resourceType: string, logicalId: string, run: () => Promise<T>): Promise<T>;
|
|
26
45
|
//# sourceMappingURL=sim-cfn-waf-resource-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-waf-resource-error.d.ts","sourceRoot":"","sources":["../../../../src/service/wafv2/cfn/sim-cfn-waf-resource-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-resource-error.d.ts","sourceRoot":"","sources":["../../../../src/service/wafv2/cfn/sim-cfn-waf-resource-error.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,OAAO,GACd,KAAK,CAIP;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,OAAO,GACd,KAAK,CAMP;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAC9C,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAwBZ"}
|
|
@@ -1,19 +1,37 @@
|
|
|
1
|
-
import { SimWafError } from "../error/sim-wafv2.error.js";
|
|
1
|
+
import { SimWafError, SimWafUnsimulatedInputException, } from "../error/sim-wafv2.error.js";
|
|
2
2
|
/**
|
|
3
3
|
* Build the error a Resource of a simulated WAFv2 type is refused with.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* invalid.
|
|
5
|
+
* Sim CloudFormation fails a stack on this one, so it is kept for a Resource
|
|
6
|
+
* nothing coherent could be deployed from: a `Rules` property that is not a
|
|
7
|
+
* list, a scope outside `REGIONAL` and `CLOUDFRONT`, an association naming no
|
|
8
|
+
* resource. Something WAFv2 cannot evaluate is a different thing and takes the
|
|
9
|
+
* skip below.
|
|
11
10
|
*/
|
|
12
11
|
export function simCfnWafResourceError(resourceType, logicalId, reason, cause) {
|
|
13
12
|
return new Error(`Invalid ${resourceType} Resource ${logicalId}: ${reason}`, {
|
|
14
13
|
cause,
|
|
15
14
|
});
|
|
16
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the error a Resource carrying something WAFv2 cannot evaluate is
|
|
18
|
+
* skipped with.
|
|
19
|
+
*
|
|
20
|
+
* The "Unsupported sim ... CloudFormation" wording is what sim CloudFormation
|
|
21
|
+
* reads as a Resource to record and step over, so the Resource lands on
|
|
22
|
+
* `stack.skippedResources` carrying the reason WAFv2 gave, and the rest of the
|
|
23
|
+
* template deploys.
|
|
24
|
+
*
|
|
25
|
+
* Skipping keeps the caution the refusal was written with. A web ACL that
|
|
26
|
+
* accepted a rule it cannot evaluate would allow a request AWS blocks, and a
|
|
27
|
+
* web ACL that is missing allows exactly as much as a stack that never
|
|
28
|
+
* deployed. What it drops is the blast radius: a user pool, a table, a secret
|
|
29
|
+
* and two functions in the same template are no business of one rule.
|
|
30
|
+
*/
|
|
31
|
+
export function simCfnWafSkippedResourceError(resourceType, logicalId, reason, cause) {
|
|
32
|
+
return new Error(`Unsupported sim WAFv2 CloudFormation ${resourceType} Resource ` +
|
|
33
|
+
`${logicalId}: ${reason}`, { cause });
|
|
34
|
+
}
|
|
17
35
|
/**
|
|
18
36
|
* Run the simulated WAFv2 commands one Resource is made of, naming the
|
|
19
37
|
* Resource in whatever they refuse.
|
|
@@ -26,12 +44,19 @@ export function simCfnWafResourceError(resourceType, logicalId, reason, cause) {
|
|
|
26
44
|
* a template can hold several. Only WAFv2's own errors are renamed, so a
|
|
27
45
|
* refusal the CloudFormation layer decided keeps the wording it was written
|
|
28
46
|
* with.
|
|
47
|
+
*
|
|
48
|
+
* The two kinds of refusal part company here. Input WAFv2 will not take is a
|
|
49
|
+
* failed Resource, and input it takes and this simulation cannot evaluate is a
|
|
50
|
+
* skipped one.
|
|
29
51
|
*/
|
|
30
52
|
export async function simCfnWafResourceCommand(resourceType, logicalId, run) {
|
|
31
53
|
try {
|
|
32
54
|
return await run();
|
|
33
55
|
}
|
|
34
56
|
catch (error) {
|
|
57
|
+
if (error instanceof SimWafUnsimulatedInputException) {
|
|
58
|
+
throw simCfnWafSkippedResourceError(resourceType, logicalId, error.message, error);
|
|
59
|
+
}
|
|
35
60
|
if (error instanceof SimWafError) {
|
|
36
61
|
throw simCfnWafResourceError(resourceType, logicalId, error.message, error);
|
|
37
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-waf-resource-error.js","sourceRoot":"","sources":["../../../../src/service/wafv2/cfn/sim-cfn-waf-resource-error.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-resource-error.js","sourceRoot":"","sources":["../../../../src/service/wafv2/cfn/sim-cfn-waf-resource-error.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,YAAoB,EACpB,SAAiB,EACjB,MAAc,EACd,KAAe;IAEf,OAAO,IAAI,KAAK,CAAC,WAAW,YAAY,aAAa,SAAS,KAAK,MAAM,EAAE,EAAE;QAC3E,KAAK;KACN,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAoB,EACpB,SAAiB,EACjB,MAAc,EACd,KAAe;IAEf,OAAO,IAAI,KAAK,CACd,wCAAwC,YAAY,YAAY;QAC9D,GAAG,SAAS,KAAK,MAAM,EAAE,EAC3B,EAAE,KAAK,EAAE,CACV,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,YAAoB,EACpB,SAAiB,EACjB,GAAqB;IAErB,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,+BAA+B,EAAE,CAAC;YACrD,MAAM,6BAA6B,CACjC,YAAY,EACZ,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CACN,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;YACjC,MAAM,sBAAsB,CAC1B,YAAY,EACZ,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CACN,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCreateWebAclCommandInput } from "../../command/web-acl/web-acl.command.js";
|
|
3
|
+
import type { SimWafV2 } from "../../sim-wafv2.js";
|
|
4
|
+
import type { SimWafRuleInput } from "../../web-acl/sim-waf-rule.type.js";
|
|
5
|
+
/**
|
|
6
|
+
* The rules of a template web ACL to deploy, which are the ones this
|
|
7
|
+
* simulation can evaluate.
|
|
8
|
+
*
|
|
9
|
+
* Each rule left out is recorded on the Resource under its own name, because a
|
|
10
|
+
* web ACL is a list of rules that all look alike from the outside and the name
|
|
11
|
+
* is the only thing that says which one went missing. The reason is the one
|
|
12
|
+
* `CreateWebACL` refuses the rule with, so a reader gets the same sentence
|
|
13
|
+
* wherever they meet it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function simCfnWafEvaluatableRules(wafV2: SimWafV2, resource: SimCfnResource, input: SimCreateWebAclCommandInput): readonly SimWafRuleInput[] | undefined;
|
|
16
|
+
//# sourceMappingURL=sim-cfn-waf-evaluatable-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-evaluatable-rules.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,2BAA2B,GACjC,SAAS,eAAe,EAAE,GAAG,SAAS,CAcxC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules of a template web ACL to deploy, which are the ones this
|
|
3
|
+
* simulation can evaluate.
|
|
4
|
+
*
|
|
5
|
+
* Each rule left out is recorded on the Resource under its own name, because a
|
|
6
|
+
* web ACL is a list of rules that all look alike from the outside and the name
|
|
7
|
+
* is the only thing that says which one went missing. The reason is the one
|
|
8
|
+
* `CreateWebACL` refuses the rule with, so a reader gets the same sentence
|
|
9
|
+
* wherever they meet it.
|
|
10
|
+
*/
|
|
11
|
+
export function simCfnWafEvaluatableRules(wafV2, resource, input) {
|
|
12
|
+
const unevaluatable = wafV2.unevaluatableWebAclRules(input);
|
|
13
|
+
if (unevaluatable.length === 0) {
|
|
14
|
+
return input.Rules;
|
|
15
|
+
}
|
|
16
|
+
const dropped = new Set(unevaluatable.map(({ index }) => index));
|
|
17
|
+
for (const rule of unevaluatable) {
|
|
18
|
+
resource.ignoreProperty(`Rules.${rule.name}`, rule.reason);
|
|
19
|
+
}
|
|
20
|
+
return input.Rules?.filter((_, index) => !dropped.has(index));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=sim-cfn-waf-evaluatable-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-evaluatable-rules.js","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAe,EACf,QAAwB,EACxB,KAAkC;IAElC,MAAM,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAE5D,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjE,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QACjC,QAAQ,CAAC,cAAc,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -7,18 +7,27 @@ import { SimCfnWafResourceConfig } from "../sim-cfn-waf-resource-config.js";
|
|
|
7
7
|
* default action and the custom response bodies are handed over as the
|
|
8
8
|
* template wrote them. They are not read here at all: every rule is compiled
|
|
9
9
|
* by CreateWebACL, which is where a statement kind Yulin cannot evaluate is
|
|
10
|
-
*
|
|
10
|
+
* found, and reading them twice would mean two answers to the same question.
|
|
11
11
|
*/
|
|
12
12
|
export declare class SimCfnWafWebAclConfig extends SimCfnWafResourceConfig {
|
|
13
13
|
protected get resourceType(): string;
|
|
14
14
|
/**
|
|
15
15
|
* The input the web ACL this Resource describes is created from.
|
|
16
16
|
*
|
|
17
|
-
* The properties this simulation has no behaviour for are
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* The properties this simulation has no behaviour for are left out of it and
|
|
18
|
+
* recorded, so the web ACL deploys with the rest of what the template wrote.
|
|
19
|
+
* An SDK caller is refused for the same properties, because a request that
|
|
20
|
+
* was answered and then quietly dropped is a worse answer than a refusal.
|
|
20
21
|
*/
|
|
21
22
|
createInput(): SimCreateWebAclCommandInput;
|
|
23
|
+
/**
|
|
24
|
+
* Record the web ACL members this simulation has no behaviour for.
|
|
25
|
+
*
|
|
26
|
+
* Each of them changes what a web ACL does on real WAF, so a web ACL
|
|
27
|
+
* deployed without one behaves differently to the one the template
|
|
28
|
+
* describes. `stack.ignoredProperties` is where a test reads that.
|
|
29
|
+
*/
|
|
30
|
+
private recordUnsimulatedMembers;
|
|
22
31
|
/**
|
|
23
32
|
* The rules the template declared.
|
|
24
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-waf-web-acl-config.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-waf-web-acl-config.d.ts","sourceRoot":"","sources":["../../../../../src/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAE5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAG5E;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,SAAQ,uBAAuB;IAChE,cAAuB,YAAY,IAAI,MAAM,CAE5C;IAED;;;;;;;OAOG;IACH,WAAW,IAAI,2BAA2B,CAgBzC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAWhC;;;;;;OAMG;IACH,OAAO,CAAC,KAAK;CAad"}
|