@cdk8s/awscdk-resolver 0.0.42 → 0.0.44

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 (204) hide show
  1. package/.jsii +3 -3
  2. package/lib/fetch-output-value.js +1 -1
  3. package/lib/resolve.js +2 -2
  4. package/node_modules/@aws-sdk/client-cloudformation/package.json +4 -4
  5. package/node_modules/@aws-sdk/client-sso/package.json +2 -2
  6. package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +17 -3
  7. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  8. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +67 -0
  9. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js +0 -2
  10. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -2
  11. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -2
  12. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js +0 -2
  13. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js +0 -2
  14. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js +0 -2
  15. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
  16. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +14 -0
  17. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +16 -0
  18. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +3 -0
  19. package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +17 -3
  20. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  21. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js +60 -0
  22. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js +0 -2
  23. package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -2
  24. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js +0 -2
  25. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js +0 -2
  26. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js +0 -2
  27. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js +0 -2
  28. package/node_modules/@aws-sdk/client-sts/dist-es/index.js +1 -1
  29. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +15 -1
  30. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js +16 -0
  31. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js +3 -0
  32. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +13 -11
  33. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  34. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +71 -0
  35. package/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts +2 -1
  36. package/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts +1 -1
  37. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +15 -5
  38. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +13 -5
  39. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +16 -6
  40. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts +15 -2
  41. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +11 -9
  42. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  43. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +54 -0
  44. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  45. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts +1 -1
  46. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +36 -9
  47. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +27 -9
  48. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +39 -12
  49. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts +36 -4
  50. package/node_modules/@aws-sdk/client-sts/package.json +5 -5
  51. package/node_modules/@aws-sdk/core/CHANGELOG.md +22 -0
  52. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +55 -0
  53. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/index.js +5 -0
  54. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +81 -0
  55. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +10 -0
  56. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js +4 -0
  57. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js +6 -0
  58. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js +5 -0
  59. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -0
  60. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js +6 -0
  61. package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js +6 -0
  62. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1 -0
  63. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.js +49 -0
  64. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/index.js +2 -0
  65. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.js +77 -0
  66. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.js +6 -0
  67. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js +1 -0
  68. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js +2 -0
  69. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js +1 -0
  70. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +8 -0
  71. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js +3 -0
  72. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js +2 -0
  73. package/node_modules/@aws-sdk/core/dist-es/index.js +1 -0
  74. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +13 -0
  75. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
  76. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +76 -0
  77. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
  78. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts +1 -0
  79. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
  80. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -0
  81. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +10 -0
  82. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts +3 -0
  83. package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -0
  84. package/node_modules/@aws-sdk/core/dist-types/index.d.ts +1 -0
  85. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.d.ts +20 -0
  86. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/index.d.ts +2 -0
  87. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.d.ts +46 -0
  88. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.d.ts +4 -0
  89. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts +1 -0
  90. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts +1 -0
  91. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -0
  92. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +4 -0
  93. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts +3 -0
  94. package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts +4 -0
  95. package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +1 -0
  96. package/node_modules/@aws-sdk/core/package.json +6 -2
  97. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/AWSSDKSigV4Signer.ts +118 -0
  98. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/index.ts +2 -0
  99. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/resolveAWSSDKSigV4Config.ts +216 -0
  100. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws-sdk/throwAWSSDKSigningPropertyError.ts +9 -0
  101. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts +1 -0
  102. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts +7 -0
  103. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts +17 -0
  104. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts +8 -0
  105. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts +37 -0
  106. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts +18 -0
  107. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts +3 -0
  108. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts +32 -0
  109. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts +12 -0
  110. package/node_modules/@aws-sdk/core/src/index.ts +1 -0
  111. package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
  112. package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
  113. package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
  114. package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  115. package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  116. package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
  117. package/node_modules/{@aws-sdk/middleware-sdk-sts → @smithy/core}/LICENSE +1 -1
  118. package/node_modules/@smithy/core/README.md +12 -0
  119. package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +6 -0
  120. package/node_modules/@smithy/core/dist-cjs/index.js +12 -0
  121. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +22 -0
  122. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +22 -0
  123. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +45 -0
  124. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +6 -0
  125. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +20 -0
  126. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +28 -0
  127. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +5 -0
  128. package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +10 -0
  129. package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +32 -0
  130. package/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js +72 -0
  131. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +17 -0
  132. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +37 -0
  133. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +14 -0
  134. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +6 -0
  135. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +9 -0
  136. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +6 -0
  137. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +59 -0
  138. package/node_modules/@smithy/core/dist-es/getSmithyContext.js +2 -0
  139. package/node_modules/@smithy/core/dist-es/index.js +7 -0
  140. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +18 -0
  141. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +18 -0
  142. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +40 -0
  143. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +3 -0
  144. package/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +16 -0
  145. package/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +24 -0
  146. package/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +2 -0
  147. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +6 -0
  148. package/node_modules/@smithy/core/dist-es/pagination/createPaginator.js +27 -0
  149. package/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +67 -0
  150. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +13 -0
  151. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +33 -0
  152. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +10 -0
  153. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +3 -0
  154. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +5 -0
  155. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +3 -0
  156. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +53 -0
  157. package/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts +5 -0
  158. package/node_modules/@smithy/core/dist-types/index.d.ts +7 -0
  159. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
  160. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
  161. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
  162. package/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts +3 -0
  163. package/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
  164. package/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
  165. package/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts +2 -0
  166. package/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts +7 -0
  167. package/node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts +7 -0
  168. package/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts +51 -0
  169. package/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts +5 -0
  170. package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +7 -0
  171. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts +18 -0
  172. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts +18 -0
  173. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts +32 -0
  174. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts +3 -0
  175. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts +9 -0
  176. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts +5 -0
  177. package/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts +2 -0
  178. package/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts +7 -0
  179. package/node_modules/@smithy/core/dist-types/ts3.4/pagination/createPaginator.d.ts +7 -0
  180. package/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts +51 -0
  181. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
  182. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
  183. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
  184. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
  185. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
  186. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts +3 -0
  187. package/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
  188. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts +15 -0
  189. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts +8 -0
  190. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts +8 -0
  191. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -0
  192. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts +8 -0
  193. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts +3 -0
  194. package/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts +30 -0
  195. package/node_modules/@smithy/core/package.json +67 -0
  196. package/node_modules/@smithy/signature-v4/README.md +1 -1
  197. package/node_modules/@smithy/signature-v4/package.json +1 -1
  198. package/package.json +5 -5
  199. package/node_modules/@aws-sdk/middleware-sdk-sts/README.md +0 -4
  200. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-cjs/index.js +0 -9
  201. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-es/index.js +0 -5
  202. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/index.d.ts +0 -37
  203. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/ts3.4/index.d.ts +0 -34
  204. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +0 -55
@@ -0,0 +1,216 @@
1
+ import {
2
+ doesIdentityRequireRefresh,
3
+ isIdentityExpired,
4
+ memoizeIdentityProvider,
5
+ normalizeProvider,
6
+ } from "@smithy/core";
7
+ import { SignatureV4, SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
8
+ import {
9
+ AuthScheme,
10
+ AwsCredentialIdentity,
11
+ AwsCredentialIdentityProvider,
12
+ ChecksumConstructor,
13
+ HashConstructor,
14
+ MemoizedProvider,
15
+ Provider,
16
+ RegionInfo,
17
+ RegionInfoProvider,
18
+ RequestSigner,
19
+ } from "@smithy/types";
20
+
21
+ /**
22
+ * @internal
23
+ */
24
+ export interface AWSSDKSigV4AuthInputConfig {
25
+ /**
26
+ * The credentials used to sign requests.
27
+ */
28
+ credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
29
+
30
+ /**
31
+ * The signer to use when signing requests.
32
+ */
33
+ signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
34
+
35
+ /**
36
+ * Whether to escape request path when signing the request.
37
+ */
38
+ signingEscapePath?: boolean;
39
+
40
+ /**
41
+ * An offset value in milliseconds to apply to all signing times.
42
+ */
43
+ systemClockOffset?: number;
44
+
45
+ /**
46
+ * The region where you want to sign your request against. This
47
+ * can be different to the region in the endpoint.
48
+ */
49
+ signingRegion?: string;
50
+
51
+ /**
52
+ * The injectable SigV4-compatible signer class constructor. If not supplied,
53
+ * regular SignatureV4 constructor will be used.
54
+ *
55
+ * @internal
56
+ */
57
+ signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner;
58
+ }
59
+
60
+ /**
61
+ * @internal
62
+ */
63
+ export interface AWSSDKSigV4PreviouslyResolved {
64
+ credentialDefaultProvider?: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
65
+ region: string | Provider<string>;
66
+ sha256: ChecksumConstructor | HashConstructor;
67
+ signingName?: string;
68
+ regionInfoProvider?: RegionInfoProvider;
69
+ defaultSigningName?: string;
70
+ serviceId: string;
71
+ useFipsEndpoint: Provider<boolean>;
72
+ useDualstackEndpoint: Provider<boolean>;
73
+ }
74
+
75
+ /**
76
+ * @internal
77
+ */
78
+ export interface AWSSDKSigV4AuthResolvedConfig {
79
+ /**
80
+ * Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.credentials}
81
+ * This provider MAY memoize the loaded credentials for certain period.
82
+ * See {@link MemoizedProvider} for more information.
83
+ */
84
+ credentials: AwsCredentialIdentityProvider;
85
+ /**
86
+ * Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.signer}
87
+ */
88
+ signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
89
+ /**
90
+ * Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.signingEscapePath}
91
+ */
92
+ signingEscapePath: boolean;
93
+ /**
94
+ * Resolved value for input config {@link AWSSDKSigV4AuthInputConfig.systemClockOffset}
95
+ */
96
+ systemClockOffset: number;
97
+ }
98
+
99
+ /**
100
+ * @internal
101
+ */
102
+ export const resolveAWSSDKSigV4Config = <T>(
103
+ config: T & AWSSDKSigV4AuthInputConfig & AWSSDKSigV4PreviouslyResolved
104
+ ): T & AWSSDKSigV4AuthResolvedConfig => {
105
+ // Normalize credentials
106
+ let normalizedCreds: AwsCredentialIdentityProvider | undefined;
107
+ if (config.credentials) {
108
+ normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh);
109
+ }
110
+ if (!normalizedCreds) {
111
+ // credentialDefaultProvider should always be populated, but in case
112
+ // it isn't, set a default identity provider that throws an error
113
+ if (config.credentialDefaultProvider) {
114
+ normalizedCreds = normalizeProvider(config.credentialDefaultProvider(config as any));
115
+ } else {
116
+ normalizedCreds = async () => { throw new Error("`credentials` is missing") };
117
+ }
118
+ }
119
+
120
+ // Populate sigv4 arguments
121
+ const {
122
+ // Default for signingEscapePath
123
+ signingEscapePath = true,
124
+ // Default for systemClockOffset
125
+ systemClockOffset = config.systemClockOffset || 0,
126
+ // No default for sha256 since it is platform dependent
127
+ sha256,
128
+ } = config;
129
+
130
+ // Resolve signer
131
+ let signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
132
+ if (config.signer) {
133
+ // if signer is supplied by user, normalize it to a function returning a promise for signer.
134
+ signer = normalizeProvider(config.signer);
135
+ } else if (config.regionInfoProvider) {
136
+ // This branch is for endpoints V1.
137
+ // construct a provider inferring signing from region.
138
+ signer = () =>
139
+ normalizeProvider(config.region)()
140
+ .then(
141
+ async (region) =>
142
+ [
143
+ (await config.regionInfoProvider!(region, {
144
+ useFipsEndpoint: await config.useFipsEndpoint(),
145
+ useDualstackEndpoint: await config.useDualstackEndpoint(),
146
+ })) || {},
147
+ region,
148
+ ] as [RegionInfo, string]
149
+ )
150
+ .then(([regionInfo, region]) => {
151
+ const { signingRegion, signingService } = regionInfo;
152
+ // update client's singing region and signing service config if they are resolved.
153
+ // signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region
154
+ config.signingRegion = config.signingRegion || signingRegion || region;
155
+ // signing name resolving order:
156
+ // user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id
157
+ config.signingName = config.signingName || signingService || config.serviceId;
158
+
159
+ const params: SignatureV4Init & SignatureV4CryptoInit = {
160
+ ...config,
161
+ credentials: normalizedCreds!,
162
+ region: config.signingRegion,
163
+ service: config.signingName,
164
+ sha256,
165
+ uriEscapePath: signingEscapePath,
166
+ };
167
+ const SignerCtor = config.signerConstructor || SignatureV4;
168
+ return new SignerCtor(params);
169
+ });
170
+ } else {
171
+ // This branch is for endpoints V2.
172
+ // Handle endpoints v2 that resolved per-command
173
+ // TODO: need total refactor for reference auth architecture.
174
+ signer = async (authScheme?: AuthScheme) => {
175
+ authScheme = Object.assign(
176
+ {},
177
+ {
178
+ name: "sigv4",
179
+ signingName: config.signingName || config.defaultSigningName!,
180
+ signingRegion: await normalizeProvider(config.region)(),
181
+ properties: {},
182
+ },
183
+ authScheme
184
+ );
185
+
186
+ const signingRegion = authScheme.signingRegion;
187
+ const signingService = authScheme.signingName;
188
+ // update client's singing region and signing service config if they are resolved.
189
+ // signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region
190
+ config.signingRegion = config.signingRegion || signingRegion;
191
+ // signing name resolving order:
192
+ // user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id
193
+ config.signingName = config.signingName || signingService || config.serviceId;
194
+
195
+ const params: SignatureV4Init & SignatureV4CryptoInit = {
196
+ ...config,
197
+ credentials: normalizedCreds!,
198
+ region: config.signingRegion,
199
+ service: config.signingName,
200
+ sha256,
201
+ uriEscapePath: signingEscapePath,
202
+ };
203
+
204
+ const SignerCtor = config.signerConstructor || SignatureV4;
205
+ return new SignerCtor(params);
206
+ };
207
+ }
208
+
209
+ return {
210
+ ...config,
211
+ systemClockOffset,
212
+ signingEscapePath,
213
+ credentials: normalizedCreds!,
214
+ signer,
215
+ };
216
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export const throwAWSSDKSigningPropertyError = <T>(name: string, property: T | undefined): T | never => {
5
+ if (!property) {
6
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
7
+ }
8
+ return property;
9
+ };
@@ -0,0 +1 @@
1
+ export * from "./aws-sdk";
@@ -0,0 +1,7 @@
1
+ import { HttpResponse } from "@smithy/protocol-http";
2
+
3
+ /**
4
+ * @internal
5
+ */
6
+ export const getDateHeader = (response: unknown): string | undefined =>
7
+ HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
@@ -0,0 +1,17 @@
1
+ import { getSkewCorrectedDate } from "./getSkewCorrectedDate";
2
+
3
+ describe(getSkewCorrectedDate.name, () => {
4
+ const mockDateNow = Date.now();
5
+
6
+ beforeEach(() => {
7
+ jest.spyOn(Date, "now").mockReturnValue(mockDateNow);
8
+ });
9
+
10
+ afterEach(() => {
11
+ jest.clearAllMocks();
12
+ });
13
+
14
+ it.each([-100000, -100, 0, 100, 100000])("systemClockOffset: %d", (systemClockOffset) => {
15
+ expect(getSkewCorrectedDate(systemClockOffset)).toStrictEqual(new Date(mockDateNow + systemClockOffset));
16
+ });
17
+ });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * Returns a date that is corrected for clock skew.
5
+ *
6
+ * @param systemClockOffset The offset of the system clock in milliseconds.
7
+ */
8
+ export const getSkewCorrectedDate = (systemClockOffset: number) => new Date(Date.now() + systemClockOffset);
@@ -0,0 +1,37 @@
1
+ import { getUpdatedSystemClockOffset } from "./getUpdatedSystemClockOffset";
2
+ import { isClockSkewed } from "./isClockSkewed";
3
+
4
+ jest.mock("./isClockSkewed");
5
+
6
+ describe(getUpdatedSystemClockOffset.name, () => {
7
+ // Mock ServerTime is accurate to last second, to remove milliseconds information.
8
+ const mockClockTime = new Date(Math.floor(Date.now() / 1000) * 1000);
9
+ const mockSystemClockOffset = 100;
10
+
11
+ afterEach(() => {
12
+ jest.clearAllMocks();
13
+ });
14
+
15
+ it("returns passed systemClockOffset when clock is not skewed", () => {
16
+ (isClockSkewed as jest.Mock).mockReturnValue(false);
17
+ expect(getUpdatedSystemClockOffset(mockClockTime.toString(), mockSystemClockOffset)).toEqual(mockSystemClockOffset);
18
+ });
19
+
20
+ describe("returns difference between serverTime and current time when clock is skewed", () => {
21
+ const dateDotNowFn = Date.now;
22
+
23
+ beforeEach(() => {
24
+ (isClockSkewed as jest.Mock).mockReturnValue(true);
25
+ jest.spyOn(Date, "now").mockReturnValueOnce(mockClockTime.getTime());
26
+ });
27
+
28
+ afterEach(() => {
29
+ Date.now = dateDotNowFn;
30
+ });
31
+
32
+ it.each([1000, 100000])("difference: %d", (difference) => {
33
+ const updatedClockTime = new Date(mockClockTime.getTime() + difference);
34
+ expect(getUpdatedSystemClockOffset(updatedClockTime.toString(), mockSystemClockOffset)).toEqual(difference);
35
+ });
36
+ });
37
+ });
@@ -0,0 +1,18 @@
1
+ import { isClockSkewed } from "./isClockSkewed";
2
+
3
+ /**
4
+ * @internal
5
+ *
6
+ * If clock is skewed, it returns the difference between serverTime and current time.
7
+ * If clock is not skewed, it returns currentSystemClockOffset.
8
+ *
9
+ * @param clockTime The string value of the server time.
10
+ * @param currentSystemClockOffset The current system clock offset.
11
+ */
12
+ export const getUpdatedSystemClockOffset = (clockTime: string, currentSystemClockOffset: number): number => {
13
+ const clockTimeInMs = Date.parse(clockTime);
14
+ if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
15
+ return clockTimeInMs - Date.now();
16
+ }
17
+ return currentSystemClockOffset;
18
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./getDateHeader";
2
+ export * from "./getSkewCorrectedDate";
3
+ export * from "./getUpdatedSystemClockOffset";
@@ -0,0 +1,32 @@
1
+ import { getSkewCorrectedDate } from "./getSkewCorrectedDate";
2
+ import { isClockSkewed } from "./isClockSkewed";
3
+
4
+ jest.mock("./getSkewCorrectedDate");
5
+
6
+ describe(isClockSkewed.name, () => {
7
+ const mockSystemClockOffset = 100;
8
+ const mockSkewCorrectedDate = new Date();
9
+
10
+ beforeEach(() => {
11
+ (getSkewCorrectedDate as jest.Mock).mockReturnValue(mockSkewCorrectedDate);
12
+ });
13
+
14
+ afterEach(() => {
15
+ expect(getSkewCorrectedDate).toHaveBeenCalledWith(mockSystemClockOffset);
16
+ jest.clearAllMocks();
17
+ });
18
+
19
+ describe("returns true for time difference >=300000", () => {
20
+ it.each([300000, 500000])("difference: %d", (difference) => {
21
+ expect(isClockSkewed(mockSkewCorrectedDate.getTime() + difference, mockSystemClockOffset)).toBe(true);
22
+ expect(isClockSkewed(mockSkewCorrectedDate.getTime() - difference, mockSystemClockOffset)).toBe(true);
23
+ });
24
+ });
25
+
26
+ describe("returns false for time difference <300000", () => {
27
+ it.each([299999, 100000, 0])("difference: %d", (difference) => {
28
+ expect(isClockSkewed(mockSkewCorrectedDate.getTime() + difference, mockSystemClockOffset)).toBe(false);
29
+ expect(isClockSkewed(mockSkewCorrectedDate.getTime() - difference, mockSystemClockOffset)).toBe(false);
30
+ });
31
+ });
32
+ });
@@ -0,0 +1,12 @@
1
+ import { getSkewCorrectedDate } from "./getSkewCorrectedDate";
2
+
3
+ /**
4
+ * @internal
5
+ *
6
+ * Checks if the provided date is within the skew window of 300000ms.
7
+ *
8
+ * @param clockTime - The time to check for skew in milliseconds.
9
+ * @param systemClockOffset - The offset of the system clock in milliseconds.
10
+ */
11
+ export const isClockSkewed = (clockTime: number, systemClockOffset: number) =>
12
+ Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index";
2
+ export * from "./httpAuthSchemes/index";
2
3
  export * from "./protocols/index";