@cdk8s/awscdk-resolver 0.0.135 → 0.0.137
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 +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormationClient.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormationClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/package.json +18 -18
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +9 -15
- package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/package.json +15 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +9 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +17 -17
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +9 -15
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +17 -4
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +9 -15
- package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/package.json +17 -17
- package/node_modules/@aws-sdk/core/account-id-endpoint.js +6 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +97 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +27 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.js +15 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConstants.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.js +24 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/index.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +18 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +3 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +30 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +10 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +25 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +15 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +12 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +17 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +2 -1
- package/node_modules/@aws-sdk/core/package.json +18 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-env/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js +4 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +30 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +29 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +9 -3
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-process/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +11 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +9 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +2 -1
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +2 -1
- package/node_modules/@smithy/core/package.json +5 -5
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js +1 -0
- package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts +1 -0
- package/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts +1 -0
- package/node_modules/@smithy/credential-provider-imds/package.json +1 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +1 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +7 -0
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +7 -0
- package/node_modules/@smithy/middleware-endpoint/package.json +1 -1
- package/node_modules/@smithy/middleware-retry/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +1 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -16
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -2
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -2
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts +2 -2
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +1 -0
- package/node_modules/@smithy/smithy-client/dist-es/command.js +1 -0
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +3 -3
- package/node_modules/@smithy/util-stream/dist-types/stream-type-check.d.ts +9 -1
- package/node_modules/@smithy/util-stream/dist-types/ts3.4/stream-type-check.d.ts +9 -1
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/fast-xml-parser/CHANGELOG.md +349 -309
- package/node_modules/fast-xml-parser/README.md +83 -51
- package/node_modules/fast-xml-parser/package.json +8 -5
- package/node_modules/fast-xml-parser/src/fxp.d.ts +365 -71
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/validator.js +2 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +31 -9
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +25 -12
- package/package.json +8 -8
- package/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js +0 -12
- package/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts +0 -6
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts +0 -6
@@ -1294,6 +1294,15 @@ var import_EndpointParameters9 = require("./endpoint/EndpointParameters");
|
|
1294
1294
|
|
1295
1295
|
// src/defaultStsRoleAssumers.ts
|
1296
1296
|
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
1297
|
+
var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {
|
1298
|
+
if (typeof (assumedRoleUser == null ? void 0 : assumedRoleUser.Arn) === "string") {
|
1299
|
+
const arnComponents = assumedRoleUser.Arn.split(":");
|
1300
|
+
if (arnComponents.length > 4 && arnComponents[4] !== "") {
|
1301
|
+
return arnComponents[4];
|
1302
|
+
}
|
1303
|
+
}
|
1304
|
+
return void 0;
|
1305
|
+
}, "getAccountIdFromAssumedRoleUser");
|
1297
1306
|
var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {
|
1298
1307
|
var _a2;
|
1299
1308
|
const region = typeof _region === "function" ? await _region() : _region;
|
@@ -1334,17 +1343,19 @@ var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) =
|
|
1334
1343
|
logger
|
1335
1344
|
});
|
1336
1345
|
}
|
1337
|
-
const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params));
|
1346
|
+
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));
|
1338
1347
|
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
|
1339
1348
|
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
1340
1349
|
}
|
1350
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
1341
1351
|
return {
|
1342
1352
|
accessKeyId: Credentials2.AccessKeyId,
|
1343
1353
|
secretAccessKey: Credentials2.SecretAccessKey,
|
1344
1354
|
sessionToken: Credentials2.SessionToken,
|
1345
1355
|
expiration: Credentials2.Expiration,
|
1346
1356
|
// TODO(credentialScope): access normally when shape is updated.
|
1347
|
-
credentialScope: Credentials2.CredentialScope
|
1357
|
+
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
1358
|
+
...accountId && { accountId }
|
1348
1359
|
};
|
1349
1360
|
};
|
1350
1361
|
}, "getDefaultRoleAssumer");
|
@@ -1370,17 +1381,19 @@ var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, s
|
|
1370
1381
|
logger
|
1371
1382
|
});
|
1372
1383
|
}
|
1373
|
-
const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
1384
|
+
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
1374
1385
|
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
|
1375
1386
|
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
1376
1387
|
}
|
1388
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
1377
1389
|
return {
|
1378
1390
|
accessKeyId: Credentials2.AccessKeyId,
|
1379
1391
|
secretAccessKey: Credentials2.SecretAccessKey,
|
1380
1392
|
sessionToken: Credentials2.SessionToken,
|
1381
1393
|
expiration: Credentials2.Expiration,
|
1382
1394
|
// TODO(credentialScope): access normally when shape is updated.
|
1383
|
-
credentialScope: Credentials2.CredentialScope
|
1395
|
+
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
1396
|
+
...accountId && { accountId }
|
1384
1397
|
};
|
1385
1398
|
};
|
1386
1399
|
}, "getDefaultRoleAssumerWithWebIdentity");
|
@@ -17,36 +17,30 @@ export class STSClient extends __Client {
|
|
17
17
|
constructor(...[configuration]) {
|
18
18
|
const _config_0 = __getRuntimeConfig(configuration || {});
|
19
19
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
20
|
-
const _config_2 =
|
21
|
-
const _config_3 =
|
22
|
-
const _config_4 =
|
20
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
21
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
22
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
23
23
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
24
|
-
const _config_6 =
|
24
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
25
25
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
26
26
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
27
27
|
super(_config_8);
|
28
28
|
this.config = _config_8;
|
29
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
29
30
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
30
31
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
31
32
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
32
33
|
this.middlewareStack.use(getLoggerPlugin(this.config));
|
33
34
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
34
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
35
35
|
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
36
|
-
httpAuthSchemeParametersProvider:
|
37
|
-
identityProviderConfigProvider:
|
36
|
+
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
37
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
38
|
+
"aws.auth#sigv4": config.credentials,
|
39
|
+
}),
|
38
40
|
}));
|
39
41
|
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
40
42
|
}
|
41
43
|
destroy() {
|
42
44
|
super.destroy();
|
43
45
|
}
|
44
|
-
getDefaultHttpAuthSchemeParametersProvider() {
|
45
|
-
return defaultSTSHttpAuthSchemeParametersProvider;
|
46
|
-
}
|
47
|
-
getIdentityProviderConfigProvider() {
|
48
|
-
return async (config) => new DefaultIdentityProviderConfig({
|
49
|
-
"aws.auth#sigv4": config.credentials,
|
50
|
-
});
|
51
|
-
}
|
52
46
|
}
|
@@ -1,6 +1,15 @@
|
|
1
1
|
import { AssumeRoleCommand } from "./commands/AssumeRoleCommand";
|
2
2
|
import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
|
3
3
|
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
4
|
+
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
5
|
+
if (typeof assumedRoleUser?.Arn === "string") {
|
6
|
+
const arnComponents = assumedRoleUser.Arn.split(":");
|
7
|
+
if (arnComponents.length > 4 && arnComponents[4] !== "") {
|
8
|
+
return arnComponents[4];
|
9
|
+
}
|
10
|
+
}
|
11
|
+
return undefined;
|
12
|
+
};
|
4
13
|
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
|
5
14
|
const region = typeof _region === "function" ? await _region() : _region;
|
6
15
|
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
@@ -22,16 +31,18 @@ export const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
22
31
|
logger: logger,
|
23
32
|
});
|
24
33
|
}
|
25
|
-
const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));
|
34
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
26
35
|
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
27
36
|
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
28
37
|
}
|
38
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
29
39
|
return {
|
30
40
|
accessKeyId: Credentials.AccessKeyId,
|
31
41
|
secretAccessKey: Credentials.SecretAccessKey,
|
32
42
|
sessionToken: Credentials.SessionToken,
|
33
43
|
expiration: Credentials.Expiration,
|
34
|
-
credentialScope: Credentials.CredentialScope,
|
44
|
+
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
45
|
+
...(accountId && { accountId }),
|
35
46
|
};
|
36
47
|
};
|
37
48
|
};
|
@@ -47,16 +58,18 @@ export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor)
|
|
47
58
|
logger: logger,
|
48
59
|
});
|
49
60
|
}
|
50
|
-
const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
61
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
51
62
|
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
52
63
|
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
53
64
|
}
|
65
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
54
66
|
return {
|
55
67
|
accessKeyId: Credentials.AccessKeyId,
|
56
68
|
secretAccessKey: Credentials.SecretAccessKey,
|
57
69
|
sessionToken: Credentials.SessionToken,
|
58
70
|
expiration: Credentials.Expiration,
|
59
|
-
credentialScope: Credentials.CredentialScope,
|
71
|
+
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
72
|
+
...(accountId && { accountId }),
|
60
73
|
};
|
61
74
|
};
|
62
75
|
};
|
@@ -139,7 +139,7 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
139
139
|
/**
|
140
140
|
* @public
|
141
141
|
*/
|
142
|
-
export type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults &
|
142
|
+
export type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
143
143
|
/**
|
144
144
|
* @public
|
145
145
|
*
|
@@ -150,7 +150,7 @@ export interface STSClientConfig extends STSClientConfigType {
|
|
150
150
|
/**
|
151
151
|
* @public
|
152
152
|
*/
|
153
|
-
export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig &
|
153
|
+
export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
154
154
|
/**
|
155
155
|
* @public
|
156
156
|
*
|
@@ -177,6 +177,4 @@ export declare class STSClient extends __Client<__HttpHandlerOptions, ServiceInp
|
|
177
177
|
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
178
178
|
*/
|
179
179
|
destroy(): void;
|
180
|
-
private getDefaultHttpAuthSchemeParametersProvider;
|
181
|
-
private getIdentityProviderConfigProvider;
|
182
180
|
}
|
@@ -40,12 +40,12 @@ export declare const resolveStsAuthConfig: <T>(input: T & StsAuthInputConfig) =>
|
|
40
40
|
*/
|
41
41
|
export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AwsSdkSigV4AuthInputConfig {
|
42
42
|
/**
|
43
|
-
*
|
43
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
44
44
|
* @internal
|
45
45
|
*/
|
46
46
|
httpAuthSchemes?: HttpAuthScheme[];
|
47
47
|
/**
|
48
|
-
*
|
48
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
49
49
|
* @internal
|
50
50
|
*/
|
51
51
|
httpAuthSchemeProvider?: STSHttpAuthSchemeProvider;
|
@@ -55,12 +55,12 @@ export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AwsSdkSig
|
|
55
55
|
*/
|
56
56
|
export interface HttpAuthSchemeResolvedConfig extends StsAuthResolvedConfig, AwsSdkSigV4AuthResolvedConfig {
|
57
57
|
/**
|
58
|
-
*
|
58
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
59
59
|
* @internal
|
60
60
|
*/
|
61
61
|
readonly httpAuthSchemes: HttpAuthScheme[];
|
62
62
|
/**
|
63
|
-
*
|
63
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
64
64
|
* @internal
|
65
65
|
*/
|
66
66
|
readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider;
|
@@ -27,13 +27,13 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
27
27
|
serviceId: string;
|
28
28
|
logger: import("@smithy/types").Logger;
|
29
29
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
30
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
31
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
30
32
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
31
33
|
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
32
34
|
logger?: import("@smithy/types").Logger | undefined;
|
33
35
|
} | undefined) => import("@smithy/types").EndpointV2;
|
34
36
|
tls?: boolean | undefined;
|
35
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
36
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
37
37
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
|
38
38
|
schemeId: string;
|
39
39
|
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
@@ -34,13 +34,13 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
34
34
|
serviceId: string;
|
35
35
|
logger: import("@smithy/types").Logger;
|
36
36
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
37
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
38
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
37
39
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
38
40
|
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
39
41
|
logger?: import("@smithy/types").Logger | undefined;
|
40
42
|
} | undefined) => import("@smithy/types").EndpointV2;
|
41
43
|
tls?: boolean | undefined;
|
42
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
43
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
44
44
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
|
45
45
|
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
46
46
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
@@ -26,13 +26,13 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
26
26
|
logger: import("@smithy/types").Logger;
|
27
27
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
28
28
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
29
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
30
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
29
31
|
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined;
|
30
32
|
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
31
33
|
logger?: import("@smithy/types").Logger | undefined;
|
32
34
|
} | undefined) => import("@smithy/types").EndpointV2;
|
33
35
|
tls?: boolean | undefined;
|
34
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
35
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
36
36
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
|
37
37
|
schemeId: string;
|
38
38
|
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
@@ -131,11 +131,11 @@ export type STSClientConfigType = Partial<
|
|
131
131
|
__SmithyConfiguration<__HttpHandlerOptions>
|
132
132
|
> &
|
133
133
|
ClientDefaults &
|
134
|
-
|
135
|
-
EndpointInputConfig<EndpointParameters> &
|
134
|
+
UserAgentInputConfig &
|
136
135
|
RetryInputConfig &
|
136
|
+
RegionInputConfig &
|
137
137
|
HostHeaderInputConfig &
|
138
|
-
|
138
|
+
EndpointInputConfig<EndpointParameters> &
|
139
139
|
HttpAuthSchemeInputConfig &
|
140
140
|
ClientInputEndpointParameters;
|
141
141
|
export interface STSClientConfig extends STSClientConfigType {}
|
@@ -143,11 +143,11 @@ export type STSClientResolvedConfigType =
|
|
143
143
|
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
144
144
|
Required<ClientDefaults> &
|
145
145
|
RuntimeExtensionsConfig &
|
146
|
-
|
147
|
-
EndpointResolvedConfig<EndpointParameters> &
|
146
|
+
UserAgentResolvedConfig &
|
148
147
|
RetryResolvedConfig &
|
148
|
+
RegionResolvedConfig &
|
149
149
|
HostHeaderResolvedConfig &
|
150
|
-
|
150
|
+
EndpointResolvedConfig<EndpointParameters> &
|
151
151
|
HttpAuthSchemeResolvedConfig &
|
152
152
|
ClientResolvedEndpointParameters;
|
153
153
|
export interface STSClientResolvedConfig extends STSClientResolvedConfigType {}
|
@@ -160,6 +160,4 @@ export declare class STSClient extends __Client<
|
|
160
160
|
readonly config: STSClientResolvedConfig;
|
161
161
|
constructor(...[configuration]: __CheckOptionalClientConfig<STSClientConfig>);
|
162
162
|
destroy(): void;
|
163
|
-
private getDefaultHttpAuthSchemeParametersProvider;
|
164
|
-
private getIdentityProviderConfigProvider;
|
165
163
|
}
|
@@ -32,6 +32,11 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
32
32
|
serviceId: string;
|
33
33
|
logger: import("@smithy/types").Logger;
|
34
34
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
35
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
36
|
+
retryStrategy?:
|
37
|
+
| import("@smithy/types").RetryStrategy
|
38
|
+
| import("@smithy/types").RetryStrategyV2
|
39
|
+
| undefined;
|
35
40
|
endpoint?:
|
36
41
|
| ((
|
37
42
|
| string
|
@@ -58,11 +63,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
58
63
|
| undefined
|
59
64
|
) => import("@smithy/types").EndpointV2;
|
60
65
|
tls?: boolean | undefined;
|
61
|
-
retryStrategy?:
|
62
|
-
| import("@smithy/types").RetryStrategy
|
63
|
-
| import("@smithy/types").RetryStrategyV2
|
64
|
-
| undefined;
|
65
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
66
66
|
httpAuthSchemes:
|
67
67
|
| import("@smithy/types").HttpAuthScheme[]
|
68
68
|
| (
|
@@ -51,6 +51,11 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
51
51
|
serviceId: string;
|
52
52
|
logger: import("@smithy/types").Logger;
|
53
53
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
54
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
55
|
+
retryStrategy?:
|
56
|
+
| import("@smithy/types").RetryStrategy
|
57
|
+
| import("@smithy/types").RetryStrategyV2
|
58
|
+
| undefined;
|
54
59
|
endpoint?:
|
55
60
|
| ((
|
56
61
|
| string
|
@@ -77,11 +82,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
77
82
|
| undefined
|
78
83
|
) => import("@smithy/types").EndpointV2;
|
79
84
|
tls?: boolean | undefined;
|
80
|
-
retryStrategy?:
|
81
|
-
| import("@smithy/types").RetryStrategy
|
82
|
-
| import("@smithy/types").RetryStrategyV2
|
83
|
-
| undefined;
|
84
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
85
85
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
|
86
86
|
credentials?:
|
87
87
|
| import("@smithy/types").AwsCredentialIdentity
|
@@ -36,6 +36,11 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
36
36
|
| import("@smithy/types").Provider<
|
37
37
|
import("@smithy/smithy-client").DefaultsMode
|
38
38
|
>;
|
39
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
40
|
+
retryStrategy?:
|
41
|
+
| import("@smithy/types").RetryStrategy
|
42
|
+
| import("@smithy/types").RetryStrategyV2
|
43
|
+
| undefined;
|
39
44
|
endpoint?:
|
40
45
|
| string
|
41
46
|
| import("@smithy/types").Endpoint
|
@@ -52,11 +57,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
52
57
|
| undefined
|
53
58
|
) => import("@smithy/types").EndpointV2;
|
54
59
|
tls?: boolean | undefined;
|
55
|
-
retryStrategy?:
|
56
|
-
| import("@smithy/types").RetryStrategy
|
57
|
-
| import("@smithy/types").RetryStrategyV2
|
58
|
-
| undefined;
|
59
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
60
60
|
httpAuthSchemes:
|
61
61
|
| import("@smithy/types").HttpAuthScheme[]
|
62
62
|
| (
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/client-sts",
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
4
|
-
"version": "3.
|
4
|
+
"version": "3.623.0",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sts",
|
@@ -22,39 +22,39 @@
|
|
22
22
|
"dependencies": {
|
23
23
|
"@aws-crypto/sha256-browser": "5.2.0",
|
24
24
|
"@aws-crypto/sha256-js": "5.2.0",
|
25
|
-
"@aws-sdk/client-sso-oidc": "3.
|
26
|
-
"@aws-sdk/core": "3.
|
27
|
-
"@aws-sdk/credential-provider-node": "3.
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
25
|
+
"@aws-sdk/client-sso-oidc": "3.623.0",
|
26
|
+
"@aws-sdk/core": "3.623.0",
|
27
|
+
"@aws-sdk/credential-provider-node": "3.623.0",
|
28
|
+
"@aws-sdk/middleware-host-header": "3.620.0",
|
29
29
|
"@aws-sdk/middleware-logger": "3.609.0",
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
31
|
-
"@aws-sdk/middleware-user-agent": "3.
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "3.620.0",
|
31
|
+
"@aws-sdk/middleware-user-agent": "3.620.0",
|
32
32
|
"@aws-sdk/region-config-resolver": "3.614.0",
|
33
33
|
"@aws-sdk/types": "3.609.0",
|
34
34
|
"@aws-sdk/util-endpoints": "3.614.0",
|
35
35
|
"@aws-sdk/util-user-agent-browser": "3.609.0",
|
36
36
|
"@aws-sdk/util-user-agent-node": "3.614.0",
|
37
37
|
"@smithy/config-resolver": "^3.0.5",
|
38
|
-
"@smithy/core": "^2.2
|
39
|
-
"@smithy/fetch-http-handler": "^3.2.
|
38
|
+
"@smithy/core": "^2.3.2",
|
39
|
+
"@smithy/fetch-http-handler": "^3.2.4",
|
40
40
|
"@smithy/hash-node": "^3.0.3",
|
41
41
|
"@smithy/invalid-dependency": "^3.0.3",
|
42
|
-
"@smithy/middleware-content-length": "^3.0.
|
43
|
-
"@smithy/middleware-endpoint": "^3.0
|
44
|
-
"@smithy/middleware-retry": "^3.0.
|
42
|
+
"@smithy/middleware-content-length": "^3.0.5",
|
43
|
+
"@smithy/middleware-endpoint": "^3.1.0",
|
44
|
+
"@smithy/middleware-retry": "^3.0.14",
|
45
45
|
"@smithy/middleware-serde": "^3.0.3",
|
46
46
|
"@smithy/middleware-stack": "^3.0.3",
|
47
47
|
"@smithy/node-config-provider": "^3.1.4",
|
48
|
-
"@smithy/node-http-handler": "^3.1.
|
49
|
-
"@smithy/protocol-http": "^4.0
|
50
|
-
"@smithy/smithy-client": "^3.1.
|
48
|
+
"@smithy/node-http-handler": "^3.1.4",
|
49
|
+
"@smithy/protocol-http": "^4.1.0",
|
50
|
+
"@smithy/smithy-client": "^3.1.12",
|
51
51
|
"@smithy/types": "^3.3.0",
|
52
52
|
"@smithy/url-parser": "^3.0.3",
|
53
53
|
"@smithy/util-base64": "^3.0.0",
|
54
54
|
"@smithy/util-body-length-browser": "^3.0.0",
|
55
55
|
"@smithy/util-body-length-node": "^3.0.0",
|
56
|
-
"@smithy/util-defaults-mode-browser": "^3.0.
|
57
|
-
"@smithy/util-defaults-mode-node": "^3.0.
|
56
|
+
"@smithy/util-defaults-mode-browser": "^3.0.14",
|
57
|
+
"@smithy/util-defaults-mode-node": "^3.0.14",
|
58
58
|
"@smithy/util-endpoints": "^2.0.5",
|
59
59
|
"@smithy/util-middleware": "^3.0.3",
|
60
60
|
"@smithy/util-retry": "^3.0.3",
|
@@ -0,0 +1,97 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
+
|
21
|
+
// src/submodules/account-id-endpoint/index.ts
|
22
|
+
var account_id_endpoint_exports = {};
|
23
|
+
__export(account_id_endpoint_exports, {
|
24
|
+
ACCOUNT_ID_ENDPOINT_MODE_VALUES: () => ACCOUNT_ID_ENDPOINT_MODE_VALUES,
|
25
|
+
CONFIG_ACCOUNT_ID_ENDPOINT_MODE: () => CONFIG_ACCOUNT_ID_ENDPOINT_MODE,
|
26
|
+
DEFAULT_ACCOUNT_ID_ENDPOINT_MODE: () => DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
27
|
+
ENV_ACCOUNT_ID_ENDPOINT_MODE: () => ENV_ACCOUNT_ID_ENDPOINT_MODE,
|
28
|
+
NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: () => NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,
|
29
|
+
resolveAccountIdEndpointModeConfig: () => resolveAccountIdEndpointModeConfig,
|
30
|
+
validateAccountIdEndpointMode: () => validateAccountIdEndpointMode
|
31
|
+
});
|
32
|
+
module.exports = __toCommonJS(account_id_endpoint_exports);
|
33
|
+
|
34
|
+
// src/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.ts
|
35
|
+
var import_util_middleware = require("@smithy/util-middleware");
|
36
|
+
|
37
|
+
// src/submodules/account-id-endpoint/AccountIdEndpointModeConstants.ts
|
38
|
+
var DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
|
39
|
+
var ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
|
40
|
+
function validateAccountIdEndpointMode(value) {
|
41
|
+
return ACCOUNT_ID_ENDPOINT_MODE_VALUES.includes(value);
|
42
|
+
}
|
43
|
+
__name(validateAccountIdEndpointMode, "validateAccountIdEndpointMode");
|
44
|
+
|
45
|
+
// src/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.ts
|
46
|
+
var resolveAccountIdEndpointModeConfig = /* @__PURE__ */ __name((input) => {
|
47
|
+
return {
|
48
|
+
...input,
|
49
|
+
accountIdEndpointMode: async () => {
|
50
|
+
const accountIdEndpointModeProvider = (0, import_util_middleware.normalizeProvider)(
|
51
|
+
input.accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE
|
52
|
+
);
|
53
|
+
const accIdMode = await accountIdEndpointModeProvider();
|
54
|
+
if (!validateAccountIdEndpointMode(accIdMode)) {
|
55
|
+
throw new Error(
|
56
|
+
`Invalid value for accountIdEndpointMode: ${accIdMode}. Valid values are: "required", "preferred", "disabled".`
|
57
|
+
);
|
58
|
+
}
|
59
|
+
return accIdMode;
|
60
|
+
}
|
61
|
+
};
|
62
|
+
}, "resolveAccountIdEndpointModeConfig");
|
63
|
+
|
64
|
+
// src/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.ts
|
65
|
+
var err = "Invalid AccountIdEndpointMode value";
|
66
|
+
var _throw = /* @__PURE__ */ __name((message) => {
|
67
|
+
throw new Error(message);
|
68
|
+
}, "_throw");
|
69
|
+
var ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
|
70
|
+
var CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
|
71
|
+
var NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = {
|
72
|
+
environmentVariableSelector: (env) => {
|
73
|
+
const value = env[ENV_ACCOUNT_ID_ENDPOINT_MODE];
|
74
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
75
|
+
_throw(err);
|
76
|
+
}
|
77
|
+
return value;
|
78
|
+
},
|
79
|
+
configFileSelector: (profile) => {
|
80
|
+
const value = profile[CONFIG_ACCOUNT_ID_ENDPOINT_MODE];
|
81
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
82
|
+
_throw(err);
|
83
|
+
}
|
84
|
+
return value;
|
85
|
+
},
|
86
|
+
default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE
|
87
|
+
};
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
89
|
+
0 && (module.exports = {
|
90
|
+
ACCOUNT_ID_ENDPOINT_MODE_VALUES,
|
91
|
+
CONFIG_ACCOUNT_ID_ENDPOINT_MODE,
|
92
|
+
DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
93
|
+
ENV_ACCOUNT_ID_ENDPOINT_MODE,
|
94
|
+
NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,
|
95
|
+
resolveAccountIdEndpointModeConfig,
|
96
|
+
validateAccountIdEndpointMode
|
97
|
+
});
|
@@ -22,6 +22,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
22
22
|
var httpAuthSchemes_exports = {};
|
23
23
|
__export(httpAuthSchemes_exports, {
|
24
24
|
AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
|
25
|
+
AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
|
25
26
|
AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
|
26
27
|
resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
|
27
28
|
resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config
|
@@ -74,11 +75,13 @@ var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties)
|
|
74
75
|
);
|
75
76
|
const signer = await signerFunction(authScheme);
|
76
77
|
const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion;
|
78
|
+
const signingRegionSet = signingProperties == null ? void 0 : signingProperties.signingRegionSet;
|
77
79
|
const signingName = signingProperties == null ? void 0 : signingProperties.signingName;
|
78
80
|
return {
|
79
81
|
config,
|
80
82
|
signer,
|
81
83
|
signingRegion,
|
84
|
+
signingRegionSet,
|
82
85
|
signingName
|
83
86
|
};
|
84
87
|
}, "validateSigningProperties");
|
@@ -122,6 +125,29 @@ __name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer");
|
|
122
125
|
var AwsSdkSigV4Signer = _AwsSdkSigV4Signer;
|
123
126
|
var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
|
124
127
|
|
128
|
+
// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts
|
129
|
+
var import_protocol_http3 = require("@smithy/protocol-http");
|
130
|
+
var _AwsSdkSigV4ASigner = class _AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
|
131
|
+
async sign(httpRequest, identity, signingProperties) {
|
132
|
+
var _a;
|
133
|
+
if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {
|
134
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
135
|
+
}
|
136
|
+
const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(
|
137
|
+
signingProperties
|
138
|
+
);
|
139
|
+
const multiRegionOverride = ((_a = signingRegionSet == null ? void 0 : signingRegionSet.join) == null ? void 0 : _a.call(signingRegionSet, ",")) ?? signingRegion;
|
140
|
+
const signedRequest = await signer.sign(httpRequest, {
|
141
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
142
|
+
signingRegion: multiRegionOverride,
|
143
|
+
signingService: signingName
|
144
|
+
});
|
145
|
+
return signedRequest;
|
146
|
+
}
|
147
|
+
};
|
148
|
+
__name(_AwsSdkSigV4ASigner, "AwsSdkSigV4ASigner");
|
149
|
+
var AwsSdkSigV4ASigner = _AwsSdkSigV4ASigner;
|
150
|
+
|
125
151
|
// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts
|
126
152
|
var import_core = require("@smithy/core");
|
127
153
|
var import_signature_v4 = require("@smithy/signature-v4");
|
@@ -220,6 +246,7 @@ var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
|
|
220
246
|
// Annotate the CommonJS export names for ESM import in node:
|
221
247
|
0 && (module.exports = {
|
222
248
|
AWSSDKSigV4Signer,
|
249
|
+
AwsSdkSigV4ASigner,
|
223
250
|
AwsSdkSigV4Signer,
|
224
251
|
resolveAWSSDKSigV4Config,
|
225
252
|
resolveAwsSdkSigV4Config
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { normalizeProvider } from "@smithy/util-middleware";
|
2
|
+
import { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
|
3
|
+
export const resolveAccountIdEndpointModeConfig = (input) => {
|
4
|
+
return {
|
5
|
+
...input,
|
6
|
+
accountIdEndpointMode: async () => {
|
7
|
+
const accountIdEndpointModeProvider = normalizeProvider(input.accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);
|
8
|
+
const accIdMode = await accountIdEndpointModeProvider();
|
9
|
+
if (!validateAccountIdEndpointMode(accIdMode)) {
|
10
|
+
throw new Error(`Invalid value for accountIdEndpointMode: ${accIdMode}. Valid values are: "required", "preferred", "disabled".`);
|
11
|
+
}
|
12
|
+
return accIdMode;
|
13
|
+
},
|
14
|
+
};
|
15
|
+
};
|