@cdklabs/cdk-ecs-codedeploy 0.0.222 → 0.0.224
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/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 +11 -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 +9 -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/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 +6 -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/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 +6 -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/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 +6 -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/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 +66 -0
- package/package.json +4 -4
- 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
|
@@ -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";
|
|
@@ -7,7 +7,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
7
7
|
runtime: string;
|
|
8
8
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
9
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
-
credentialDefaultProvider: (input: any) => import("@smithy/types").
|
|
10
|
+
credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
11
11
|
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
12
12
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
13
13
|
region: string | import("@smithy/types").Provider<any>;
|
|
@@ -31,17 +31,27 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
31
31
|
logger: import("@smithy/types").Logger;
|
|
32
32
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
33
|
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;
|
|
34
|
-
endpointProvider: (
|
|
34
|
+
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
35
|
logger?: import("@smithy/types").Logger | undefined;
|
|
36
|
-
}) => import("@smithy/types").EndpointV2;
|
|
36
|
+
} | undefined) => import("@smithy/types").EndpointV2;
|
|
37
37
|
tls?: boolean | undefined;
|
|
38
38
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
39
|
-
|
|
39
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
40
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
|
|
41
|
+
schemeId: string;
|
|
42
|
+
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
43
|
+
signer: import("@aws-sdk/core").AWSSDKSigV4Signer;
|
|
44
|
+
} | {
|
|
45
|
+
schemeId: string;
|
|
46
|
+
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
|
|
47
|
+
signer: import("@smithy/core").NoAuthSigner;
|
|
48
|
+
})[];
|
|
49
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
|
|
50
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
40
51
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
41
52
|
signingEscapePath?: boolean | undefined;
|
|
42
53
|
systemClockOffset?: number | undefined;
|
|
43
54
|
signingRegion?: string | undefined;
|
|
44
55
|
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
45
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
56
|
useGlobalEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
|
|
47
57
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { NoAuthSigner } from "@smithy/core";
|
|
1
2
|
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
|
|
3
|
+
import { IdentityProviderConfig } from "@smithy/types";
|
|
2
4
|
import { STSClientConfig } from "./STSClient";
|
|
3
5
|
/**
|
|
4
6
|
* @internal
|
|
@@ -7,8 +9,13 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
7
9
|
runtime: string;
|
|
8
10
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
11
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
-
credentialDefaultProvider: import("
|
|
12
|
+
credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
11
13
|
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
14
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | {
|
|
15
|
+
schemeId: string;
|
|
16
|
+
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
|
|
17
|
+
signer: NoAuthSigner;
|
|
18
|
+
}[];
|
|
12
19
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
13
20
|
region: string | import("@smithy/types").Provider<string>;
|
|
14
21
|
requestHandler: (import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
|
@@ -31,17 +38,18 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
31
38
|
logger: import("@smithy/types").Logger;
|
|
32
39
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
40
|
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;
|
|
34
|
-
endpointProvider: (
|
|
41
|
+
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
35
42
|
logger?: import("@smithy/types").Logger | undefined;
|
|
36
|
-
}) => import("@smithy/types").EndpointV2;
|
|
43
|
+
} | undefined) => import("@smithy/types").EndpointV2;
|
|
37
44
|
tls?: boolean | undefined;
|
|
38
45
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
39
|
-
|
|
46
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
47
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
|
|
48
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
40
49
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
41
50
|
signingEscapePath?: boolean | undefined;
|
|
42
51
|
systemClockOffset?: number | undefined;
|
|
43
52
|
signingRegion?: string | undefined;
|
|
44
53
|
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
45
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
54
|
useGlobalEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
|
|
47
55
|
};
|
|
@@ -21,26 +21,36 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
21
21
|
serviceId: string;
|
|
22
22
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
23
23
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
24
|
-
region: string | import("@smithy/types").Provider<any>;
|
|
25
|
-
credentialDefaultProvider: (input: any) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
|
|
26
24
|
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
25
|
+
region: string | import("@smithy/types").Provider<any>;
|
|
26
|
+
credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
27
27
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
28
28
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
29
29
|
logger: import("@smithy/types").Logger;
|
|
30
30
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
31
31
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
32
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> | undefined;
|
|
33
|
-
endpointProvider: (
|
|
33
|
+
endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
34
34
|
logger?: import("@smithy/types").Logger | undefined;
|
|
35
|
-
}) => import("@smithy/types").EndpointV2;
|
|
35
|
+
} | undefined) => import("@smithy/types").EndpointV2;
|
|
36
36
|
tls?: boolean | undefined;
|
|
37
37
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
38
|
-
|
|
38
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
39
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
|
|
40
|
+
schemeId: string;
|
|
41
|
+
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
|
|
42
|
+
signer: import("@aws-sdk/core").AWSSDKSigV4Signer;
|
|
43
|
+
} | {
|
|
44
|
+
schemeId: string;
|
|
45
|
+
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
|
|
46
|
+
signer: import("@smithy/core").NoAuthSigner;
|
|
47
|
+
})[];
|
|
48
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
|
|
49
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
39
50
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
40
51
|
signingEscapePath?: boolean | undefined;
|
|
41
52
|
systemClockOffset?: number | undefined;
|
|
42
53
|
signingRegion?: string | undefined;
|
|
43
54
|
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
44
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
45
55
|
useGlobalEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
|
|
46
56
|
};
|