@cdk8s/awscdk-resolver 0.0.42 → 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.
Files changed (199) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +4 -4
  4. package/node_modules/@aws-sdk/client-sso/package.json +2 -2
  5. package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +17 -3
  6. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  7. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +67 -0
  8. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js +0 -2
  9. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -2
  10. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -2
  11. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js +0 -2
  12. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js +0 -2
  13. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js +0 -2
  14. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
  15. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +14 -0
  16. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +16 -0
  17. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +3 -0
  18. package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +17 -3
  19. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  20. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js +60 -0
  21. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js +0 -2
  22. package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -2
  23. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js +0 -2
  24. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js +0 -2
  25. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js +0 -2
  26. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js +0 -2
  27. package/node_modules/@aws-sdk/client-sts/dist-es/index.js +1 -1
  28. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +15 -1
  29. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js +16 -0
  30. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js +3 -0
  31. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +13 -11
  32. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  33. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +71 -0
  34. package/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts +2 -1
  35. package/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts +1 -1
  36. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +15 -5
  37. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +13 -5
  38. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +16 -6
  39. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts +15 -2
  40. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +11 -9
  41. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  42. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +54 -0
  43. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  44. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts +1 -1
  45. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +36 -9
  46. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +27 -9
  47. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +39 -12
  48. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts +36 -4
  49. package/node_modules/@aws-sdk/client-sts/package.json +5 -5
  50. package/node_modules/@aws-sdk/core/CHANGELOG.md +11 -0
  51. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +55 -0
  52. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/index.js +5 -0
  53. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +81 -0
  54. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +10 -0
  55. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js +4 -0
  56. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js +6 -0
  57. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js +5 -0
  58. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -0
  59. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js +6 -0
  60. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js +6 -0
  61. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1 -0
  62. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +49 -0
  63. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/index.js +2 -0
  64. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +77 -0
  65. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +6 -0
  66. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js +1 -0
  67. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js +2 -0
  68. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js +1 -0
  69. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +8 -0
  70. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js +3 -0
  71. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js +2 -0
  72. package/node_modules/@aws-sdk/core/dist-es/index.js +1 -0
  73. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +13 -0
  74. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
  75. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +76 -0
  76. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
  77. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts +1 -0
  78. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
  79. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -0
  80. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +10 -0
  81. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts +3 -0
  82. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -0
  83. package/node_modules/@aws-sdk/core/dist-types/index.d.ts +1 -0
  84. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +20 -0
  85. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
  86. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +46 -0
  87. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
  88. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts +1 -0
  89. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts +1 -0
  90. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -0
  91. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +4 -0
  92. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts +3 -0
  93. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts +4 -0
  94. package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +1 -0
  95. package/node_modules/@aws-sdk/core/package.json +6 -2
  96. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.ts +118 -0
  97. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/index.ts +2 -0
  98. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.ts +216 -0
  99. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.ts +9 -0
  100. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts +1 -0
  101. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts +7 -0
  102. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts +17 -0
  103. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts +8 -0
  104. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts +37 -0
  105. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts +18 -0
  106. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts +3 -0
  107. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts +32 -0
  108. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts +12 -0
  109. package/node_modules/@aws-sdk/core/src/index.ts +1 -0
  110. package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
  111. package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
  112. package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
  113. package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  114. package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  115. package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
  116. package/node_modules/{@aws-sdk/middleware-sdk-sts → @smithy/core}/LICENSE +1 -1
  117. package/node_modules/@smithy/core/README.md +12 -0
  118. package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +6 -0
  119. package/node_modules/@smithy/core/dist-cjs/index.js +9 -0
  120. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +22 -0
  121. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +22 -0
  122. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +45 -0
  123. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +6 -0
  124. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +20 -0
  125. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +28 -0
  126. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +5 -0
  127. package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +10 -0
  128. package/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js +72 -0
  129. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +17 -0
  130. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +37 -0
  131. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +14 -0
  132. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +6 -0
  133. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +9 -0
  134. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +6 -0
  135. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +59 -0
  136. package/node_modules/@smithy/core/dist-es/getSmithyContext.js +2 -0
  137. package/node_modules/@smithy/core/dist-es/index.js +6 -0
  138. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +18 -0
  139. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +18 -0
  140. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +40 -0
  141. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +3 -0
  142. package/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +16 -0
  143. package/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +24 -0
  144. package/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +2 -0
  145. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +6 -0
  146. package/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +67 -0
  147. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +13 -0
  148. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +33 -0
  149. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +10 -0
  150. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +3 -0
  151. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +5 -0
  152. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +3 -0
  153. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +53 -0
  154. package/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts +5 -0
  155. package/node_modules/@smithy/core/dist-types/index.d.ts +6 -0
  156. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
  157. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
  158. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
  159. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts +3 -0
  160. package/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
  161. package/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
  162. package/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts +2 -0
  163. package/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts +7 -0
  164. package/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts +51 -0
  165. package/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts +5 -0
  166. package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +6 -0
  167. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
  168. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
  169. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
  170. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts +3 -0
  171. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
  172. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
  173. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts +2 -0
  174. package/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts +7 -0
  175. package/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts +51 -0
  176. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
  177. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
  178. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
  179. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
  180. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
  181. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts +3 -0
  182. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
  183. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
  184. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
  185. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
  186. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
  187. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
  188. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts +3 -0
  189. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
  190. package/node_modules/@smithy/core/package.json +66 -0
  191. package/node_modules/@smithy/signature-v4/README.md +1 -1
  192. package/node_modules/@smithy/signature-v4/package.json +1 -1
  193. package/package.json +5 -5
  194. package/node_modules/@aws-sdk/middleware-sdk-sts/README.md +0 -4
  195. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-cjs/index.js +0 -9
  196. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-es/index.js +0 -5
  197. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/index.d.ts +0 -37
  198. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/ts3.4/index.d.ts +0 -34
  199. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +0 -55
@@ -0,0 +1,54 @@
1
+ import {
2
+ AWSSDKSigV4AuthInputConfig,
3
+ AWSSDKSigV4AuthResolvedConfig,
4
+ AWSSDKSigV4PreviouslyResolved,
5
+ } from "@aws-sdk/core";
6
+ import {
7
+ Client,
8
+ HandlerExecutionContext,
9
+ HttpAuthScheme,
10
+ HttpAuthSchemeParameters,
11
+ HttpAuthSchemeParametersProvider,
12
+ HttpAuthSchemeProvider,
13
+ } from "@smithy/types";
14
+ import { STSClientResolvedConfig } from "../STSClient";
15
+ export interface STSHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
16
+ region?: string;
17
+ }
18
+ export interface STSHttpAuthSchemeParametersProvider
19
+ extends HttpAuthSchemeParametersProvider<
20
+ STSClientResolvedConfig,
21
+ HandlerExecutionContext,
22
+ STSHttpAuthSchemeParameters,
23
+ object
24
+ > {}
25
+ export declare const defaultSTSHttpAuthSchemeParametersProvider: (
26
+ config: STSClientResolvedConfig,
27
+ context: HandlerExecutionContext,
28
+ input: object
29
+ ) => Promise<STSHttpAuthSchemeParameters>;
30
+ export interface STSHttpAuthSchemeProvider
31
+ extends HttpAuthSchemeProvider<STSHttpAuthSchemeParameters> {}
32
+ export declare const defaultSTSHttpAuthSchemeProvider: STSHttpAuthSchemeProvider;
33
+ export interface StsAuthInputConfig {}
34
+ export interface StsAuthResolvedConfig {
35
+ stsClientCtor: new (clientConfig: any) => Client<any, any, any>;
36
+ }
37
+ export declare const resolveStsAuthConfig: <T>(
38
+ input: T & StsAuthInputConfig
39
+ ) => T & StsAuthResolvedConfig;
40
+ export interface HttpAuthSchemeInputConfig
41
+ extends StsAuthInputConfig,
42
+ AWSSDKSigV4AuthInputConfig {
43
+ httpAuthSchemes?: HttpAuthScheme[];
44
+ httpAuthSchemeProvider?: STSHttpAuthSchemeProvider;
45
+ }
46
+ export interface HttpAuthSchemeResolvedConfig
47
+ extends StsAuthResolvedConfig,
48
+ AWSSDKSigV4AuthResolvedConfig {
49
+ readonly httpAuthSchemes: HttpAuthScheme[];
50
+ readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider;
51
+ }
52
+ export declare const resolveHttpAuthSchemeConfig: <T>(
53
+ config: T & HttpAuthSchemeInputConfig & AWSSDKSigV4PreviouslyResolved
54
+ ) => T & HttpAuthSchemeResolvedConfig;
@@ -1,7 +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
  export interface STSExtensionConfiguration
5
6
  extends HttpHandlerExtensionConfiguration,
6
7
  DefaultExtensionConfiguration,
7
- AwsRegionExtensionConfiguration {}
8
+ AwsRegionExtensionConfiguration,
9
+ HttpAuthExtensionConfiguration {}
@@ -5,6 +5,6 @@ export { RuntimeExtension } from "./runtimeExtensions";
5
5
  export { STSExtensionConfiguration } from "./extensionConfiguration";
6
6
  export * from "./commands";
7
7
  export * from "./models";
8
- export * from "./defaultRoleAssumers";
9
8
  import "@aws-sdk/util-endpoints";
9
+ export * from "./defaultRoleAssumers";
10
10
  export { STSServiceException } from "./models/STSServiceException";
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
8
8
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
9
9
  credentialDefaultProvider: (
10
10
  input: any
11
- ) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
11
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
12
12
  defaultUserAgentProvider: import("@smithy/types").Provider<
13
13
  import("@smithy/types").UserAgent
14
14
  >;
@@ -62,21 +62,49 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
62
62
  ))
63
63
  | undefined;
64
64
  endpointProvider: (
65
- endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
66
- context?: {
67
- logger?: import("@smithy/types").Logger | undefined;
68
- }
65
+ params: import("./endpoint/EndpointParameters").EndpointParameters,
66
+ context?:
67
+ | {
68
+ logger?: import("@smithy/types").Logger | undefined;
69
+ }
70
+ | undefined
69
71
  ) => import("@smithy/types").EndpointV2;
70
72
  tls?: boolean | undefined;
71
73
  retryStrategy?:
72
74
  | import("@smithy/types").RetryStrategy
73
75
  | import("@smithy/types").RetryStrategyV2
74
76
  | undefined;
77
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
78
+ httpAuthSchemes:
79
+ | import("@smithy/types").HttpAuthScheme[]
80
+ | (
81
+ | {
82
+ schemeId: string;
83
+ identityProvider: (
84
+ ipc: import("@smithy/types").IdentityProviderConfig
85
+ ) =>
86
+ | import("@smithy/types").IdentityProvider<
87
+ import("@smithy/types").Identity
88
+ >
89
+ | undefined;
90
+ signer: import("@aws-sdk/core").AWSSDKSigV4Signer;
91
+ }
92
+ | {
93
+ schemeId: string;
94
+ identityProvider: (
95
+ ipc: import("@smithy/types").IdentityProviderConfig
96
+ ) =>
97
+ | import("@smithy/types").IdentityProvider<
98
+ import("@smithy/types").Identity
99
+ >
100
+ | (() => Promise<{}>);
101
+ signer: import("@smithy/core").NoAuthSigner;
102
+ }
103
+ )[];
104
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
75
105
  credentials?:
76
106
  | import("@smithy/types").AwsCredentialIdentity
77
- | import("@smithy/types").Provider<
78
- import("@smithy/types").AwsCredentialIdentity
79
- >
107
+ | import("@smithy/types").AwsCredentialIdentityProvider
80
108
  | undefined;
81
109
  signer?:
82
110
  | import("@smithy/types").RequestSigner
@@ -93,7 +121,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
93
121
  import("@smithy/signature-v4").SignatureV4CryptoInit
94
122
  ) => import("@smithy/types").RequestSigner)
95
123
  | undefined;
96
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
97
124
  useGlobalEndpoint?:
98
125
  | boolean
99
126
  | import("@smithy/types").Provider<boolean>
@@ -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
  export declare const getRuntimeConfig: (config: STSClientConfig) => {
4
6
  runtime: string;
@@ -6,10 +8,25 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
6
8
  import("@smithy/smithy-client").ResolvedDefaultsMode
7
9
  >;
8
10
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
9
- credentialDefaultProvider: import("./defaultStsRoleAssumers").DefaultCredentialProvider;
11
+ credentialDefaultProvider: (
12
+ input: any
13
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
10
14
  defaultUserAgentProvider: import("@smithy/types").Provider<
11
15
  import("@smithy/types").UserAgent
12
16
  >;
17
+ httpAuthSchemes:
18
+ | import("@smithy/types").HttpAuthScheme[]
19
+ | {
20
+ schemeId: string;
21
+ identityProvider: (
22
+ ipc: IdentityProviderConfig
23
+ ) =>
24
+ | import("@smithy/types").IdentityProvider<
25
+ import("@smithy/types").Identity
26
+ >
27
+ | (() => Promise<{}>);
28
+ signer: NoAuthSigner;
29
+ }[];
13
30
  maxAttempts: number | import("@smithy/types").Provider<number>;
14
31
  region: string | import("@smithy/types").Provider<string>;
15
32
  requestHandler:
@@ -60,21 +77,23 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
60
77
  ))
61
78
  | undefined;
62
79
  endpointProvider: (
63
- endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
64
- context?: {
65
- logger?: import("@smithy/types").Logger | undefined;
66
- }
80
+ params: import("./endpoint/EndpointParameters").EndpointParameters,
81
+ context?:
82
+ | {
83
+ logger?: import("@smithy/types").Logger | undefined;
84
+ }
85
+ | undefined
67
86
  ) => import("@smithy/types").EndpointV2;
68
87
  tls?: boolean | undefined;
69
88
  retryStrategy?:
70
89
  | import("@smithy/types").RetryStrategy
71
90
  | import("@smithy/types").RetryStrategyV2
72
91
  | undefined;
92
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
93
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
73
94
  credentials?:
74
95
  | import("@smithy/types").AwsCredentialIdentity
75
- | import("@smithy/types").Provider<
76
- import("@smithy/types").AwsCredentialIdentity
77
- >
96
+ | import("@smithy/types").AwsCredentialIdentityProvider
78
97
  | undefined;
79
98
  signer?:
80
99
  | import("@smithy/types").RequestSigner
@@ -91,7 +110,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
91
110
  import("@smithy/signature-v4").SignatureV4CryptoInit
92
111
  ) => import("@smithy/types").RequestSigner)
93
112
  | undefined;
94
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
95
113
  useGlobalEndpoint?:
96
114
  | boolean
97
115
  | import("@smithy/types").Provider<boolean>
@@ -29,13 +29,13 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
29
29
  serviceId: string;
30
30
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
31
31
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
32
- region: string | import("@smithy/types").Provider<any>;
33
- credentialDefaultProvider: (
34
- input: any
35
- ) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
36
32
  defaultUserAgentProvider: import("@smithy/types").Provider<
37
33
  import("@smithy/types").UserAgent
38
34
  >;
35
+ region: string | import("@smithy/types").Provider<any>;
36
+ credentialDefaultProvider: (
37
+ input: any
38
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
39
39
  maxAttempts: number | import("@smithy/types").Provider<number>;
40
40
  retryMode: string | import("@smithy/types").Provider<string>;
41
41
  logger: import("@smithy/types").Logger;
@@ -53,21 +53,49 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
53
53
  | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
54
54
  | undefined;
55
55
  endpointProvider: (
56
- endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
57
- context?: {
58
- logger?: import("@smithy/types").Logger | undefined;
59
- }
56
+ params: import("./endpoint/EndpointParameters").EndpointParameters,
57
+ context?:
58
+ | {
59
+ logger?: import("@smithy/types").Logger | undefined;
60
+ }
61
+ | undefined
60
62
  ) => import("@smithy/types").EndpointV2;
61
63
  tls?: boolean | undefined;
62
64
  retryStrategy?:
63
65
  | import("@smithy/types").RetryStrategy
64
66
  | import("@smithy/types").RetryStrategyV2
65
67
  | undefined;
68
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
69
+ httpAuthSchemes:
70
+ | import("@smithy/types").HttpAuthScheme[]
71
+ | (
72
+ | {
73
+ schemeId: string;
74
+ identityProvider: (
75
+ ipc: import("@smithy/types").IdentityProviderConfig
76
+ ) =>
77
+ | import("@smithy/types").IdentityProvider<
78
+ import("@smithy/types").Identity
79
+ >
80
+ | undefined;
81
+ signer: import("@aws-sdk/core").AWSSDKSigV4Signer;
82
+ }
83
+ | {
84
+ schemeId: string;
85
+ identityProvider: (
86
+ ipc: import("@smithy/types").IdentityProviderConfig
87
+ ) =>
88
+ | import("@smithy/types").IdentityProvider<
89
+ import("@smithy/types").Identity
90
+ >
91
+ | (() => Promise<{}>);
92
+ signer: import("@smithy/core").NoAuthSigner;
93
+ }
94
+ )[];
95
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
66
96
  credentials?:
67
97
  | import("@smithy/types").AwsCredentialIdentity
68
- | import("@smithy/types").Provider<
69
- import("@smithy/types").AwsCredentialIdentity
70
- >
98
+ | import("@smithy/types").AwsCredentialIdentityProvider
71
99
  | undefined;
72
100
  signer?:
73
101
  | import("@smithy/types").RequestSigner
@@ -84,7 +112,6 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
84
112
  import("@smithy/signature-v4").SignatureV4CryptoInit
85
113
  ) => import("@smithy/types").RequestSigner)
86
114
  | undefined;
87
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
88
115
  useGlobalEndpoint?:
89
116
  | boolean
90
117
  | import("@smithy/types").Provider<boolean>
@@ -1,3 +1,6 @@
1
+ import { AWSSDKSigV4Signer } from "@aws-sdk/core";
2
+ import { NoAuthSigner } from "@smithy/core";
3
+ import { IdentityProviderConfig } from "@smithy/types";
1
4
  import { STSClientConfig } from "./STSClient";
2
5
  export declare const getRuntimeConfig: (config: STSClientConfig) => {
3
6
  apiVersion: string;
@@ -5,12 +8,41 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
5
8
  base64Encoder: import("@smithy/types").Encoder;
6
9
  disableHostPrefix: boolean;
7
10
  endpointProvider: (
8
- endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
9
- context?: {
10
- logger?: import("@smithy/types").Logger | undefined;
11
- }
11
+ params: import("./endpoint/EndpointParameters").EndpointParameters,
12
+ context?:
13
+ | {
14
+ logger?: import("@smithy/types").Logger | undefined;
15
+ }
16
+ | undefined
12
17
  ) => import("@smithy/types").EndpointV2;
13
18
  extensions: import("./runtimeExtensions").RuntimeExtension[];
19
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider;
20
+ httpAuthSchemes:
21
+ | import("@smithy/types").HttpAuthScheme[]
22
+ | (
23
+ | {
24
+ schemeId: string;
25
+ identityProvider: (
26
+ ipc: IdentityProviderConfig
27
+ ) =>
28
+ | import("@smithy/types").IdentityProvider<
29
+ import("@smithy/types").Identity
30
+ >
31
+ | undefined;
32
+ signer: AWSSDKSigV4Signer;
33
+ }
34
+ | {
35
+ schemeId: string;
36
+ identityProvider: (
37
+ ipc: IdentityProviderConfig
38
+ ) =>
39
+ | import("@smithy/types").IdentityProvider<
40
+ import("@smithy/types").Identity
41
+ >
42
+ | (() => Promise<{}>);
43
+ signer: NoAuthSigner;
44
+ }
45
+ )[];
14
46
  logger: import("@smithy/types").Logger;
15
47
  serviceId: string;
16
48
  urlParser: import("@smithy/types").UrlParser;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sts",
3
3
  "description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
4
- "version": "3.470.0",
4
+ "version": "3.474.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -22,13 +22,11 @@
22
22
  "dependencies": {
23
23
  "@aws-crypto/sha256-browser": "3.0.0",
24
24
  "@aws-crypto/sha256-js": "3.0.0",
25
- "@aws-sdk/core": "3.468.0",
26
- "@aws-sdk/credential-provider-node": "3.470.0",
25
+ "@aws-sdk/core": "3.474.0",
26
+ "@aws-sdk/credential-provider-node": "3.474.0",
27
27
  "@aws-sdk/middleware-host-header": "3.468.0",
28
28
  "@aws-sdk/middleware-logger": "3.468.0",
29
29
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
30
- "@aws-sdk/middleware-sdk-sts": "3.468.0",
31
- "@aws-sdk/middleware-signing": "3.468.0",
32
30
  "@aws-sdk/middleware-user-agent": "3.470.0",
33
31
  "@aws-sdk/region-config-resolver": "3.470.0",
34
32
  "@aws-sdk/types": "3.468.0",
@@ -36,6 +34,7 @@
36
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
37
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
38
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.1.0",
39
38
  "@smithy/fetch-http-handler": "^2.3.1",
40
39
  "@smithy/hash-node": "^2.0.17",
41
40
  "@smithy/invalid-dependency": "^2.0.15",
@@ -56,6 +55,7 @@
56
55
  "@smithy/util-defaults-mode-browser": "^2.0.22",
57
56
  "@smithy/util-defaults-mode-node": "^2.0.29",
58
57
  "@smithy/util-endpoints": "^1.0.7",
58
+ "@smithy/util-middleware": "^2.0.8",
59
59
  "@smithy/util-retry": "^2.0.8",
60
60
  "@smithy/util-utf8": "^2.0.2",
61
61
  "fast-xml-parser": "4.2.5",
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.474.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.473.0...v3.474.0) (2023-12-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **core:** add `experimentalIdentityAndAuth` AWS SDK SigV4 support ([#5586](https://github.com/aws/aws-sdk-js-v3/issues/5586)) ([9a97df5](https://github.com/aws/aws-sdk-js-v3/commit/9a97df5953e722ed4887bcb65a41c019f08a5cbb))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.468.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.467.0...v3.468.0) (2023-12-06)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/core
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AWSSDKSigV4Signer = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const utils_1 = require("../utils");
6
+ const throwAWSSDKSigningPropertyError_1 = require("./throwAWSSDKSigningPropertyError");
7
+ const validateSigningProperties = async (signingProperties) => {
8
+ var _a, _b, _c;
9
+ const context = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("context", signingProperties.context);
10
+ const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config);
11
+ const authScheme = (_c = (_b = (_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.authSchemes) === null || _c === void 0 ? void 0 : _c[0];
12
+ const signerFunction = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("signer", config.signer);
13
+ const signer = await signerFunction(authScheme);
14
+ const signingRegion = signingProperties === null || signingProperties === void 0 ? void 0 : signingProperties.signingRegion;
15
+ const signingName = signingProperties === null || signingProperties === void 0 ? void 0 : signingProperties.signingName;
16
+ return {
17
+ config,
18
+ signer,
19
+ signingRegion,
20
+ signingName,
21
+ };
22
+ };
23
+ class AWSSDKSigV4Signer {
24
+ async sign(httpRequest, identity, signingProperties) {
25
+ if (!protocol_http_1.HttpRequest.isInstance(httpRequest)) {
26
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
27
+ }
28
+ const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
29
+ const signedRequest = await signer.sign(httpRequest, {
30
+ signingDate: (0, utils_1.getSkewCorrectedDate)(config.systemClockOffset),
31
+ signingRegion: signingRegion,
32
+ signingService: signingName,
33
+ });
34
+ return signedRequest;
35
+ }
36
+ errorHandler(signingProperties) {
37
+ return (error) => {
38
+ var _a;
39
+ const serverTime = (_a = error.ServerTime) !== null && _a !== void 0 ? _a : (0, utils_1.getDateHeader)(error.$response);
40
+ if (serverTime) {
41
+ const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config);
42
+ config.systemClockOffset = (0, utils_1.getUpdatedSystemClockOffset)(serverTime, config.systemClockOffset);
43
+ }
44
+ throw error;
45
+ };
46
+ }
47
+ successHandler(httpResponse, signingProperties) {
48
+ const dateHeader = (0, utils_1.getDateHeader)(httpResponse);
49
+ if (dateHeader) {
50
+ const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config);
51
+ config.systemClockOffset = (0, utils_1.getUpdatedSystemClockOffset)(dateHeader, config.systemClockOffset);
52
+ }
53
+ }
54
+ }
55
+ exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./AWSSDKSigV4Signer"), exports);
5
+ tslib_1.__exportStar(require("./resolveAWSSDKSigV4Config"), exports);
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveAWSSDKSigV4Config = void 0;
4
+ const core_1 = require("@smithy/core");
5
+ const signature_v4_1 = require("@smithy/signature-v4");
6
+ const resolveAWSSDKSigV4Config = (config) => {
7
+ let normalizedCreds;
8
+ if (config.credentials) {
9
+ normalizedCreds = (0, core_1.memoizeIdentityProvider)(config.credentials, core_1.isIdentityExpired, core_1.doesIdentityRequireRefresh);
10
+ }
11
+ if (!normalizedCreds) {
12
+ if (config.credentialDefaultProvider) {
13
+ normalizedCreds = config.credentialDefaultProvider(config);
14
+ }
15
+ else {
16
+ normalizedCreds = async () => { throw new Error("`credentials` is missing"); };
17
+ }
18
+ }
19
+ const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;
20
+ let signer;
21
+ if (config.signer) {
22
+ signer = (0, core_1.normalizeProvider)(config.signer);
23
+ }
24
+ else if (config.regionInfoProvider) {
25
+ signer = () => (0, core_1.normalizeProvider)(config.region)()
26
+ .then(async (region) => [
27
+ (await config.regionInfoProvider(region, {
28
+ useFipsEndpoint: await config.useFipsEndpoint(),
29
+ useDualstackEndpoint: await config.useDualstackEndpoint(),
30
+ })) || {},
31
+ region,
32
+ ])
33
+ .then(([regionInfo, region]) => {
34
+ const { signingRegion, signingService } = regionInfo;
35
+ config.signingRegion = config.signingRegion || signingRegion || region;
36
+ config.signingName = config.signingName || signingService || config.serviceId;
37
+ const params = {
38
+ ...config,
39
+ credentials: normalizedCreds,
40
+ region: config.signingRegion,
41
+ service: config.signingName,
42
+ sha256,
43
+ uriEscapePath: signingEscapePath,
44
+ };
45
+ const SignerCtor = config.signerConstructor || signature_v4_1.SignatureV4;
46
+ return new SignerCtor(params);
47
+ });
48
+ }
49
+ else {
50
+ signer = async (authScheme) => {
51
+ authScheme = Object.assign({}, {
52
+ name: "sigv4",
53
+ signingName: config.signingName || config.defaultSigningName,
54
+ signingRegion: await (0, core_1.normalizeProvider)(config.region)(),
55
+ properties: {},
56
+ }, authScheme);
57
+ const signingRegion = authScheme.signingRegion;
58
+ const signingService = authScheme.signingName;
59
+ config.signingRegion = config.signingRegion || signingRegion;
60
+ config.signingName = config.signingName || signingService || config.serviceId;
61
+ const params = {
62
+ ...config,
63
+ credentials: normalizedCreds,
64
+ region: config.signingRegion,
65
+ service: config.signingName,
66
+ sha256,
67
+ uriEscapePath: signingEscapePath,
68
+ };
69
+ const SignerCtor = config.signerConstructor || signature_v4_1.SignatureV4;
70
+ return new SignerCtor(params);
71
+ };
72
+ }
73
+ return {
74
+ ...config,
75
+ systemClockOffset,
76
+ signingEscapePath,
77
+ credentials: normalizedCreds,
78
+ signer,
79
+ };
80
+ };
81
+ exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.throwAWSSDKSigningPropertyError = void 0;
4
+ const throwAWSSDKSigningPropertyError = (name, property) => {
5
+ if (!property) {
6
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
7
+ }
8
+ return property;
9
+ };
10
+ exports.throwAWSSDKSigningPropertyError = throwAWSSDKSigningPropertyError;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./aws-sdk"), exports);
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDateHeader = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const getDateHeader = (response) => { var _a, _b, _c; return protocol_http_1.HttpResponse.isInstance(response) ? (_b = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.date) !== null && _b !== void 0 ? _b : (_c = response.headers) === null || _c === void 0 ? void 0 : _c.Date : undefined; };
6
+ exports.getDateHeader = getDateHeader;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSkewCorrectedDate = void 0;
4
+ const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
5
+ exports.getSkewCorrectedDate = getSkewCorrectedDate;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUpdatedSystemClockOffset = void 0;
4
+ const isClockSkewed_1 = require("./isClockSkewed");
5
+ const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
6
+ const clockTimeInMs = Date.parse(clockTime);
7
+ if ((0, isClockSkewed_1.isClockSkewed)(clockTimeInMs, currentSystemClockOffset)) {
8
+ return clockTimeInMs - Date.now();
9
+ }
10
+ return currentSystemClockOffset;
11
+ };
12
+ exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./getDateHeader"), exports);
5
+ tslib_1.__exportStar(require("./getSkewCorrectedDate"), exports);
6
+ tslib_1.__exportStar(require("./getUpdatedSystemClockOffset"), exports);
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isClockSkewed = void 0;
4
+ const getSkewCorrectedDate_1 = require("./getSkewCorrectedDate");
5
+ const isClockSkewed = (clockTime, systemClockOffset) => Math.abs((0, getSkewCorrectedDate_1.getSkewCorrectedDate)(systemClockOffset).getTime() - clockTime) >= 300000;
6
+ exports.isClockSkewed = isClockSkewed;
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./client/index"), exports);
5
+ tslib_1.__exportStar(require("./httpAuthSchemes/index"), exports);
5
6
  tslib_1.__exportStar(require("./protocols/index"), exports);