@mavogel/awscdk-rootmail 0.1.32 → 0.1.34
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/.jsii +7 -7
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js +2 -1
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/flexible-checksums/stringUnionSelector.js +2 -1
- package/node_modules/@aws-sdk/checksums/package.json +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +3 -3
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +7 -7
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +3 -3
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +26 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +6 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js +34 -16
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3-control/index.js +6 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.js +6 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.js +8 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.js +18 -8
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-ssec/middleware-ssec.js +2 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.js +4 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.js +2 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.78",
|
|
4
4
|
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "yarn g:vitest watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@aws-sdk/core": "^3.978.
|
|
46
|
+
"@aws-sdk/core": "^3.978.7",
|
|
47
47
|
"@aws-sdk/types": "^3.975.0",
|
|
48
48
|
"@smithy/core": "^3.37.0",
|
|
49
49
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.22",
|
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.978.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
50
|
-
"@aws-sdk/token-providers": "3.
|
|
48
|
+
"@aws-sdk/core": "^3.978.7",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.52",
|
|
50
|
+
"@aws-sdk/token-providers": "3.1159.0",
|
|
51
51
|
"@aws-sdk/types": "^3.975.0",
|
|
52
52
|
"@smithy/core": "^3.37.0",
|
|
53
53
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.84",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"test:watch": "yarn g:vitest watch"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aws-sdk/core": "^3.978.
|
|
54
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
53
|
+
"@aws-sdk/core": "^3.978.7",
|
|
54
|
+
"@aws-sdk/nested-clients": "^3.997.52",
|
|
55
55
|
"@aws-sdk/types": "^3.975.0",
|
|
56
56
|
"@smithy/core": "^3.37.0",
|
|
57
57
|
"@smithy/types": "^4.19.0",
|
|
@@ -147,18 +147,22 @@ class S3ExpressIdentityCache {
|
|
|
147
147
|
delete(key) {
|
|
148
148
|
delete this.data[key];
|
|
149
149
|
}
|
|
150
|
+
clear() {
|
|
151
|
+
this.data = {};
|
|
152
|
+
}
|
|
150
153
|
async purgeExpired() {
|
|
151
154
|
const now = Date.now();
|
|
152
155
|
if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
|
|
153
156
|
return;
|
|
154
157
|
}
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
const data = this.data;
|
|
159
|
+
for (const key in data) {
|
|
160
|
+
const entry = data[key];
|
|
157
161
|
if (!entry.isRefreshing) {
|
|
158
162
|
const credential = await entry.identity;
|
|
159
163
|
if (credential.expiration) {
|
|
160
|
-
if (credential.expiration.getTime() < now) {
|
|
161
|
-
delete
|
|
164
|
+
if (credential.expiration.getTime() < now && data[key] === entry) {
|
|
165
|
+
delete data[key];
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
}
|
|
@@ -185,37 +189,47 @@ class S3ExpressIdentityProviderImpl {
|
|
|
185
189
|
createSessionFn;
|
|
186
190
|
cache;
|
|
187
191
|
static REFRESH_WINDOW_MS = 60_000;
|
|
192
|
+
accessKeyId;
|
|
193
|
+
cacheGeneration = 0;
|
|
188
194
|
constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {
|
|
189
195
|
this.createSessionFn = createSessionFn;
|
|
190
196
|
this.cache = cache;
|
|
191
197
|
}
|
|
192
198
|
async getS3ExpressIdentity(awsIdentity, identityProperties) {
|
|
193
|
-
const
|
|
199
|
+
const bucket = identityProperties.Bucket;
|
|
194
200
|
const { cache } = this;
|
|
195
|
-
|
|
201
|
+
if (awsIdentity.accessKeyId !== this.accessKeyId) {
|
|
202
|
+
this.accessKeyId = awsIdentity.accessKeyId;
|
|
203
|
+
this.cacheGeneration++;
|
|
204
|
+
cache.clear();
|
|
205
|
+
}
|
|
206
|
+
const cacheGeneration = this.cacheGeneration;
|
|
207
|
+
const entry = cache.get(bucket);
|
|
196
208
|
if (entry) {
|
|
197
209
|
return entry.identity.then((identity) => {
|
|
198
210
|
const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();
|
|
199
211
|
if (isExpired) {
|
|
200
|
-
return cache.set(
|
|
212
|
+
return cache.set(bucket, new S3ExpressIdentityCacheEntry(this.getIdentity(bucket))).identity;
|
|
201
213
|
}
|
|
202
214
|
const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;
|
|
203
215
|
if (isExpiringSoon && !entry.isRefreshing) {
|
|
204
216
|
entry.isRefreshing = true;
|
|
205
|
-
this.getIdentity(
|
|
206
|
-
|
|
217
|
+
this.getIdentity(bucket).then((id) => {
|
|
218
|
+
if (cacheGeneration === this.cacheGeneration) {
|
|
219
|
+
cache.set(bucket, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
|
|
220
|
+
}
|
|
207
221
|
});
|
|
208
222
|
}
|
|
209
223
|
return identity;
|
|
210
224
|
});
|
|
211
225
|
}
|
|
212
|
-
return cache.set(
|
|
226
|
+
return cache.set(bucket, new S3ExpressIdentityCacheEntry(this.getIdentity(bucket))).identity;
|
|
213
227
|
}
|
|
214
|
-
async getIdentity(
|
|
228
|
+
async getIdentity(bucket) {
|
|
215
229
|
await this.cache.purgeExpired().catch((error) => {
|
|
216
230
|
console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error);
|
|
217
231
|
});
|
|
218
|
-
const session = await this.createSessionFn(
|
|
232
|
+
const session = await this.createSessionFn(bucket);
|
|
219
233
|
if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {
|
|
220
234
|
throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
|
|
221
235
|
}
|
|
@@ -601,10 +615,12 @@ const validateDNSHostLabel = (label, options = { tlsCompatible: true }) => {
|
|
|
601
615
|
};
|
|
602
616
|
const validateCustomEndpoint = (options) => {
|
|
603
617
|
if (options.isCustomEndpoint) {
|
|
604
|
-
if (options.dualstackEndpoint)
|
|
618
|
+
if (options.dualstackEndpoint) {
|
|
605
619
|
throw new Error("Dualstack endpoint is not supported with custom endpoint");
|
|
606
|
-
|
|
620
|
+
}
|
|
621
|
+
if (options.accelerateEndpoint) {
|
|
607
622
|
throw new Error("Accelerate endpoint is not supported with custom endpoint");
|
|
623
|
+
}
|
|
608
624
|
}
|
|
609
625
|
};
|
|
610
626
|
const getArnResources = (resource) => {
|
|
@@ -629,8 +645,9 @@ const getArnResources = (resource) => {
|
|
|
629
645
|
};
|
|
630
646
|
const validateNoDualstack = (dualstackEndpoint) => { };
|
|
631
647
|
const validateNoFIPS = (useFipsEndpoint) => {
|
|
632
|
-
if (useFipsEndpoint)
|
|
648
|
+
if (useFipsEndpoint) {
|
|
633
649
|
throw new Error(`FIPS region is not supported with Outpost.`);
|
|
650
|
+
}
|
|
634
651
|
};
|
|
635
652
|
const validateMrapAlias = (name) => {
|
|
636
653
|
try {
|
|
@@ -967,8 +984,9 @@ const getSsecPlugin = (config) => ({
|
|
|
967
984
|
});
|
|
968
985
|
function isValidBase64EncodedSSECustomerKey(str, options) {
|
|
969
986
|
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
970
|
-
if (!base64Regex.test(str))
|
|
987
|
+
if (!base64Regex.test(str)) {
|
|
971
988
|
return false;
|
|
989
|
+
}
|
|
972
990
|
try {
|
|
973
991
|
const decodedBytes = options.base64Decoder(str);
|
|
974
992
|
return decodedBytes.length === 32;
|
|
@@ -19,8 +19,9 @@ const CONTEXT_SIGNING_REGION = "signing_region";
|
|
|
19
19
|
const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (args) => {
|
|
20
20
|
const { input } = args;
|
|
21
21
|
const parameter = input.Name && validate(input.Name) ? "Name" : input.Bucket && validate(input.Bucket) ? "Bucket" : undefined;
|
|
22
|
-
if (!parameter)
|
|
22
|
+
if (!parameter) {
|
|
23
23
|
return next(args);
|
|
24
|
+
}
|
|
24
25
|
const clientRegion = await options.region();
|
|
25
26
|
const useArnRegion = await options.useArnRegion();
|
|
26
27
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
@@ -60,8 +61,9 @@ const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (a
|
|
|
60
61
|
if (!input.AccountId) {
|
|
61
62
|
input.AccountId = arn.accountId;
|
|
62
63
|
}
|
|
63
|
-
if (useArnRegion)
|
|
64
|
+
if (useArnRegion) {
|
|
64
65
|
context[CONTEXT_ARN_REGION] = arn.region;
|
|
66
|
+
}
|
|
65
67
|
return next(args);
|
|
66
68
|
};
|
|
67
69
|
const parseOutpostArnablesMiddleawareOptions = {
|
|
@@ -176,8 +178,9 @@ const getHostPrefixDeduplicationPlugin = (config) => ({
|
|
|
176
178
|
|
|
177
179
|
const redirectFromPostIdMiddleware = (config) => (next, context) => async (args) => {
|
|
178
180
|
const { input, request } = args;
|
|
179
|
-
if (!HttpRequest.isInstance(request))
|
|
181
|
+
if (!HttpRequest.isInstance(request)) {
|
|
180
182
|
return next(args);
|
|
183
|
+
}
|
|
181
184
|
if (input.OutpostId) {
|
|
182
185
|
const { isCustomEndpoint } = config;
|
|
183
186
|
const useFipsEndpoint = await config.useFipsEndpoint();
|
|
@@ -68,10 +68,12 @@ export const validateDNSHostLabel = (label, options = { tlsCompatible: true }) =
|
|
|
68
68
|
};
|
|
69
69
|
export const validateCustomEndpoint = (options) => {
|
|
70
70
|
if (options.isCustomEndpoint) {
|
|
71
|
-
if (options.dualstackEndpoint)
|
|
71
|
+
if (options.dualstackEndpoint) {
|
|
72
72
|
throw new Error("Dualstack endpoint is not supported with custom endpoint");
|
|
73
|
-
|
|
73
|
+
}
|
|
74
|
+
if (options.accelerateEndpoint) {
|
|
74
75
|
throw new Error("Accelerate endpoint is not supported with custom endpoint");
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
79
|
export const getArnResources = (resource) => {
|
|
@@ -96,8 +98,9 @@ export const getArnResources = (resource) => {
|
|
|
96
98
|
};
|
|
97
99
|
export const validateNoDualstack = (dualstackEndpoint) => { };
|
|
98
100
|
export const validateNoFIPS = (useFipsEndpoint) => {
|
|
99
|
-
if (useFipsEndpoint)
|
|
101
|
+
if (useFipsEndpoint) {
|
|
100
102
|
throw new Error(`FIPS region is not supported with Outpost.`);
|
|
103
|
+
}
|
|
101
104
|
};
|
|
102
105
|
export const validateMrapAlias = (name) => {
|
|
103
106
|
try {
|
|
@@ -19,18 +19,22 @@ export class S3ExpressIdentityCache {
|
|
|
19
19
|
delete(key) {
|
|
20
20
|
delete this.data[key];
|
|
21
21
|
}
|
|
22
|
+
clear() {
|
|
23
|
+
this.data = {};
|
|
24
|
+
}
|
|
22
25
|
async purgeExpired() {
|
|
23
26
|
const now = Date.now();
|
|
24
27
|
if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
|
|
25
28
|
return;
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
const data = this.data;
|
|
31
|
+
for (const key in data) {
|
|
32
|
+
const entry = data[key];
|
|
29
33
|
if (!entry.isRefreshing) {
|
|
30
34
|
const credential = await entry.identity;
|
|
31
35
|
if (credential.expiration) {
|
|
32
|
-
if (credential.expiration.getTime() < now) {
|
|
33
|
-
delete
|
|
36
|
+
if (credential.expiration.getTime() < now && data[key] === entry) {
|
|
37
|
+
delete data[key];
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
}
|
|
@@ -4,37 +4,47 @@ export class S3ExpressIdentityProviderImpl {
|
|
|
4
4
|
createSessionFn;
|
|
5
5
|
cache;
|
|
6
6
|
static REFRESH_WINDOW_MS = 60_000;
|
|
7
|
+
accessKeyId;
|
|
8
|
+
cacheGeneration = 0;
|
|
7
9
|
constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {
|
|
8
10
|
this.createSessionFn = createSessionFn;
|
|
9
11
|
this.cache = cache;
|
|
10
12
|
}
|
|
11
13
|
async getS3ExpressIdentity(awsIdentity, identityProperties) {
|
|
12
|
-
const
|
|
14
|
+
const bucket = identityProperties.Bucket;
|
|
13
15
|
const { cache } = this;
|
|
14
|
-
|
|
16
|
+
if (awsIdentity.accessKeyId !== this.accessKeyId) {
|
|
17
|
+
this.accessKeyId = awsIdentity.accessKeyId;
|
|
18
|
+
this.cacheGeneration++;
|
|
19
|
+
cache.clear();
|
|
20
|
+
}
|
|
21
|
+
const cacheGeneration = this.cacheGeneration;
|
|
22
|
+
const entry = cache.get(bucket);
|
|
15
23
|
if (entry) {
|
|
16
24
|
return entry.identity.then((identity) => {
|
|
17
25
|
const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();
|
|
18
26
|
if (isExpired) {
|
|
19
|
-
return cache.set(
|
|
27
|
+
return cache.set(bucket, new S3ExpressIdentityCacheEntry(this.getIdentity(bucket))).identity;
|
|
20
28
|
}
|
|
21
29
|
const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;
|
|
22
30
|
if (isExpiringSoon && !entry.isRefreshing) {
|
|
23
31
|
entry.isRefreshing = true;
|
|
24
|
-
this.getIdentity(
|
|
25
|
-
|
|
32
|
+
this.getIdentity(bucket).then((id) => {
|
|
33
|
+
if (cacheGeneration === this.cacheGeneration) {
|
|
34
|
+
cache.set(bucket, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
|
|
35
|
+
}
|
|
26
36
|
});
|
|
27
37
|
}
|
|
28
38
|
return identity;
|
|
29
39
|
});
|
|
30
40
|
}
|
|
31
|
-
return cache.set(
|
|
41
|
+
return cache.set(bucket, new S3ExpressIdentityCacheEntry(this.getIdentity(bucket))).identity;
|
|
32
42
|
}
|
|
33
|
-
async getIdentity(
|
|
43
|
+
async getIdentity(bucket) {
|
|
34
44
|
await this.cache.purgeExpired().catch((error) => {
|
|
35
45
|
console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error);
|
|
36
46
|
});
|
|
37
|
-
const session = await this.createSessionFn(
|
|
47
|
+
const session = await this.createSessionFn(bucket);
|
|
38
48
|
if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {
|
|
39
49
|
throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
|
|
40
50
|
}
|
|
@@ -54,8 +54,9 @@ export const getSsecPlugin = (config) => ({
|
|
|
54
54
|
});
|
|
55
55
|
export function isValidBase64EncodedSSECustomerKey(str, options) {
|
|
56
56
|
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
57
|
-
if (!base64Regex.test(str))
|
|
57
|
+
if (!base64Regex.test(str)) {
|
|
58
58
|
return false;
|
|
59
|
+
}
|
|
59
60
|
try {
|
|
60
61
|
const decodedBytes = options.base64Decoder(str);
|
|
61
62
|
return decodedBytes.length === 32;
|
|
@@ -5,8 +5,9 @@ import { CONTEXT_ARN_REGION, CONTEXT_OUTPOST_ID, CONTEXT_SIGNING_REGION, CONTEXT
|
|
|
5
5
|
export const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (args) => {
|
|
6
6
|
const { input } = args;
|
|
7
7
|
const parameter = input.Name && validateArn(input.Name) ? "Name" : input.Bucket && validateArn(input.Bucket) ? "Bucket" : undefined;
|
|
8
|
-
if (!parameter)
|
|
8
|
+
if (!parameter) {
|
|
9
9
|
return next(args);
|
|
10
|
+
}
|
|
10
11
|
const clientRegion = await options.region();
|
|
11
12
|
const useArnRegion = await options.useArnRegion();
|
|
12
13
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
@@ -52,8 +53,9 @@ export const parseOutpostArnablesMiddleaware = (options) => (next, context) => a
|
|
|
52
53
|
if (!input.AccountId) {
|
|
53
54
|
input.AccountId = arn.accountId;
|
|
54
55
|
}
|
|
55
|
-
if (useArnRegion)
|
|
56
|
+
if (useArnRegion) {
|
|
56
57
|
context[CONTEXT_ARN_REGION] = arn.region;
|
|
58
|
+
}
|
|
57
59
|
return next(args);
|
|
58
60
|
};
|
|
59
61
|
export const parseOutpostArnablesMiddleawareOptions = {
|
|
@@ -3,8 +3,9 @@ import { CONTEXT_SIGNING_SERVICE } from "../constants";
|
|
|
3
3
|
import { getOutpostEndpoint } from "../middleware-process-arnables/getOutpostEndpoint";
|
|
4
4
|
export const redirectFromPostIdMiddleware = (config) => (next, context) => async (args) => {
|
|
5
5
|
const { input, request } = args;
|
|
6
|
-
if (!HttpRequest.isInstance(request))
|
|
6
|
+
if (!HttpRequest.isInstance(request)) {
|
|
7
7
|
return next(args);
|
|
8
|
+
}
|
|
8
9
|
if (input.OutpostId) {
|
|
9
10
|
const { isCustomEndpoint } = config;
|
|
10
11
|
const useFipsEndpoint = await config.useFipsEndpoint();
|
|
@@ -12,5 +12,6 @@ export declare class S3ExpressIdentityCache {
|
|
|
12
12
|
get(key: string): undefined | S3ExpressIdentityCacheEntry;
|
|
13
13
|
set(key: string, entry: S3ExpressIdentityCacheEntry): S3ExpressIdentityCacheEntry;
|
|
14
14
|
delete(key: string): void;
|
|
15
|
+
clear(): void;
|
|
15
16
|
purgeExpired(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -21,7 +21,9 @@ export declare class S3ExpressIdentityProviderImpl implements S3ExpressIdentityP
|
|
|
21
21
|
private createSessionFn;
|
|
22
22
|
private cache;
|
|
23
23
|
static REFRESH_WINDOW_MS: number;
|
|
24
|
-
|
|
24
|
+
private accessKeyId?;
|
|
25
|
+
private cacheGeneration;
|
|
26
|
+
constructor(createSessionFn: (bucket: string) => Promise<{
|
|
25
27
|
Credentials: Credentials;
|
|
26
28
|
}>, cache?: S3ExpressIdentityCache);
|
|
27
29
|
getS3ExpressIdentity(awsIdentity: AwsCredentialIdentity, identityProperties: {
|
|
@@ -7,5 +7,6 @@ export declare class S3ExpressIdentityCache {
|
|
|
7
7
|
get(key: string): undefined | S3ExpressIdentityCacheEntry;
|
|
8
8
|
set(key: string, entry: S3ExpressIdentityCacheEntry): S3ExpressIdentityCacheEntry;
|
|
9
9
|
delete(key: string): void;
|
|
10
|
+
clear(): void;
|
|
10
11
|
purgeExpired(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -12,8 +12,10 @@ export declare class S3ExpressIdentityProviderImpl implements S3ExpressIdentityP
|
|
|
12
12
|
private createSessionFn;
|
|
13
13
|
private cache;
|
|
14
14
|
static REFRESH_WINDOW_MS: number;
|
|
15
|
+
private accessKeyId?;
|
|
16
|
+
private cacheGeneration;
|
|
15
17
|
constructor(
|
|
16
|
-
createSessionFn: (
|
|
18
|
+
createSessionFn: (bucket: string) => Promise<{
|
|
17
19
|
Credentials: Credentials;
|
|
18
20
|
}>,
|
|
19
21
|
cache?: S3ExpressIdentityCache,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-sdk-s3",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.83",
|
|
4
4
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/middleware-sdk-s3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"test:types": "tsc -p tsconfig.test.json"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@aws-sdk/core": "^3.978.
|
|
98
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
97
|
+
"@aws-sdk/core": "^3.978.7",
|
|
98
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.50",
|
|
99
99
|
"@aws-sdk/types": "^3.975.0",
|
|
100
100
|
"@smithy/core": "^3.37.0",
|
|
101
101
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.52",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"test:watch": "yarn g:vitest watch"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@aws-sdk/core": "^3.978.
|
|
104
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
103
|
+
"@aws-sdk/core": "^3.978.7",
|
|
104
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.50",
|
|
105
105
|
"@aws-sdk/types": "^3.975.0",
|
|
106
106
|
"@smithy/core": "^3.37.0",
|
|
107
107
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1159.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.978.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
51
|
+
"@aws-sdk/core": "^3.978.7",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.997.52",
|
|
53
53
|
"@aws-sdk/types": "^3.975.0",
|
|
54
54
|
"@smithy/core": "^3.37.0",
|
|
55
55
|
"@smithy/types": "^4.19.0",
|
package/package.json
CHANGED
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"constructs": "^10.5.1"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
83
|
-
"@aws-sdk/client-route-53": "^3.
|
|
84
|
-
"@aws-sdk/client-s3": "^3.
|
|
85
|
-
"@aws-sdk/client-ses": "^3.
|
|
86
|
-
"@aws-sdk/client-ssm": "^3.
|
|
82
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.1159.0",
|
|
83
|
+
"@aws-sdk/client-route-53": "^3.1159.0",
|
|
84
|
+
"@aws-sdk/client-s3": "^3.1159.0",
|
|
85
|
+
"@aws-sdk/client-ses": "^3.1159.0",
|
|
86
|
+
"@aws-sdk/client-ssm": "^3.1159.0",
|
|
87
87
|
"@mavogel/mvc-projen": "^0.0.67",
|
|
88
88
|
"cdk-nag": "^3.0.1",
|
|
89
89
|
"constructs": "^10.5.1",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"publishConfig": {
|
|
123
123
|
"access": "public"
|
|
124
124
|
},
|
|
125
|
-
"version": "0.1.
|
|
125
|
+
"version": "0.1.34",
|
|
126
126
|
"jest": {
|
|
127
127
|
"coverageProvider": "v8",
|
|
128
128
|
"transformIgnorePatterns": [
|