@cdk8s/awscdk-resolver 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/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/node_modules/@smithy/signature-v4/README.md +1 -1
- package/node_modules/@smithy/signature-v4/package.json +1 -1
- package/package.json +6 -6
- 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,49 @@
|
|
1
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
2
|
+
import { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from "../utils";
|
3
|
+
import { throwAWSSDKSigningPropertyError } from "./throwAWSSDKSigningPropertyError";
|
4
|
+
const validateSigningProperties = async (signingProperties) => {
|
5
|
+
const context = throwAWSSDKSigningPropertyError("context", signingProperties.context);
|
6
|
+
const config = throwAWSSDKSigningPropertyError("config", signingProperties.config);
|
7
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
8
|
+
const signerFunction = throwAWSSDKSigningPropertyError("signer", config.signer);
|
9
|
+
const signer = await signerFunction(authScheme);
|
10
|
+
const signingRegion = signingProperties?.signingRegion;
|
11
|
+
const signingName = signingProperties?.signingName;
|
12
|
+
return {
|
13
|
+
config,
|
14
|
+
signer,
|
15
|
+
signingRegion,
|
16
|
+
signingName,
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export class AWSSDKSigV4Signer {
|
20
|
+
async sign(httpRequest, identity, signingProperties) {
|
21
|
+
if (!HttpRequest.isInstance(httpRequest)) {
|
22
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
23
|
+
}
|
24
|
+
const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
|
25
|
+
const signedRequest = await signer.sign(httpRequest, {
|
26
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
27
|
+
signingRegion: signingRegion,
|
28
|
+
signingService: signingName,
|
29
|
+
});
|
30
|
+
return signedRequest;
|
31
|
+
}
|
32
|
+
errorHandler(signingProperties) {
|
33
|
+
return (error) => {
|
34
|
+
const serverTime = error.ServerTime ?? getDateHeader(error.$response);
|
35
|
+
if (serverTime) {
|
36
|
+
const config = throwAWSSDKSigningPropertyError("config", signingProperties.config);
|
37
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
|
38
|
+
}
|
39
|
+
throw error;
|
40
|
+
};
|
41
|
+
}
|
42
|
+
successHandler(httpResponse, signingProperties) {
|
43
|
+
const dateHeader = getDateHeader(httpResponse);
|
44
|
+
if (dateHeader) {
|
45
|
+
const config = throwAWSSDKSigningPropertyError("config", signingProperties.config);
|
46
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from "@smithy/core";
|
2
|
+
import { SignatureV4 } from "@smithy/signature-v4";
|
3
|
+
export const resolveAWSSDKSigV4Config = (config) => {
|
4
|
+
let normalizedCreds;
|
5
|
+
if (config.credentials) {
|
6
|
+
normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh);
|
7
|
+
}
|
8
|
+
if (!normalizedCreds) {
|
9
|
+
if (config.credentialDefaultProvider) {
|
10
|
+
normalizedCreds = config.credentialDefaultProvider(config);
|
11
|
+
}
|
12
|
+
else {
|
13
|
+
normalizedCreds = async () => { throw new Error("`credentials` is missing"); };
|
14
|
+
}
|
15
|
+
}
|
16
|
+
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;
|
17
|
+
let signer;
|
18
|
+
if (config.signer) {
|
19
|
+
signer = normalizeProvider(config.signer);
|
20
|
+
}
|
21
|
+
else if (config.regionInfoProvider) {
|
22
|
+
signer = () => normalizeProvider(config.region)()
|
23
|
+
.then(async (region) => [
|
24
|
+
(await config.regionInfoProvider(region, {
|
25
|
+
useFipsEndpoint: await config.useFipsEndpoint(),
|
26
|
+
useDualstackEndpoint: await config.useDualstackEndpoint(),
|
27
|
+
})) || {},
|
28
|
+
region,
|
29
|
+
])
|
30
|
+
.then(([regionInfo, region]) => {
|
31
|
+
const { signingRegion, signingService } = regionInfo;
|
32
|
+
config.signingRegion = config.signingRegion || signingRegion || region;
|
33
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
34
|
+
const params = {
|
35
|
+
...config,
|
36
|
+
credentials: normalizedCreds,
|
37
|
+
region: config.signingRegion,
|
38
|
+
service: config.signingName,
|
39
|
+
sha256,
|
40
|
+
uriEscapePath: signingEscapePath,
|
41
|
+
};
|
42
|
+
const SignerCtor = config.signerConstructor || SignatureV4;
|
43
|
+
return new SignerCtor(params);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
signer = async (authScheme) => {
|
48
|
+
authScheme = Object.assign({}, {
|
49
|
+
name: "sigv4",
|
50
|
+
signingName: config.signingName || config.defaultSigningName,
|
51
|
+
signingRegion: await normalizeProvider(config.region)(),
|
52
|
+
properties: {},
|
53
|
+
}, authScheme);
|
54
|
+
const signingRegion = authScheme.signingRegion;
|
55
|
+
const signingService = authScheme.signingName;
|
56
|
+
config.signingRegion = config.signingRegion || signingRegion;
|
57
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
58
|
+
const params = {
|
59
|
+
...config,
|
60
|
+
credentials: normalizedCreds,
|
61
|
+
region: config.signingRegion,
|
62
|
+
service: config.signingName,
|
63
|
+
sha256,
|
64
|
+
uriEscapePath: signingEscapePath,
|
65
|
+
};
|
66
|
+
const SignerCtor = config.signerConstructor || SignatureV4;
|
67
|
+
return new SignerCtor(params);
|
68
|
+
};
|
69
|
+
}
|
70
|
+
return {
|
71
|
+
...config,
|
72
|
+
systemClockOffset,
|
73
|
+
signingEscapePath,
|
74
|
+
credentials: normalizedCreds,
|
75
|
+
signer,
|
76
|
+
};
|
77
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./aws-sdk";
|
@@ -0,0 +1 @@
|
|
1
|
+
export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
|
package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { isClockSkewed } from "./isClockSkewed";
|
2
|
+
export const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
|
3
|
+
const clockTimeInMs = Date.parse(clockTime);
|
4
|
+
if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
|
5
|
+
return clockTimeInMs - Date.now();
|
6
|
+
}
|
7
|
+
return currentSystemClockOffset;
|
8
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { AwsCredentialIdentity, HttpRequest as IHttpRequest, HttpResponse, HttpSigner } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* @internal
|
4
|
+
*/
|
5
|
+
export declare class AWSSDKSigV4Signer implements HttpSigner {
|
6
|
+
sign(httpRequest: IHttpRequest,
|
7
|
+
/**
|
8
|
+
* `identity` is bound in {@link resolveAWSSDKSigV4Config}
|
9
|
+
*/
|
10
|
+
identity: AwsCredentialIdentity, signingProperties: Record<string, unknown>): Promise<IHttpRequest>;
|
11
|
+
errorHandler(signingProperties: Record<string, unknown>): (error: Error) => never;
|
12
|
+
successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void;
|
13
|
+
}
|
package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
|
2
|
+
import { AuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider, ChecksumConstructor, HashConstructor, MemoizedProvider, Provider, RegionInfoProvider, RequestSigner } from "@smithy/types";
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export interface AWSSDKSigV4AuthInputConfig {
|
7
|
+
/**
|
8
|
+
* The credentials used to sign requests.
|
9
|
+
*/
|
10
|
+
credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
11
|
+
/**
|
12
|
+
* The signer to use when signing requests.
|
13
|
+
*/
|
14
|
+
signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
15
|
+
/**
|
16
|
+
* Whether to escape request path when signing the request.
|
17
|
+
*/
|
18
|
+
signingEscapePath?: boolean;
|
19
|
+
/**
|
20
|
+
* An offset value in milliseconds to apply to all signing times.
|
21
|
+
*/
|
22
|
+
systemClockOffset?: number;
|
23
|
+
/**
|
24
|
+
* The region where you want to sign your request against. This
|
25
|
+
* can be different to the region in the endpoint.
|
26
|
+
*/
|
27
|
+
signingRegion?: string;
|
28
|
+
/**
|
29
|
+
* The injectable SigV4-compatible signer class constructor. If not supplied,
|
30
|
+
* regular SignatureV4 constructor will be used.
|
31
|
+
*
|
32
|
+
* @internal
|
33
|
+
*/
|
34
|
+
signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* @internal
|
38
|
+
*/
|
39
|
+
export interface AWSSDKSigV4PreviouslyResolved {
|
40
|
+
credentialDefaultProvider?: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
|
41
|
+
region: string | Provider<string>;
|
42
|
+
sha256: ChecksumConstructor | HashConstructor;
|
43
|
+
signingName?: string;
|
44
|
+
regionInfoProvider?: RegionInfoProvider;
|
45
|
+
defaultSigningName?: string;
|
46
|
+
serviceId: string;
|
47
|
+
useFipsEndpoint: Provider<boolean>;
|
48
|
+
useDualstackEndpoint: Provider<boolean>;
|
49
|
+
}
|
50
|
+
/**
|
51
|
+
* @internal
|
52
|
+
*/
|
53
|
+
export interface AWSSDKSigV4AuthResolvedConfig {
|
54
|
+
/**
|
55
|
+
* Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.credentials}
|
56
|
+
* This provider MAY memoize the loaded credentials for certain period.
|
57
|
+
* See {@link MemoizedProvider} for more information.
|
58
|
+
*/
|
59
|
+
credentials: AwsCredentialIdentityProvider;
|
60
|
+
/**
|
61
|
+
* Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.signer}
|
62
|
+
*/
|
63
|
+
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
64
|
+
/**
|
65
|
+
* Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.signingEscapePath}
|
66
|
+
*/
|
67
|
+
signingEscapePath: boolean;
|
68
|
+
/**
|
69
|
+
* Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.systemClockOffset}
|
70
|
+
*/
|
71
|
+
systemClockOffset: number;
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* @internal
|
75
|
+
*/
|
76
|
+
export declare const resolveAWSSDKSigV4Config: <T>(config: T & AWSSDKSigV4AuthInputConfig & AWSSDKSigV4PreviouslyResolved) => T & AWSSDKSigV4AuthResolvedConfig;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./aws-sdk";
|
package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @internal
|
3
|
+
*
|
4
|
+
* If clock is skewed, it returns the difference between serverTime and current time.
|
5
|
+
* If clock is not skewed, it returns currentSystemClockOffset.
|
6
|
+
*
|
7
|
+
* @param clockTime The string value of the server time.
|
8
|
+
* @param currentSystemClockOffset The current system clock offset.
|
9
|
+
*/
|
10
|
+
export declare const getUpdatedSystemClockOffset: (clockTime: string, currentSystemClockOffset: number) => number;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* @internal
|
3
|
+
*
|
4
|
+
* Checks if the provided date is within the skew window of 300000ms.
|
5
|
+
*
|
6
|
+
* @param clockTime - The time to check for skew in milliseconds.
|
7
|
+
* @param systemClockOffset - The offset of the system clock in milliseconds.
|
8
|
+
*/
|
9
|
+
export declare const isClockSkewed: (clockTime: number, systemClockOffset: number) => boolean;
|
package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
import {
|
2
|
+
AwsCredentialIdentity,
|
3
|
+
HttpRequest as IHttpRequest,
|
4
|
+
HttpResponse,
|
5
|
+
HttpSigner,
|
6
|
+
} from "@smithy/types";
|
7
|
+
export declare class AWSSDKSigV4Signer implements HttpSigner {
|
8
|
+
sign(
|
9
|
+
httpRequest: IHttpRequest,
|
10
|
+
identity: AwsCredentialIdentity,
|
11
|
+
signingProperties: Record<string, unknown>
|
12
|
+
): Promise<IHttpRequest>;
|
13
|
+
errorHandler(
|
14
|
+
signingProperties: Record<string, unknown>
|
15
|
+
): (error: Error) => never;
|
16
|
+
successHandler(
|
17
|
+
httpResponse: HttpResponse | unknown,
|
18
|
+
signingProperties: Record<string, unknown>
|
19
|
+
): void;
|
20
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
|
2
|
+
import {
|
3
|
+
AuthScheme,
|
4
|
+
AwsCredentialIdentity,
|
5
|
+
AwsCredentialIdentityProvider,
|
6
|
+
ChecksumConstructor,
|
7
|
+
HashConstructor,
|
8
|
+
MemoizedProvider,
|
9
|
+
Provider,
|
10
|
+
RegionInfoProvider,
|
11
|
+
RequestSigner,
|
12
|
+
} from "@smithy/types";
|
13
|
+
export interface AWSSDKSigV4AuthInputConfig {
|
14
|
+
credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
15
|
+
signer?:
|
16
|
+
| RequestSigner
|
17
|
+
| ((authScheme?: AuthScheme) => Promise<RequestSigner>);
|
18
|
+
signingEscapePath?: boolean;
|
19
|
+
systemClockOffset?: number;
|
20
|
+
signingRegion?: string;
|
21
|
+
signerConstructor?: new (
|
22
|
+
options: SignatureV4Init & SignatureV4CryptoInit
|
23
|
+
) => RequestSigner;
|
24
|
+
}
|
25
|
+
export interface AWSSDKSigV4PreviouslyResolved {
|
26
|
+
credentialDefaultProvider?: (
|
27
|
+
input: any
|
28
|
+
) => MemoizedProvider<AwsCredentialIdentity>;
|
29
|
+
region: string | Provider<string>;
|
30
|
+
sha256: ChecksumConstructor | HashConstructor;
|
31
|
+
signingName?: string;
|
32
|
+
regionInfoProvider?: RegionInfoProvider;
|
33
|
+
defaultSigningName?: string;
|
34
|
+
serviceId: string;
|
35
|
+
useFipsEndpoint: Provider<boolean>;
|
36
|
+
useDualstackEndpoint: Provider<boolean>;
|
37
|
+
}
|
38
|
+
export interface AWSSDKSigV4AuthResolvedConfig {
|
39
|
+
credentials: AwsCredentialIdentityProvider;
|
40
|
+
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
41
|
+
signingEscapePath: boolean;
|
42
|
+
systemClockOffset: number;
|
43
|
+
}
|
44
|
+
export declare const resolveAWSSDKSigV4Config: <T>(
|
45
|
+
config: T & AWSSDKSigV4AuthInputConfig & AWSSDKSigV4PreviouslyResolved
|
46
|
+
) => T & AWSSDKSigV4AuthResolvedConfig;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./aws-sdk";
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getDateHeader: (response: unknown) => string | undefined;
|
package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getSkewCorrectedDate: (systemClockOffset: number) => Date;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.474.0",
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"lint": "node ./scripts/lint.js",
|
13
13
|
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
14
14
|
"extract:docs": "api-extractor run --local",
|
15
|
-
"test": "jest
|
15
|
+
"test": "jest"
|
16
16
|
},
|
17
17
|
"main": "./dist-cjs/index.js",
|
18
18
|
"module": "./dist-es/index.js",
|
@@ -24,7 +24,11 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
+
"@smithy/core": "^1.1.0",
|
28
|
+
"@smithy/protocol-http": "^3.0.11",
|
29
|
+
"@smithy/signature-v4": "^2.0.0",
|
27
30
|
"@smithy/smithy-client": "^2.1.18",
|
31
|
+
"@smithy/types": "^2.7.0",
|
28
32
|
"tslib": "^2.5.0"
|
29
33
|
},
|
30
34
|
"devDependencies": {
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
2
|
+
import { ServiceException } from "@smithy/smithy-client";
|
3
|
+
import {
|
4
|
+
AuthScheme,
|
5
|
+
AwsCredentialIdentity,
|
6
|
+
HandlerExecutionContext,
|
7
|
+
HttpRequest as IHttpRequest,
|
8
|
+
HttpResponse,
|
9
|
+
HttpSigner,
|
10
|
+
RequestSigner,
|
11
|
+
} from "@smithy/types";
|
12
|
+
|
13
|
+
import { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from "../utils";
|
14
|
+
import { throwAWSSDKSigningPropertyError } from "./throwAWSSDKSigningPropertyError";
|
15
|
+
|
16
|
+
/**
|
17
|
+
* @internal
|
18
|
+
*/
|
19
|
+
interface AWSSDKSigV4Config {
|
20
|
+
systemClockOffset: number;
|
21
|
+
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
22
|
+
}
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @internal
|
26
|
+
*/
|
27
|
+
interface AWSSDKSigV4AuthSigningProperties {
|
28
|
+
config: AWSSDKSigV4Config;
|
29
|
+
signer: RequestSigner;
|
30
|
+
signingRegion?: string;
|
31
|
+
signingName?: string;
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* @internal
|
36
|
+
*/
|
37
|
+
interface AWSSDKSigV4Exception extends ServiceException {
|
38
|
+
ServerTime?: string;
|
39
|
+
}
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @internal
|
43
|
+
*/
|
44
|
+
const validateSigningProperties = async (
|
45
|
+
signingProperties: Record<string, unknown>
|
46
|
+
): Promise<AWSSDKSigV4AuthSigningProperties> => {
|
47
|
+
const context = throwAWSSDKSigningPropertyError(
|
48
|
+
"context",
|
49
|
+
signingProperties.context as HandlerExecutionContext | undefined
|
50
|
+
);
|
51
|
+
const config = throwAWSSDKSigningPropertyError("config", signingProperties.config as AWSSDKSigV4Config | undefined);
|
52
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
53
|
+
const signerFunction = throwAWSSDKSigningPropertyError(
|
54
|
+
"signer",
|
55
|
+
config.signer as ((authScheme?: AuthScheme) => Promise<RequestSigner>) | undefined
|
56
|
+
);
|
57
|
+
const signer = await signerFunction(authScheme);
|
58
|
+
const signingRegion: string | undefined = signingProperties?.signingRegion as string | undefined;
|
59
|
+
const signingName = signingProperties?.signingName as string | undefined;
|
60
|
+
return {
|
61
|
+
config,
|
62
|
+
signer,
|
63
|
+
signingRegion,
|
64
|
+
signingName,
|
65
|
+
};
|
66
|
+
};
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @internal
|
70
|
+
*/
|
71
|
+
export class AWSSDKSigV4Signer implements HttpSigner {
|
72
|
+
async sign(
|
73
|
+
httpRequest: IHttpRequest,
|
74
|
+
/**
|
75
|
+
* `identity` is bound in {@link resolveAWSSDKSigV4Config}
|
76
|
+
*/
|
77
|
+
identity: AwsCredentialIdentity,
|
78
|
+
signingProperties: Record<string, unknown>
|
79
|
+
): Promise<IHttpRequest> {
|
80
|
+
if (!HttpRequest.isInstance(httpRequest)) {
|
81
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
82
|
+
}
|
83
|
+
const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
|
84
|
+
|
85
|
+
const signedRequest = await signer.sign(httpRequest, {
|
86
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
87
|
+
signingRegion: signingRegion,
|
88
|
+
signingService: signingName,
|
89
|
+
});
|
90
|
+
return signedRequest;
|
91
|
+
}
|
92
|
+
|
93
|
+
errorHandler(signingProperties: Record<string, unknown>): (error: Error) => never {
|
94
|
+
return (error: Error) => {
|
95
|
+
const serverTime: string | undefined =
|
96
|
+
(error as AWSSDKSigV4Exception).ServerTime ?? getDateHeader((error as AWSSDKSigV4Exception).$response);
|
97
|
+
if (serverTime) {
|
98
|
+
const config = throwAWSSDKSigningPropertyError(
|
99
|
+
"config",
|
100
|
+
signingProperties.config as AWSSDKSigV4Config | undefined
|
101
|
+
);
|
102
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
|
103
|
+
}
|
104
|
+
throw error;
|
105
|
+
};
|
106
|
+
}
|
107
|
+
|
108
|
+
successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void {
|
109
|
+
const dateHeader = getDateHeader(httpResponse);
|
110
|
+
if (dateHeader) {
|
111
|
+
const config = throwAWSSDKSigningPropertyError(
|
112
|
+
"config",
|
113
|
+
signingProperties.config as AWSSDKSigV4Config | undefined
|
114
|
+
);
|
115
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|