@cdklabs/cdk-ecs-codedeploy 0.0.223 → 0.0.225
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/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +4 -4
- package/node_modules/@aws-sdk/client-sso/package.json +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +17 -3
- package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +67 -0
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +14 -0
- package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +17 -3
- package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js +60 -0
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/index.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +15 -1
- package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +13 -11
- package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +71 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +15 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +13 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +16 -6
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts +15 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +11 -9
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +54 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +36 -9
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +27 -9
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +39 -12
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts +36 -4
- package/node_modules/@aws-sdk/client-sts/package.json +5 -5
- package/node_modules/@aws-sdk/core/CHANGELOG.md +22 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +55 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +81 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +10 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js +4 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js +6 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js +5 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js +6 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js +6 -0
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +49 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/index.js +2 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +77 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +6 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js +2 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +8 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js +2 -0
- package/node_modules/@aws-sdk/core/dist-es/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +76 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +10 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -0
- package/node_modules/@aws-sdk/core/dist-types/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +20 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +46 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +6 -2
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.ts +118 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/index.ts +2 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.ts +216 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.ts +9 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts +1 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts +7 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts +17 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts +8 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts +37 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts +18 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts +3 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts +32 -0
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts +12 -0
- package/node_modules/@aws-sdk/core/src/index.ts +1 -0
- package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
- package/node_modules/{@aws-sdk/middleware-sdk-sts → @smithy/core}/LICENSE +1 -1
- package/node_modules/@smithy/core/README.md +12 -0
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +6 -0
- package/node_modules/@smithy/core/dist-cjs/index.js +12 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +22 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +22 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +45 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +6 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +20 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +28 -0
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +5 -0
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +10 -0
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +32 -0
- package/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js +72 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +17 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +37 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +14 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +6 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +9 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +6 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +59 -0
- package/node_modules/@smithy/core/dist-es/getSmithyContext.js +2 -0
- package/node_modules/@smithy/core/dist-es/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +18 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +18 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +40 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +3 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +16 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +24 -0
- package/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +2 -0
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +6 -0
- package/node_modules/@smithy/core/dist-es/pagination/createPaginator.js +27 -0
- package/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +67 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +13 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +33 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +10 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +3 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +5 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +3 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +53 -0
- package/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/index.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts +51 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/pagination/createPaginator.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts +51 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
- package/node_modules/@smithy/core/package.json +67 -0
- package/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-sdk-sts/README.md +0 -4
- package/node_modules/@aws-sdk/middleware-sdk-sts/dist-cjs/index.js +0 -9
- package/node_modules/@aws-sdk/middleware-sdk-sts/dist-es/index.js +0 -5
- package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/index.d.ts +0 -37
- package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/ts3.4/index.d.ts +0 -34
- package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +0 -55
|
@@ -8,6 +8,7 @@ const core_1 = require("@aws-sdk/core");
|
|
|
8
8
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
9
9
|
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
10
10
|
const config_resolver_1 = require("@smithy/config-resolver");
|
|
11
|
+
const core_2 = require("@smithy/core");
|
|
11
12
|
const hash_node_1 = require("@smithy/hash-node");
|
|
12
13
|
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
13
14
|
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
@@ -33,6 +34,19 @@ const getRuntimeConfig = (config) => {
|
|
|
33
34
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
|
|
34
35
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
36
|
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
37
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
38
|
+
{
|
|
39
|
+
schemeId: "aws.auth#sigv4",
|
|
40
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
|
|
41
|
+
(async (idProps) => await (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider)(idProps?.__config || {})()),
|
|
42
|
+
signer: new core_1.AWSSDKSigV4Signer(),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
schemeId: "smithy.api#noAuth",
|
|
46
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
47
|
+
signer: new core_2.NoAuthSigner(),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
36
50
|
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
37
51
|
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
38
52
|
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
4
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
6
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
7
9
|
const util_utf8_1 = require("@smithy/util-utf8");
|
|
10
|
+
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
8
11
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
9
12
|
const getRuntimeConfig = (config) => {
|
|
10
13
|
return {
|
|
@@ -14,6 +17,19 @@ const getRuntimeConfig = (config) => {
|
|
|
14
17
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
18
|
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
16
19
|
extensions: config?.extensions ?? [],
|
|
20
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
|
|
21
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
22
|
+
{
|
|
23
|
+
schemeId: "aws.auth#sigv4",
|
|
24
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
25
|
+
signer: new core_1.AWSSDKSigV4Signer(),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
schemeId: "smithy.api#noAuth",
|
|
29
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
30
|
+
signer: new core_2.NoAuthSigner(),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
17
33
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
18
34
|
serviceId: config?.serviceId ?? "STS",
|
|
19
35
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
@@ -4,12 +4,14 @@ exports.resolveRuntimeExtensions = void 0;
|
|
|
4
4
|
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
|
|
7
8
|
const asPartial = (t) => t;
|
|
8
9
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
10
|
const extensionConfiguration = {
|
|
10
11
|
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
12
|
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
13
|
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
14
|
+
...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),
|
|
13
15
|
};
|
|
14
16
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
17
|
return {
|
|
@@ -17,6 +19,7 @@ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
|
17
19
|
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
20
|
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
21
|
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
22
|
+
...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),
|
|
20
23
|
};
|
|
21
24
|
};
|
|
22
25
|
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
2
2
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
3
3
|
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
4
|
-
import { resolveStsAuthConfig } from "@aws-sdk/middleware-sdk-sts";
|
|
5
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
6
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
7
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
8
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
9
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
10
10
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
11
|
+
import { defaultSTSHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
11
12
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
12
13
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
13
14
|
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
14
15
|
export { __Client };
|
|
15
16
|
export class STSClient extends __Client {
|
|
17
|
+
getDefaultHttpAuthSchemeParametersProvider() {
|
|
18
|
+
return defaultSTSHttpAuthSchemeParametersProvider;
|
|
19
|
+
}
|
|
20
|
+
getIdentityProviderConfigProvider() {
|
|
21
|
+
return async (config) => new DefaultIdentityProviderConfig({
|
|
22
|
+
"aws.auth#sigv4": config.credentials,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
16
25
|
constructor(...[configuration]) {
|
|
17
26
|
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
18
27
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
@@ -20,8 +29,8 @@ export class STSClient extends __Client {
|
|
|
20
29
|
const _config_3 = resolveEndpointConfig(_config_2);
|
|
21
30
|
const _config_4 = resolveRetryConfig(_config_3);
|
|
22
31
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
23
|
-
const _config_6 =
|
|
24
|
-
const _config_7 =
|
|
32
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
33
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
25
34
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
26
35
|
super(_config_8);
|
|
27
36
|
this.config = _config_8;
|
|
@@ -31,6 +40,11 @@ export class STSClient extends __Client {
|
|
|
31
40
|
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
32
41
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
33
42
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
43
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
44
|
+
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
45
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
|
46
|
+
}));
|
|
47
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
34
48
|
}
|
|
35
49
|
destroy() {
|
|
36
50
|
super.destroy();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _credentials = runtimeConfig.credentials;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setCredentials(credentials) {
|
|
25
|
+
_credentials = credentials;
|
|
26
|
+
},
|
|
27
|
+
credentials() {
|
|
28
|
+
return _credentials;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
credentials: config.credentials(),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { resolveAWSSDKSigV4Config, } from "@aws-sdk/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
import { STSClient } from "../STSClient";
|
|
4
|
+
export const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
5
|
+
return {
|
|
6
|
+
operation: getSmithyContext(context).operation,
|
|
7
|
+
region: (await normalizeProvider(config.region)()) ||
|
|
8
|
+
(() => {
|
|
9
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
10
|
+
})(),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
14
|
+
return {
|
|
15
|
+
schemeId: "aws.auth#sigv4",
|
|
16
|
+
signingProperties: {
|
|
17
|
+
name: "sts",
|
|
18
|
+
region: authParameters.region,
|
|
19
|
+
},
|
|
20
|
+
propertiesExtractor: (config, context) => ({
|
|
21
|
+
signingProperties: {
|
|
22
|
+
config,
|
|
23
|
+
context,
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
29
|
+
return {
|
|
30
|
+
schemeId: "smithy.api#noAuth",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export const defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
34
|
+
const options = [];
|
|
35
|
+
switch (authParameters.operation) {
|
|
36
|
+
case "AssumeRoleWithSAML": {
|
|
37
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case "AssumeRoleWithWebIdentity": {
|
|
41
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
default: {
|
|
45
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return options;
|
|
49
|
+
};
|
|
50
|
+
export const resolveStsAuthConfig = (input) => ({
|
|
51
|
+
...input,
|
|
52
|
+
stsClientCtor: STSClient,
|
|
53
|
+
});
|
|
54
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
55
|
+
const config_0 = resolveStsAuthConfig(config);
|
|
56
|
+
const config_1 = resolveAWSSDKSigV4Config(config_0);
|
|
57
|
+
return {
|
|
58
|
+
...config_1,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -23,7 +22,6 @@ export class AssumeRoleCommand extends $Command {
|
|
|
23
22
|
resolveMiddleware(clientStack, configuration, options) {
|
|
24
23
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
25
24
|
this.middlewareStack.use(getEndpointPlugin(configuration, AssumeRoleCommand.getEndpointParameterInstructions()));
|
|
26
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
27
25
|
const stack = clientStack.concat(this.middlewareStack);
|
|
28
26
|
const { logger } = configuration;
|
|
29
27
|
const clientName = "STSClient";
|
package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -22,7 +21,6 @@ export class DecodeAuthorizationMessageCommand extends $Command {
|
|
|
22
21
|
resolveMiddleware(clientStack, configuration, options) {
|
|
23
22
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
23
|
this.middlewareStack.use(getEndpointPlugin(configuration, DecodeAuthorizationMessageCommand.getEndpointParameterInstructions()));
|
|
25
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
26
24
|
const stack = clientStack.concat(this.middlewareStack);
|
|
27
25
|
const { logger } = configuration;
|
|
28
26
|
const clientName = "STSClient";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -22,7 +21,6 @@ export class GetAccessKeyInfoCommand extends $Command {
|
|
|
22
21
|
resolveMiddleware(clientStack, configuration, options) {
|
|
23
22
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
23
|
this.middlewareStack.use(getEndpointPlugin(configuration, GetAccessKeyInfoCommand.getEndpointParameterInstructions()));
|
|
25
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
26
24
|
const stack = clientStack.concat(this.middlewareStack);
|
|
27
25
|
const { logger } = configuration;
|
|
28
26
|
const clientName = "STSClient";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -22,7 +21,6 @@ export class GetCallerIdentityCommand extends $Command {
|
|
|
22
21
|
resolveMiddleware(clientStack, configuration, options) {
|
|
23
22
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
23
|
this.middlewareStack.use(getEndpointPlugin(configuration, GetCallerIdentityCommand.getEndpointParameterInstructions()));
|
|
25
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
26
24
|
const stack = clientStack.concat(this.middlewareStack);
|
|
27
25
|
const { logger } = configuration;
|
|
28
26
|
const clientName = "STSClient";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -23,7 +22,6 @@ export class GetFederationTokenCommand extends $Command {
|
|
|
23
22
|
resolveMiddleware(clientStack, configuration, options) {
|
|
24
23
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
25
24
|
this.middlewareStack.use(getEndpointPlugin(configuration, GetFederationTokenCommand.getEndpointParameterInstructions()));
|
|
26
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
27
25
|
const stack = clientStack.concat(this.middlewareStack);
|
|
28
26
|
const { logger } = configuration;
|
|
29
27
|
const clientName = "STSClient";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
2
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
3
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
@@ -23,7 +22,6 @@ export class GetSessionTokenCommand extends $Command {
|
|
|
23
22
|
resolveMiddleware(clientStack, configuration, options) {
|
|
24
23
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
25
24
|
this.middlewareStack.use(getEndpointPlugin(configuration, GetSessionTokenCommand.getEndpointParameterInstructions()));
|
|
26
|
-
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
27
25
|
const stack = clientStack.concat(this.middlewareStack);
|
|
28
26
|
const { logger } = configuration;
|
|
29
27
|
const clientName = "STSClient";
|
|
@@ -2,6 +2,6 @@ export * from "./STSClient";
|
|
|
2
2
|
export * from "./STS";
|
|
3
3
|
export * from "./commands";
|
|
4
4
|
export * from "./models";
|
|
5
|
-
export * from "./defaultRoleAssumers";
|
|
6
5
|
import "@aws-sdk/util-endpoints";
|
|
6
|
+
export * from "./defaultRoleAssumers";
|
|
7
7
|
export { STSServiceException } from "./models/STSServiceException";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { decorateDefaultCredentialProvider } from "./defaultStsRoleAssumers";
|
|
3
|
-
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { AWSSDKSigV4Signer, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
4
4
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
5
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
6
6
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
7
|
+
import { NoAuthSigner } from "@smithy/core";
|
|
7
8
|
import { Hash } from "@smithy/hash-node";
|
|
8
9
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
9
10
|
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
@@ -29,6 +30,19 @@ export const getRuntimeConfig = (config) => {
|
|
|
29
30
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
30
31
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
31
32
|
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
34
|
+
{
|
|
35
|
+
schemeId: "aws.auth#sigv4",
|
|
36
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
|
|
37
|
+
(async (idProps) => await decorateDefaultCredentialProvider(credentialDefaultProvider)(idProps?.__config || {})()),
|
|
38
|
+
signer: new AWSSDKSigV4Signer(),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
schemeId: "smithy.api#noAuth",
|
|
42
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
43
|
+
signer: new NoAuthSigner(),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
32
46
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
33
47
|
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
34
48
|
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { AWSSDKSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { NoAuthSigner } from "@smithy/core";
|
|
1
3
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
4
|
import { parseUrl } from "@smithy/url-parser";
|
|
3
5
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
4
6
|
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
7
|
+
import { defaultSTSHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
5
8
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
9
|
export const getRuntimeConfig = (config) => {
|
|
7
10
|
return {
|
|
@@ -11,6 +14,19 @@ export const getRuntimeConfig = (config) => {
|
|
|
11
14
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
15
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
13
16
|
extensions: config?.extensions ?? [],
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
|
|
18
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
+
{
|
|
20
|
+
schemeId: "aws.auth#sigv4",
|
|
21
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
22
|
+
signer: new AWSSDKSigV4Signer(),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
schemeId: "smithy.api#noAuth",
|
|
26
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
27
|
+
signer: new NoAuthSigner(),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
14
30
|
logger: config?.logger ?? new NoOpLogger(),
|
|
15
31
|
serviceId: config?.serviceId ?? "STS",
|
|
16
32
|
urlParser: config?.urlParser ?? parseUrl,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
2
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
3
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
4
5
|
const asPartial = (t) => t;
|
|
5
6
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
7
|
const extensionConfiguration = {
|
|
7
8
|
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
8
9
|
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
9
10
|
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
11
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
10
12
|
};
|
|
11
13
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
12
14
|
return {
|
|
@@ -14,5 +16,6 @@ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
|
14
16
|
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
15
17
|
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
16
18
|
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
19
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
17
20
|
};
|
|
18
21
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
-
import { StsAuthInputConfig, StsAuthResolvedConfig } from "@aws-sdk/middleware-sdk-sts";
|
|
3
2
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
4
|
-
import { Credentials as __Credentials } from "@aws-sdk/types";
|
|
5
3
|
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
6
4
|
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
7
5
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
8
6
|
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
9
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
10
|
-
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
|
+
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
11
10
|
import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "./commands/AssumeRoleCommand";
|
|
12
11
|
import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "./commands/AssumeRoleWithSAMLCommand";
|
|
13
12
|
import { AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
@@ -99,20 +98,21 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
99
98
|
* Enables FIPS compatible endpoints.
|
|
100
99
|
*/
|
|
101
100
|
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
102
106
|
/**
|
|
103
107
|
* The AWS region to which this client will send requests
|
|
104
108
|
*/
|
|
105
109
|
region?: string | __Provider<string>;
|
|
106
110
|
/**
|
|
107
111
|
* Default credentials provider; Not available in browser runtime.
|
|
112
|
+
* @deprecated
|
|
108
113
|
* @internal
|
|
109
114
|
*/
|
|
110
|
-
credentialDefaultProvider?: (input: any) =>
|
|
111
|
-
/**
|
|
112
|
-
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
115
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
116
116
|
/**
|
|
117
117
|
* Value for how many times a request will be made at most in case of retry.
|
|
118
118
|
*/
|
|
@@ -139,7 +139,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
139
139
|
/**
|
|
140
140
|
* @public
|
|
141
141
|
*/
|
|
142
|
-
export type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig &
|
|
142
|
+
export type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & 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 & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig &
|
|
153
|
+
export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
154
154
|
/**
|
|
155
155
|
* @public
|
|
156
156
|
*
|
|
@@ -170,6 +170,8 @@ export declare class STSClient extends __Client<__HttpHandlerOptions, ServiceInp
|
|
|
170
170
|
* The resolved configuration of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}.
|
|
171
171
|
*/
|
|
172
172
|
readonly config: STSClientResolvedConfig;
|
|
173
|
+
private getDefaultHttpAuthSchemeParametersProvider;
|
|
174
|
+
private getIdentityProviderConfigProvider;
|
|
173
175
|
constructor(...[configuration]: __CheckOptionalClientConfig<STSClientConfig>);
|
|
174
176
|
/**
|
|
175
177
|
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { STSHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: STSHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): STSHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: STSHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AWSSDKSigV4AuthInputConfig, AWSSDKSigV4AuthResolvedConfig, AWSSDKSigV4PreviouslyResolved } from "@aws-sdk/core";
|
|
2
|
+
import { Client, HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
|
|
3
|
+
import { STSClientResolvedConfig } from "../STSClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface STSHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface STSHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<STSClientResolvedConfig, HandlerExecutionContext, STSHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultSTSHttpAuthSchemeParametersProvider: (config: STSClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<STSHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface STSHttpAuthSchemeProvider extends HttpAuthSchemeProvider<STSHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultSTSHttpAuthSchemeProvider: STSHttpAuthSchemeProvider;
|
|
28
|
+
export interface StsAuthInputConfig {
|
|
29
|
+
}
|
|
30
|
+
export interface StsAuthResolvedConfig {
|
|
31
|
+
/**
|
|
32
|
+
* Reference to STSClient class constructor.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
stsClientCtor: new (clientConfig: any) => Client<any, any, any>;
|
|
36
|
+
}
|
|
37
|
+
export declare const resolveStsAuthConfig: <T>(input: T & StsAuthInputConfig) => T & StsAuthResolvedConfig;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AWSSDKSigV4AuthInputConfig {
|
|
42
|
+
/**
|
|
43
|
+
* experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
47
|
+
/**
|
|
48
|
+
* experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
httpAuthSchemeProvider?: STSHttpAuthSchemeProvider;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export interface HttpAuthSchemeResolvedConfig extends StsAuthResolvedConfig, AWSSDKSigV4AuthResolvedConfig {
|
|
57
|
+
/**
|
|
58
|
+
* experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
62
|
+
/**
|
|
63
|
+
* experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AWSSDKSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
2
|
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
3
|
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
4
5
|
/**
|
|
5
6
|
* @internal
|
|
6
7
|
*/
|
|
7
|
-
export interface STSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
|
|
8
|
+
export interface STSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
|
|
8
9
|
}
|
|
@@ -13,6 +13,6 @@ export { RuntimeExtension } from "./runtimeExtensions";
|
|
|
13
13
|
export { STSExtensionConfiguration } from "./extensionConfiguration";
|
|
14
14
|
export * from "./commands";
|
|
15
15
|
export * from "./models";
|
|
16
|
-
export * from "./defaultRoleAssumers";
|
|
17
16
|
import "@aws-sdk/util-endpoints";
|
|
17
|
+
export * from "./defaultRoleAssumers";
|
|
18
18
|
export { STSServiceException } from "./models/STSServiceException";
|