@cdklabs/cdk-ecs-codedeploy 0.0.246 → 0.0.248

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 (151) hide show
  1. package/.jsii +4 -4
  2. package/.jsii.tabl.json +1 -1
  3. package/API.md +2 -2
  4. package/lib/api-canary/index.js +1 -1
  5. package/lib/ecs-appspec/index.js +1 -1
  6. package/lib/ecs-deployment/index.js +1 -1
  7. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.d.ts +2 -2
  8. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +2 -2
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/index.js +65 -7
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/runtimeConfig.shared.js +10 -0
  12. package/node_modules/@aws-sdk/client-codedeploy/dist-es/CodeDeployClient.js +17 -4
  13. package/node_modules/@aws-sdk/client-codedeploy/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  14. package/node_modules/@aws-sdk/client-codedeploy/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  15. package/node_modules/@aws-sdk/client-codedeploy/dist-es/runtimeConfig.shared.js +10 -0
  16. package/node_modules/@aws-sdk/client-codedeploy/dist-es/runtimeExtensions.js +3 -0
  17. package/node_modules/@aws-sdk/client-codedeploy/dist-types/CodeDeployClient.d.ts +13 -11
  18. package/node_modules/@aws-sdk/client-codedeploy/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  19. package/node_modules/@aws-sdk/client-codedeploy/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  20. package/node_modules/@aws-sdk/client-codedeploy/dist-types/extensionConfiguration.d.ts +2 -1
  21. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +6 -6
  22. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.d.ts +4 -2
  23. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +6 -4
  24. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.shared.d.ts +2 -0
  25. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/CodeDeployClient.d.ts +11 -9
  26. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  27. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  28. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  29. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  30. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
  31. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
  32. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  33. package/node_modules/@aws-sdk/client-codedeploy/package.json +16 -16
  34. package/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +68 -0
  35. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +67 -6
  36. package/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +16 -0
  37. package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +19 -3
  38. package/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  39. package/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js +62 -0
  40. package/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js +16 -0
  41. package/node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js +3 -0
  42. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +9 -6
  43. package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  44. package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  45. package/node_modules/@aws-sdk/client-sso/dist-types/extensionConfiguration.d.ts +2 -1
  46. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +16 -0
  47. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +16 -0
  48. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +17 -1
  49. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.shared.d.ts +13 -0
  50. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +9 -1
  51. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  52. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
  53. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  54. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +46 -0
  55. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +46 -0
  56. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +47 -1
  57. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  58. package/node_modules/@aws-sdk/client-sso/package.json +14 -13
  59. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js +64 -0
  60. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +66 -9
  61. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js +16 -0
  62. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +17 -3
  63. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  64. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js +58 -0
  65. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js +0 -2
  66. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js +16 -0
  67. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js +3 -0
  68. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +13 -11
  69. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  70. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  71. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts +2 -1
  72. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +13 -3
  73. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +12 -2
  74. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +14 -4
  75. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts +13 -0
  76. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +11 -9
  77. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  78. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  79. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  80. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +30 -5
  81. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +29 -4
  82. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +33 -8
  83. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  84. package/node_modules/@aws-sdk/client-sso-oidc/package.json +16 -16
  85. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +43 -17
  86. package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -15
  87. package/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts +4 -4
  88. package/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts +11 -3
  89. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts +4 -7
  90. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +11 -3
  91. package/node_modules/@aws-sdk/client-sts/package.json +14 -14
  92. package/node_modules/@aws-sdk/core/CHANGELOG.md +22 -0
  93. package/node_modules/@aws-sdk/core/dist-cjs/index.js +13 -7
  94. package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +6 -2
  95. package/node_modules/@aws-sdk/core/package.json +2 -2
  96. package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts +10 -2
  97. package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
  98. package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
  99. package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
  100. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  101. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  102. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +10 -2
  103. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +5 -1
  104. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +1 -0
  105. package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
  106. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  107. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  108. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  109. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +5 -1
  110. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js +5 -1
  111. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  112. package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
  113. package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  114. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
  115. package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
  116. package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
  117. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  118. package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +16 -0
  119. package/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +3 -0
  120. package/node_modules/@aws-sdk/types/package.json +1 -1
  121. package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
  122. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
  123. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  124. package/package.json +5 -5
  125. package/node_modules/@aws-sdk/middleware-signing/LICENSE +0 -201
  126. package/node_modules/@aws-sdk/middleware-signing/README.md +0 -4
  127. package/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthConfiguration.js +0 -1
  128. package/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js +0 -1
  129. package/node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js +0 -227
  130. package/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthConfiguration.js +0 -103
  131. package/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthMiddleware.js +0 -55
  132. package/node_modules/@aws-sdk/middleware-signing/dist-es/index.js +0 -2
  133. package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/getSkewCorrectedDate.js +0 -1
  134. package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js +0 -8
  135. package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/isClockSkewed.js +0 -2
  136. package/node_modules/@aws-sdk/middleware-signing/dist-types/awsAuthConfiguration.d.ts +0 -99
  137. package/node_modules/@aws-sdk/middleware-signing/dist-types/awsAuthMiddleware.d.ts +0 -6
  138. package/node_modules/@aws-sdk/middleware-signing/dist-types/index.d.ts +0 -2
  139. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/awsAuthConfiguration.d.ts +0 -68
  140. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/awsAuthMiddleware.d.ts +0 -19
  141. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/index.d.ts +0 -2
  142. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/getSkewCorrectedDate.d.ts +0 -1
  143. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/getUpdatedSystemClockOffset.d.ts +0 -4
  144. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/isClockSkewed.d.ts +0 -4
  145. package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/getSkewCorrectedDate.d.ts +0 -6
  146. package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/getUpdatedSystemClockOffset.d.ts +0 -8
  147. package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/isClockSkewed.d.ts +0 -7
  148. package/node_modules/@aws-sdk/middleware-signing/package.json +0 -59
  149. /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/getSkewCorrectedDate.js → client-codedeploy/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
  150. /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/isClockSkewed.js → client-sso/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
  151. /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/getUpdatedSystemClockOffset.js → client-sso-oidc/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
@@ -1,103 +0,0 @@
1
- import { memoize } from "@smithy/property-provider";
2
- import { SignatureV4 } from "@smithy/signature-v4";
3
- import { normalizeProvider } from "@smithy/util-middleware";
4
- const CREDENTIAL_EXPIRE_WINDOW = 300000;
5
- export const resolveAwsAuthConfig = (input) => {
6
- const normalizedCreds = input.credentials
7
- ? normalizeCredentialProvider(input.credentials)
8
- : input.credentialDefaultProvider(input);
9
- const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
10
- let signer;
11
- if (input.signer) {
12
- signer = normalizeProvider(input.signer);
13
- }
14
- else if (input.regionInfoProvider) {
15
- signer = () => normalizeProvider(input.region)()
16
- .then(async (region) => [
17
- (await input.regionInfoProvider(region, {
18
- useFipsEndpoint: await input.useFipsEndpoint(),
19
- useDualstackEndpoint: await input.useDualstackEndpoint(),
20
- })) || {},
21
- region,
22
- ])
23
- .then(([regionInfo, region]) => {
24
- const { signingRegion, signingService } = regionInfo;
25
- input.signingRegion = input.signingRegion || signingRegion || region;
26
- input.signingName = input.signingName || signingService || input.serviceId;
27
- const params = {
28
- ...input,
29
- credentials: normalizedCreds,
30
- region: input.signingRegion,
31
- service: input.signingName,
32
- sha256,
33
- uriEscapePath: signingEscapePath,
34
- };
35
- const SignerCtor = input.signerConstructor || SignatureV4;
36
- return new SignerCtor(params);
37
- });
38
- }
39
- else {
40
- signer = async (authScheme) => {
41
- authScheme = Object.assign({}, {
42
- name: "sigv4",
43
- signingName: input.signingName || input.defaultSigningName,
44
- signingRegion: await normalizeProvider(input.region)(),
45
- properties: {},
46
- }, authScheme);
47
- const signingRegion = authScheme.signingRegion;
48
- const signingService = authScheme.signingName;
49
- input.signingRegion = input.signingRegion || signingRegion;
50
- input.signingName = input.signingName || signingService || input.serviceId;
51
- const params = {
52
- ...input,
53
- credentials: normalizedCreds,
54
- region: input.signingRegion,
55
- service: input.signingName,
56
- sha256,
57
- uriEscapePath: signingEscapePath,
58
- };
59
- const SignerCtor = input.signerConstructor || SignatureV4;
60
- return new SignerCtor(params);
61
- };
62
- }
63
- return {
64
- ...input,
65
- systemClockOffset,
66
- signingEscapePath,
67
- credentials: normalizedCreds,
68
- signer,
69
- };
70
- };
71
- export const resolveSigV4AuthConfig = (input) => {
72
- const normalizedCreds = input.credentials
73
- ? normalizeCredentialProvider(input.credentials)
74
- : input.credentialDefaultProvider(input);
75
- const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
76
- let signer;
77
- if (input.signer) {
78
- signer = normalizeProvider(input.signer);
79
- }
80
- else {
81
- signer = normalizeProvider(new SignatureV4({
82
- credentials: normalizedCreds,
83
- region: input.region,
84
- service: input.signingName,
85
- sha256,
86
- uriEscapePath: signingEscapePath,
87
- }));
88
- }
89
- return {
90
- ...input,
91
- systemClockOffset,
92
- signingEscapePath,
93
- credentials: normalizedCreds,
94
- signer,
95
- };
96
- };
97
- const normalizeCredentialProvider = (credentials) => {
98
- if (typeof credentials === "function") {
99
- return memoize(credentials, (credentials) => credentials.expiration !== undefined &&
100
- credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials) => credentials.expiration !== undefined);
101
- }
102
- return normalizeProvider(credentials);
103
- };
@@ -1,55 +0,0 @@
1
- import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
2
- import { getSkewCorrectedDate } from "./utils/getSkewCorrectedDate";
3
- import { getUpdatedSystemClockOffset } from "./utils/getUpdatedSystemClockOffset";
4
- export const awsAuthMiddleware = (options) => (next, context) => async function (args) {
5
- if (!HttpRequest.isInstance(args.request))
6
- return next(args);
7
- const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
8
- const multiRegionOverride = authScheme?.name === "sigv4a" ? authScheme?.signingRegionSet?.join(",") : undefined;
9
- const signer = await options.signer(authScheme);
10
- let signedRequest;
11
- const signingOptions = {
12
- signingDate: getSkewCorrectedDate(options.systemClockOffset),
13
- signingRegion: multiRegionOverride || context["signing_region"],
14
- signingService: context["signing_service"],
15
- };
16
- if (context.s3ExpressIdentity) {
17
- const sigV4MultiRegion = signer;
18
- signedRequest = await sigV4MultiRegion.signWithCredentials(args.request, context.s3ExpressIdentity, signingOptions);
19
- if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) {
20
- throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");
21
- }
22
- }
23
- else {
24
- signedRequest = await signer.sign(args.request, signingOptions);
25
- }
26
- const output = await next({
27
- ...args,
28
- request: signedRequest,
29
- }).catch((error) => {
30
- const serverTime = error.ServerTime ?? getDateHeader(error.$response);
31
- if (serverTime) {
32
- options.systemClockOffset = getUpdatedSystemClockOffset(serverTime, options.systemClockOffset);
33
- }
34
- throw error;
35
- });
36
- const dateHeader = getDateHeader(output.response);
37
- if (dateHeader) {
38
- options.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset);
39
- }
40
- return output;
41
- };
42
- const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
43
- export const awsAuthMiddlewareOptions = {
44
- name: "awsAuthMiddleware",
45
- tags: ["SIGNATURE", "AWSAUTH"],
46
- relation: "after",
47
- toMiddleware: "retryMiddleware",
48
- override: true,
49
- };
50
- export const getAwsAuthPlugin = (options) => ({
51
- applyToStack: (clientStack) => {
52
- clientStack.addRelativeTo(awsAuthMiddleware(options), awsAuthMiddlewareOptions);
53
- },
54
- });
55
- export const getSigV4AuthPlugin = getAwsAuthPlugin;
@@ -1,2 +0,0 @@
1
- export * from "./awsAuthConfiguration";
2
- export * from "./awsAuthMiddleware";
@@ -1 +0,0 @@
1
- export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
@@ -1,8 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import { getSkewCorrectedDate } from "./getSkewCorrectedDate";
2
- export const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
@@ -1,99 +0,0 @@
1
- import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
2
- import { AuthScheme, AwsCredentialIdentity, ChecksumConstructor, HashConstructor, Logger, MemoizedProvider, Provider, RegionInfoProvider, RequestSigner } from "@smithy/types";
3
- /**
4
- * @public
5
- */
6
- export interface AwsAuthInputConfig {
7
- /**
8
- * The credentials used to sign requests.
9
- */
10
- credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
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
- * @public
38
- */
39
- export interface SigV4AuthInputConfig {
40
- /**
41
- * The credentials used to sign requests.
42
- */
43
- credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
44
- /**
45
- * The signer to use when signing requests.
46
- */
47
- signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
48
- /**
49
- * Whether to escape request path when signing the request.
50
- */
51
- signingEscapePath?: boolean;
52
- /**
53
- * An offset value in milliseconds to apply to all signing times.
54
- */
55
- systemClockOffset?: number;
56
- }
57
- interface PreviouslyResolved {
58
- credentialDefaultProvider: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
59
- region: string | Provider<string>;
60
- regionInfoProvider?: RegionInfoProvider;
61
- signingName?: string;
62
- defaultSigningName?: string;
63
- serviceId: string;
64
- sha256: ChecksumConstructor | HashConstructor;
65
- useFipsEndpoint: Provider<boolean>;
66
- useDualstackEndpoint: Provider<boolean>;
67
- }
68
- interface SigV4PreviouslyResolved {
69
- credentialDefaultProvider: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
70
- region: string | Provider<string>;
71
- signingName: string;
72
- sha256: ChecksumConstructor | HashConstructor;
73
- logger?: Logger;
74
- }
75
- export interface AwsAuthResolvedConfig {
76
- /**
77
- * Resolved value for input config {@link AwsAuthInputConfig.credentials}
78
- * This provider MAY memoize the loaded credentials for certain period.
79
- * See {@link MemoizedProvider} for more information.
80
- */
81
- credentials: MemoizedProvider<AwsCredentialIdentity>;
82
- /**
83
- * Resolved value for input config {@link AwsAuthInputConfig.signer}
84
- */
85
- signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
86
- /**
87
- * Resolved value for input config {@link AwsAuthInputConfig.signingEscapePath}
88
- */
89
- signingEscapePath: boolean;
90
- /**
91
- * Resolved value for input config {@link AwsAuthInputConfig.systemClockOffset}
92
- */
93
- systemClockOffset: number;
94
- }
95
- export interface SigV4AuthResolvedConfig extends AwsAuthResolvedConfig {
96
- }
97
- export declare const resolveAwsAuthConfig: <T>(input: T & AwsAuthInputConfig & PreviouslyResolved) => T & AwsAuthResolvedConfig;
98
- export declare const resolveSigV4AuthConfig: <T>(input: T & SigV4AuthInputConfig & SigV4PreviouslyResolved) => T & SigV4AuthResolvedConfig;
99
- export {};
@@ -1,6 +0,0 @@
1
- import { FinalizeRequestMiddleware, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
2
- import { AwsAuthResolvedConfig } from "./awsAuthConfiguration";
3
- export declare const awsAuthMiddleware: <Input extends object, Output extends object>(options: AwsAuthResolvedConfig) => FinalizeRequestMiddleware<Input, Output>;
4
- export declare const awsAuthMiddlewareOptions: RelativeMiddlewareOptions;
5
- export declare const getAwsAuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>;
6
- export declare const getSigV4AuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>;
@@ -1,2 +0,0 @@
1
- export * from "./awsAuthConfiguration";
2
- export * from "./awsAuthMiddleware";
@@ -1,68 +0,0 @@
1
- import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4";
2
- import {
3
- AuthScheme,
4
- AwsCredentialIdentity,
5
- ChecksumConstructor,
6
- HashConstructor,
7
- Logger,
8
- MemoizedProvider,
9
- Provider,
10
- RegionInfoProvider,
11
- RequestSigner,
12
- } from "@smithy/types";
13
- export interface AwsAuthInputConfig {
14
- credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
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 SigV4AuthInputConfig {
26
- credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
27
- signer?:
28
- | RequestSigner
29
- | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
30
- signingEscapePath?: boolean;
31
- systemClockOffset?: number;
32
- }
33
- interface PreviouslyResolved {
34
- credentialDefaultProvider: (
35
- input: any
36
- ) => MemoizedProvider<AwsCredentialIdentity>;
37
- region: string | Provider<string>;
38
- regionInfoProvider?: RegionInfoProvider;
39
- signingName?: string;
40
- defaultSigningName?: string;
41
- serviceId: string;
42
- sha256: ChecksumConstructor | HashConstructor;
43
- useFipsEndpoint: Provider<boolean>;
44
- useDualstackEndpoint: Provider<boolean>;
45
- }
46
- interface SigV4PreviouslyResolved {
47
- credentialDefaultProvider: (
48
- input: any
49
- ) => MemoizedProvider<AwsCredentialIdentity>;
50
- region: string | Provider<string>;
51
- signingName: string;
52
- sha256: ChecksumConstructor | HashConstructor;
53
- logger?: Logger;
54
- }
55
- export interface AwsAuthResolvedConfig {
56
- credentials: MemoizedProvider<AwsCredentialIdentity>;
57
- signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
58
- signingEscapePath: boolean;
59
- systemClockOffset: number;
60
- }
61
- export interface SigV4AuthResolvedConfig extends AwsAuthResolvedConfig {}
62
- export declare const resolveAwsAuthConfig: <T>(
63
- input: T & AwsAuthInputConfig & PreviouslyResolved
64
- ) => T & AwsAuthResolvedConfig;
65
- export declare const resolveSigV4AuthConfig: <T>(
66
- input: T & SigV4AuthInputConfig & SigV4PreviouslyResolved
67
- ) => T & SigV4AuthResolvedConfig;
68
- export {};
@@ -1,19 +0,0 @@
1
- import {
2
- FinalizeRequestMiddleware,
3
- Pluggable,
4
- RelativeMiddlewareOptions,
5
- } from "@smithy/types";
6
- import { AwsAuthResolvedConfig } from "./awsAuthConfiguration";
7
- export declare const awsAuthMiddleware: <
8
- Input extends object,
9
- Output extends object
10
- >(
11
- options: AwsAuthResolvedConfig
12
- ) => FinalizeRequestMiddleware<Input, Output>;
13
- export declare const awsAuthMiddlewareOptions: RelativeMiddlewareOptions;
14
- export declare const getAwsAuthPlugin: (
15
- options: AwsAuthResolvedConfig
16
- ) => Pluggable<any, any>;
17
- export declare const getSigV4AuthPlugin: (
18
- options: AwsAuthResolvedConfig
19
- ) => Pluggable<any, any>;
@@ -1,2 +0,0 @@
1
- export * from "./awsAuthConfiguration";
2
- export * from "./awsAuthMiddleware";
@@ -1 +0,0 @@
1
- export declare const getSkewCorrectedDate: (systemClockOffset: number) => Date;
@@ -1,4 +0,0 @@
1
- export declare const getUpdatedSystemClockOffset: (
2
- clockTime: string,
3
- currentSystemClockOffset: number
4
- ) => number;
@@ -1,4 +0,0 @@
1
- export declare const isClockSkewed: (
2
- clockTime: number,
3
- systemClockOffset: number
4
- ) => boolean;
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns a date that is corrected for clock skew.
3
- *
4
- * @param systemClockOffset The offset of the system clock in milliseconds.
5
- */
6
- export declare const getSkewCorrectedDate: (systemClockOffset: number) => Date;
@@ -1,8 +0,0 @@
1
- /**
2
- * If clock is skewed, it returns the difference between serverTime and current time.
3
- * If clock is not skewed, it returns currentSystemClockOffset.
4
- *
5
- * @param clockTime The string value of the server time.
6
- * @param currentSystemClockOffset The current system clock offset.
7
- */
8
- export declare const getUpdatedSystemClockOffset: (clockTime: string, currentSystemClockOffset: number) => number;
@@ -1,7 +0,0 @@
1
- /**
2
- * Checks if the provided date is within the skew window of 300000ms.
3
- *
4
- * @param clockTime - The time to check for skew in milliseconds.
5
- * @param systemClockOffset - The offset of the system clock in milliseconds.
6
- */
7
- export declare const isClockSkewed: (clockTime: number, systemClockOffset: number) => boolean;
@@ -1,59 +0,0 @@
1
- {
2
- "name": "@aws-sdk/middleware-signing",
3
- "version": "3.502.0",
4
- "scripts": {
5
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
- "build:cjs": "node ../../scripts/compilation/inline middleware-signing",
7
- "build:es": "tsc -p tsconfig.es.json",
8
- "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
9
- "build:types": "tsc -p tsconfig.types.json",
10
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
11
- "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
12
- "test": "jest --passWithNoTests",
13
- "test:integration": "jest -c jest.config.integ.js",
14
- "extract:docs": "api-extractor run --local"
15
- },
16
- "main": "./dist-cjs/index.js",
17
- "module": "./dist-es/index.js",
18
- "types": "./dist-types/index.d.ts",
19
- "author": {
20
- "name": "AWS SDK for JavaScript Team",
21
- "url": "https://aws.amazon.com/javascript/"
22
- },
23
- "license": "Apache-2.0",
24
- "dependencies": {
25
- "@aws-sdk/types": "3.502.0",
26
- "@smithy/property-provider": "^2.1.1",
27
- "@smithy/protocol-http": "^3.1.1",
28
- "@smithy/signature-v4": "^2.1.1",
29
- "@smithy/types": "^2.9.1",
30
- "@smithy/util-middleware": "^2.1.1",
31
- "tslib": "^2.5.0"
32
- },
33
- "engines": {
34
- "node": ">=14.0.0"
35
- },
36
- "typesVersions": {
37
- "<4.0": {
38
- "dist-types/*": [
39
- "dist-types/ts3.4/*"
40
- ]
41
- }
42
- },
43
- "files": [
44
- "dist-*/**"
45
- ],
46
- "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/middleware-signing",
47
- "repository": {
48
- "type": "git",
49
- "url": "https://github.com/aws/aws-sdk-js-v3.git",
50
- "directory": "packages/middleware-signing"
51
- },
52
- "devDependencies": {
53
- "@tsconfig/recommended": "1.0.1",
54
- "concurrently": "7.0.0",
55
- "downlevel-dts": "0.10.1",
56
- "rimraf": "3.0.2",
57
- "typescript": "~4.9.5"
58
- }
59
- }