@cdk8s/awscdk-resolver 0.0.55 → 0.0.57

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 (160) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/README.md +88 -0
  4. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/CreateGeneratedTemplateCommand.js +1 -0
  5. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/DeleteGeneratedTemplateCommand.js +1 -0
  6. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/DescribeGeneratedTemplateCommand.js +1 -0
  7. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/DescribeResourceScanCommand.js +1 -0
  8. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/GetGeneratedTemplateCommand.js +1 -0
  9. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/ListGeneratedTemplatesCommand.js +1 -0
  10. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/ListResourceScanRelatedResourcesCommand.js +1 -0
  11. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/ListResourceScanResourcesCommand.js +1 -0
  12. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/ListResourceScansCommand.js +1 -0
  13. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/StartResourceScanCommand.js +1 -0
  14. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/commands/UpdateGeneratedTemplateCommand.js +1 -0
  15. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1677 -73
  16. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/models_1.js +1 -0
  17. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/pagination/ListGeneratedTemplatesPaginator.js +1 -0
  18. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/pagination/ListResourceScanRelatedResourcesPaginator.js +1 -0
  19. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/pagination/ListResourceScanResourcesPaginator.js +1 -0
  20. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/pagination/ListResourceScansPaginator.js +1 -0
  21. package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormation.js +22 -0
  22. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/CreateGeneratedTemplateCommand.js +24 -0
  23. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/DeleteGeneratedTemplateCommand.js +24 -0
  24. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/DescribeGeneratedTemplateCommand.js +24 -0
  25. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/DescribeResourceScanCommand.js +24 -0
  26. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/GetGeneratedTemplateCommand.js +24 -0
  27. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/ListGeneratedTemplatesCommand.js +24 -0
  28. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/ListResourceScanRelatedResourcesCommand.js +24 -0
  29. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/ListResourceScanResourcesCommand.js +24 -0
  30. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/ListResourceScansCommand.js +24 -0
  31. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/StartResourceScanCommand.js +24 -0
  32. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/UpdateGeneratedTemplateCommand.js +24 -0
  33. package/node_modules/@aws-sdk/client-cloudformation/dist-es/commands/index.js +11 -0
  34. package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/index.js +1 -0
  35. package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_0.js +104 -0
  36. package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_1.js +1 -0
  37. package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/ListGeneratedTemplatesPaginator.js +4 -0
  38. package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/ListResourceScanRelatedResourcesPaginator.js +4 -0
  39. package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/ListResourceScanResourcesPaginator.js +4 -0
  40. package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/ListResourceScansPaginator.js +4 -0
  41. package/node_modules/@aws-sdk/client-cloudformation/dist-es/pagination/index.js +4 -0
  42. package/node_modules/@aws-sdk/client-cloudformation/dist-es/protocols/Aws_query.js +1322 -92
  43. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +77 -0
  44. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +13 -2
  45. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/CreateGeneratedTemplateCommand.d.ts +116 -0
  46. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DeleteGeneratedTemplateCommand.d.ts +75 -0
  47. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeGeneratedTemplateCommand.d.ts +135 -0
  48. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeResourceScanCommand.d.ts +168 -0
  49. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/GetGeneratedTemplateCommand.d.ts +100 -0
  50. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListGeneratedTemplatesCommand.d.ts +112 -0
  51. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListResourceScanRelatedResourcesCommand.d.ts +145 -0
  52. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListResourceScanResourcesCommand.d.ts +147 -0
  53. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ListResourceScansCommand.d.ts +97 -0
  54. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/StartResourceScanCommand.d.ts +91 -0
  55. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/StopStackSetOperationCommand.d.ts +1 -1
  56. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/TestTypeCommand.d.ts +1 -1
  57. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateGeneratedTemplateCommand.d.ts +156 -0
  58. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackCommand.d.ts +1 -1
  59. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackInstancesCommand.d.ts +1 -1
  60. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateStackSetCommand.d.ts +1 -1
  61. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/UpdateTerminationProtectionCommand.d.ts +1 -1
  62. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ValidateTemplateCommand.d.ts +1 -1
  63. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/index.d.ts +11 -0
  64. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/index.d.ts +1 -0
  65. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +4075 -3877
  66. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_1.d.ts +974 -0
  67. package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/ListGeneratedTemplatesPaginator.d.ts +7 -0
  68. package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/ListResourceScanRelatedResourcesPaginator.d.ts +7 -0
  69. package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/ListResourceScanResourcesPaginator.d.ts +7 -0
  70. package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/ListResourceScansPaginator.d.ts +7 -0
  71. package/node_modules/@aws-sdk/client-cloudformation/dist-types/pagination/index.d.ts +4 -0
  72. package/node_modules/@aws-sdk/client-cloudformation/dist-types/protocols/Aws_query.d.ts +99 -0
  73. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +187 -0
  74. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormationClient.d.ts +66 -0
  75. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/CreateGeneratedTemplateCommand.d.ts +30 -0
  76. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/DeleteGeneratedTemplateCommand.d.ts +26 -0
  77. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/DescribeGeneratedTemplateCommand.d.ts +30 -0
  78. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/DescribeResourceScanCommand.d.ts +30 -0
  79. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/GetGeneratedTemplateCommand.d.ts +30 -0
  80. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListGeneratedTemplatesCommand.d.ts +30 -0
  81. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListResourceScanRelatedResourcesCommand.d.ts +30 -0
  82. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListResourceScanResourcesCommand.d.ts +30 -0
  83. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ListResourceScansCommand.d.ts +29 -0
  84. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/StartResourceScanCommand.d.ts +29 -0
  85. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/StopStackSetOperationCommand.d.ts +1 -1
  86. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/TestTypeCommand.d.ts +1 -1
  87. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateGeneratedTemplateCommand.d.ts +30 -0
  88. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackCommand.d.ts +1 -1
  89. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackInstancesCommand.d.ts +1 -1
  90. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateStackSetCommand.d.ts +1 -1
  91. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/UpdateTerminationProtectionCommand.d.ts +1 -1
  92. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/ValidateTemplateCommand.d.ts +1 -1
  93. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/commands/index.d.ts +11 -0
  94. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/index.d.ts +1 -0
  95. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_0.d.ts +250 -99
  96. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_1.d.ts +132 -0
  97. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/ListGeneratedTemplatesPaginator.d.ts +11 -0
  98. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/ListResourceScanRelatedResourcesPaginator.d.ts +11 -0
  99. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/ListResourceScanResourcesPaginator.d.ts +11 -0
  100. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/ListResourceScansPaginator.d.ts +11 -0
  101. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/pagination/index.d.ts +4 -0
  102. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/protocols/Aws_query.d.ts +132 -0
  103. package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
  104. package/node_modules/@aws-sdk/client-sso-oidc/package.json +3 -3
  105. package/node_modules/@aws-sdk/client-sts/package.json +2 -2
  106. package/node_modules/@aws-sdk/credential-provider-http/README.md +10 -0
  107. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +46 -0
  108. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +32 -0
  109. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +65 -0
  110. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js +2 -0
  111. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +59 -0
  112. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +17 -0
  113. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +5 -0
  114. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +5 -0
  115. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js +42 -0
  116. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js +27 -0
  117. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +59 -0
  118. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttpTypes.js +1 -0
  119. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js +53 -0
  120. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js +13 -0
  121. package/node_modules/@aws-sdk/credential-provider-http/dist-es/index.browser.js +1 -0
  122. package/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js +1 -0
  123. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts +7 -0
  124. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts +6 -0
  125. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts +6 -0
  126. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttpTypes.d.ts +69 -0
  127. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts +11 -0
  128. package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/retry-wrapper.d.ts +10 -0
  129. package/node_modules/@aws-sdk/credential-provider-http/dist-types/index.browser.d.ts +2 -0
  130. package/node_modules/@aws-sdk/credential-provider-http/dist-types/index.d.ts +2 -0
  131. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts +1 -0
  132. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts +5 -0
  133. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts +5 -0
  134. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts +18 -0
  135. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts +7 -0
  136. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/retry-wrapper.d.ts +8 -0
  137. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.browser.d.ts +5 -0
  138. package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.d.ts +5 -0
  139. package/node_modules/@aws-sdk/credential-provider-http/package.json +67 -0
  140. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +7 -10
  141. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
  142. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js +4 -8
  143. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +1 -0
  144. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts +2 -1
  145. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts +4 -2
  146. package/node_modules/@aws-sdk/credential-provider-ini/package.json +4 -4
  147. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +5 -4
  148. package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +2 -2
  149. package/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js +4 -3
  150. package/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts +3 -0
  151. package/node_modules/@aws-sdk/credential-provider-node/package.json +5 -4
  152. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +9 -6
  153. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js +3 -5
  154. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +5 -2
  155. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts +1 -1
  156. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts +1 -0
  157. package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
  158. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
  159. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  160. package/package.json +5 -5
@@ -0,0 +1,27 @@
1
+ import { FetchHttpHandler } from "@smithy/fetch-http-handler";
2
+ import { CredentialsProviderError } from "@smithy/property-provider";
3
+ import { checkUrl } from "./checkUrl";
4
+ import { createGetRequest, getCredentials } from "./requestHelpers";
5
+ import { retryWrapper } from "./retry-wrapper";
6
+ export const fromHttp = (options) => {
7
+ options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp");
8
+ let host;
9
+ const full = options.credentialsFullUri;
10
+ if (full) {
11
+ host = full;
12
+ }
13
+ else {
14
+ throw new CredentialsProviderError("No HTTP credential provider host provided.");
15
+ }
16
+ const url = new URL(host);
17
+ checkUrl(url);
18
+ const requestHandler = new FetchHttpHandler();
19
+ return retryWrapper(async () => {
20
+ const request = createGetRequest(url);
21
+ if (options.authorizationToken) {
22
+ request.headers.Authorization = options.authorizationToken;
23
+ }
24
+ const result = await requestHandler.handle(request);
25
+ return getCredentials(result.response);
26
+ }, options.maxRetries ?? 3, options.timeout ?? 1000);
27
+ };
@@ -0,0 +1,59 @@
1
+ import { NodeHttpHandler } from "@smithy/node-http-handler";
2
+ import { CredentialsProviderError } from "@smithy/property-provider";
3
+ import fs from "fs/promises";
4
+ import { checkUrl } from "./checkUrl";
5
+ import { createGetRequest, getCredentials } from "./requestHelpers";
6
+ import { retryWrapper } from "./retry-wrapper";
7
+ const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
8
+ const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
9
+ const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
10
+ const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
11
+ const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
12
+ export const fromHttp = (options) => {
13
+ options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp");
14
+ let host;
15
+ const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
16
+ const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
17
+ const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
18
+ const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
19
+ if (relative && full) {
20
+ console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
21
+ console.warn("awsContainerCredentialsFullUri will take precedence.");
22
+ }
23
+ if (token && tokenFile) {
24
+ console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
25
+ console.warn("awsContainerAuthorizationToken will take precedence.");
26
+ }
27
+ if (full) {
28
+ host = full;
29
+ }
30
+ else if (relative) {
31
+ host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
32
+ }
33
+ else {
34
+ throw new CredentialsProviderError(`No HTTP credential provider host provided.
35
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`);
36
+ }
37
+ const url = new URL(host);
38
+ checkUrl(url);
39
+ const requestHandler = new NodeHttpHandler({
40
+ requestTimeout: options.timeout ?? 1000,
41
+ connectionTimeout: options.timeout ?? 1000,
42
+ });
43
+ return retryWrapper(async () => {
44
+ const request = createGetRequest(url);
45
+ if (token) {
46
+ request.headers.Authorization = token;
47
+ }
48
+ else if (tokenFile) {
49
+ request.headers.Authorization = (await fs.readFile(tokenFile)).toString();
50
+ }
51
+ try {
52
+ const result = await requestHandler.handle(request);
53
+ return getCredentials(result.response);
54
+ }
55
+ catch (e) {
56
+ throw new CredentialsProviderError(String(e));
57
+ }
58
+ }, options.maxRetries ?? 3, options.timeout ?? 1000);
59
+ };
@@ -0,0 +1,53 @@
1
+ import { CredentialsProviderError } from "@smithy/property-provider";
2
+ import { HttpRequest } from "@smithy/protocol-http";
3
+ import { parseRfc3339DateTime } from "@smithy/smithy-client";
4
+ import { sdkStreamMixin } from "@smithy/util-stream";
5
+ export function createGetRequest(url) {
6
+ return new HttpRequest({
7
+ protocol: url.protocol,
8
+ hostname: url.hostname,
9
+ port: Number(url.port),
10
+ path: url.pathname,
11
+ query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
12
+ acc[k] = v;
13
+ return acc;
14
+ }, {}),
15
+ fragment: url.hash,
16
+ });
17
+ }
18
+ export async function getCredentials(response) {
19
+ const contentType = response?.headers["content-type"] ?? response?.headers["Content-Type"] ?? "";
20
+ if (!contentType.includes("json")) {
21
+ console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + ".");
22
+ }
23
+ const stream = sdkStreamMixin(response.body);
24
+ const str = await stream.transformToString();
25
+ if (response.statusCode === 200) {
26
+ const parsed = JSON.parse(str);
27
+ if (typeof parsed.AccessKeyId !== "string" ||
28
+ typeof parsed.SecretAccessKey !== "string" ||
29
+ typeof parsed.Token !== "string" ||
30
+ typeof parsed.Expiration !== "string") {
31
+ throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " +
32
+ "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }");
33
+ }
34
+ return {
35
+ accessKeyId: parsed.AccessKeyId,
36
+ secretAccessKey: parsed.SecretAccessKey,
37
+ sessionToken: parsed.Token,
38
+ expiration: parseRfc3339DateTime(parsed.Expiration),
39
+ };
40
+ }
41
+ if (response.statusCode >= 400 && response.statusCode < 500) {
42
+ let parsedBody = {};
43
+ try {
44
+ parsedBody = JSON.parse(str);
45
+ }
46
+ catch (e) { }
47
+ throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`), {
48
+ Code: parsedBody.Code,
49
+ Message: parsedBody.Message,
50
+ });
51
+ }
52
+ throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`);
53
+ }
@@ -0,0 +1,13 @@
1
+ export const retryWrapper = (toRetry, maxRetries, delayMs) => {
2
+ return async () => {
3
+ for (let i = 0; i < maxRetries; ++i) {
4
+ try {
5
+ return await toRetry();
6
+ }
7
+ catch (e) {
8
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
9
+ }
10
+ }
11
+ return await toRetry();
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
@@ -0,0 +1 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * @param url - to be validated.
5
+ * @throws if not acceptable to this provider.
6
+ */
7
+ export declare const checkUrl: (url: URL) => void;
@@ -0,0 +1,6 @@
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import type { FromHttpOptions } from "./fromHttpTypes";
3
+ /**
4
+ * Creates a provider that gets credentials via HTTP request.
5
+ */
6
+ export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
@@ -0,0 +1,6 @@
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import type { FromHttpOptions } from "./fromHttpTypes";
3
+ /**
4
+ * Creates a provider that gets credentials via HTTP request.
5
+ */
6
+ export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
@@ -0,0 +1,69 @@
1
+ import type { CredentialProviderOptions } from "@aws-sdk/types";
2
+ /**
3
+ * @public
4
+ *
5
+ * Input for the fromHttp function in the HTTP Credentials Provider for Node.js.
6
+ */
7
+ export interface FromHttpOptions extends CredentialProviderOptions {
8
+ /**
9
+ * If this value is provided, it will be used as-is.
10
+ *
11
+ * For browser environments, use instead {@link credentialsFullUri}.
12
+ */
13
+ awsContainerCredentialsFullUri?: string;
14
+ /**
15
+ * If this value is provided instead of the full URI, it
16
+ * will be appended to the default link local host of 169.254.170.2.
17
+ *
18
+ * Not supported in browsers.
19
+ */
20
+ awsContainerCredentialsRelativeUri?: string;
21
+ /**
22
+ * Will be read on each credentials request to
23
+ * add an Authorization request header value.
24
+ *
25
+ * Not supported in browsers.
26
+ */
27
+ awsContainerAuthorizationTokenFile?: string;
28
+ /**
29
+ * An alternative to awsContainerAuthorizationTokenFile,
30
+ * this is the token value itself.
31
+ *
32
+ * For browser environments, use instead {@link authorizationToken}.
33
+ */
34
+ awsContainerAuthorizationToken?: string;
35
+ /**
36
+ * BROWSER ONLY.
37
+ *
38
+ * In browsers, a relative URI is not allowed, and a full URI must be provided.
39
+ * HTTPS is required.
40
+ *
41
+ * This value is required for the browser environment.
42
+ */
43
+ credentialsFullUri?: string;
44
+ /**
45
+ * BROWSER ONLY.
46
+ *
47
+ * Providing this value will set an "Authorization" request
48
+ * header value on the GET request.
49
+ */
50
+ authorizationToken?: string;
51
+ /**
52
+ * Default is 3 retry attempts or 4 total attempts.
53
+ */
54
+ maxRetries?: number;
55
+ /**
56
+ * Default is 1000ms. Time in milliseconds to spend waiting between retry attempts.
57
+ */
58
+ timeout?: number;
59
+ }
60
+ /**
61
+ * @public
62
+ */
63
+ export type HttpProviderCredentials = {
64
+ AccessKeyId: string;
65
+ SecretAccessKey: string;
66
+ Token: string;
67
+ AccountId?: string;
68
+ Expiration: string;
69
+ };
@@ -0,0 +1,11 @@
1
+ import { AwsCredentialIdentity } from "@aws-sdk/types";
2
+ import { HttpRequest } from "@smithy/protocol-http";
3
+ import { HttpResponse } from "@smithy/types";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare function createGetRequest(url: URL): HttpRequest;
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare function getCredentials(response: HttpResponse): Promise<AwsCredentialIdentity>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export interface RetryableProvider<T> {
5
+ (): Promise<T>;
6
+ }
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare const retryWrapper: <T>(toRetry: RetryableProvider<T>, maxRetries: number, delayMs: number) => RetryableProvider<T>;
@@ -0,0 +1,2 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
2
+ export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes";
@@ -0,0 +1,2 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp";
2
+ export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes";
@@ -0,0 +1 @@
1
+ export declare const checkUrl: (url: URL) => void;
@@ -0,0 +1,5 @@
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import { FromHttpOptions } from "./fromHttpTypes";
3
+ export declare const fromHttp: (
4
+ options: FromHttpOptions
5
+ ) => AwsCredentialIdentityProvider;
@@ -0,0 +1,5 @@
1
+ import { AwsCredentialIdentityProvider } from "@smithy/types";
2
+ import { FromHttpOptions } from "./fromHttpTypes";
3
+ export declare const fromHttp: (
4
+ options: FromHttpOptions
5
+ ) => AwsCredentialIdentityProvider;
@@ -0,0 +1,18 @@
1
+ import { CredentialProviderOptions } from "@aws-sdk/types";
2
+ export interface FromHttpOptions extends CredentialProviderOptions {
3
+ awsContainerCredentialsFullUri?: string;
4
+ awsContainerCredentialsRelativeUri?: string;
5
+ awsContainerAuthorizationTokenFile?: string;
6
+ awsContainerAuthorizationToken?: string;
7
+ credentialsFullUri?: string;
8
+ authorizationToken?: string;
9
+ maxRetries?: number;
10
+ timeout?: number;
11
+ }
12
+ export type HttpProviderCredentials = {
13
+ AccessKeyId: string;
14
+ SecretAccessKey: string;
15
+ Token: string;
16
+ AccountId?: string;
17
+ Expiration: string;
18
+ };
@@ -0,0 +1,7 @@
1
+ import { AwsCredentialIdentity } from "@aws-sdk/types";
2
+ import { HttpRequest } from "@smithy/protocol-http";
3
+ import { HttpResponse } from "@smithy/types";
4
+ export declare function createGetRequest(url: URL): HttpRequest;
5
+ export declare function getCredentials(
6
+ response: HttpResponse
7
+ ): Promise<AwsCredentialIdentity>;
@@ -0,0 +1,8 @@
1
+ export interface RetryableProvider<T> {
2
+ (): Promise<T>;
3
+ }
4
+ export declare const retryWrapper: <T>(
5
+ toRetry: RetryableProvider<T>,
6
+ maxRetries: number,
7
+ delayMs: number
8
+ ) => RetryableProvider<T>;
@@ -0,0 +1,5 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp.browser";
2
+ export {
3
+ FromHttpOptions,
4
+ HttpProviderCredentials,
5
+ } from "./fromHttp/fromHttpTypes";
@@ -0,0 +1,5 @@
1
+ export { fromHttp } from "./fromHttp/fromHttp";
2
+ export {
3
+ FromHttpOptions,
4
+ HttpProviderCredentials,
5
+ } from "./fromHttp/fromHttpTypes";
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@aws-sdk/credential-provider-http",
3
+ "version": "3.503.1",
4
+ "description": "AWS credential provider for containers and HTTP sources",
5
+ "main": "./dist-cjs/index.js",
6
+ "module": "./dist-es/index.js",
7
+ "browser": "./dist-es/index.browser.js",
8
+ "react-native": "./dist-es/index.browser.js",
9
+ "scripts": {
10
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
11
+ "build:cjs": "node ../../scripts/compilation/inline credential-provider-http",
12
+ "build:es": "tsc -p tsconfig.es.json",
13
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
14
+ "build:types": "tsc -p tsconfig.types.json",
15
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
16
+ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
17
+ "test": "jest"
18
+ },
19
+ "keywords": [
20
+ "aws",
21
+ "credentials"
22
+ ],
23
+ "author": {
24
+ "name": "AWS SDK for JavaScript Team",
25
+ "url": "https://aws.amazon.com/javascript/"
26
+ },
27
+ "license": "Apache-2.0",
28
+ "dependencies": {
29
+ "@aws-sdk/types": "3.502.0",
30
+ "@smithy/fetch-http-handler": "^2.4.1",
31
+ "@smithy/node-http-handler": "^2.3.1",
32
+ "@smithy/property-provider": "^2.1.1",
33
+ "@smithy/protocol-http": "^3.1.1",
34
+ "@smithy/smithy-client": "^2.3.1",
35
+ "@smithy/types": "^2.9.1",
36
+ "@smithy/util-stream": "^2.1.1",
37
+ "tslib": "^2.5.0"
38
+ },
39
+ "devDependencies": {
40
+ "@tsconfig/recommended": "1.0.1",
41
+ "@types/node": "^14.14.31",
42
+ "concurrently": "7.0.0",
43
+ "downlevel-dts": "0.10.1",
44
+ "rimraf": "3.0.2",
45
+ "typescript": "~4.9.5"
46
+ },
47
+ "types": "./dist-types/index.d.ts",
48
+ "engines": {
49
+ "node": ">=14.0.0"
50
+ },
51
+ "typesVersions": {
52
+ "<4.0": {
53
+ "dist-types/*": [
54
+ "dist-types/ts3.4/*"
55
+ ]
56
+ }
57
+ },
58
+ "files": [
59
+ "dist-*/**"
60
+ ],
61
+ "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-http",
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "https://github.com/aws/aws-sdk-js-v3.git",
65
+ "directory": "packages/credential-provider-http"
66
+ }
67
+ }
@@ -130,15 +130,11 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile)
130
130
  ), "resolveProcessCredentials");
131
131
 
132
132
  // src/resolveSsoCredentials.ts
133
- var resolveSsoCredentials = /* @__PURE__ */ __name(async (data) => {
134
- const { fromSSO, validateSsoProfile } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
135
- const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
133
+ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
134
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
136
135
  return fromSSO({
137
- ssoStartUrl: sso_start_url,
138
- ssoAccountId: sso_account_id,
139
- ssoSession: sso_session,
140
- ssoRegion: sso_region,
141
- ssoRoleName: sso_role_name
136
+ profile,
137
+ logger: options.logger
142
138
  })();
143
139
  }, "resolveSsoCredentials");
144
140
  var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
@@ -163,7 +159,8 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
163
159
  webIdentityTokenFile: profile.web_identity_token_file,
164
160
  roleArn: profile.role_arn,
165
161
  roleSessionName: profile.role_session_name,
166
- roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
162
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
163
+ logger: options.logger
167
164
  })()
168
165
  ), "resolveWebIdentityCredentials");
169
166
 
@@ -186,7 +183,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
186
183
  return resolveProcessCredentials(options, profileName);
187
184
  }
188
185
  if (isSsoProfile(data)) {
189
- return await resolveSsoCredentials(data);
186
+ return await resolveSsoCredentials(profileName, options);
190
187
  }
191
188
  throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
192
189
  }, "resolveProfileData");
@@ -22,7 +22,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
22
22
  return resolveProcessCredentials(options, profileName);
23
23
  }
24
24
  if (isSsoProfile(data)) {
25
- return await resolveSsoCredentials(data);
25
+ return await resolveSsoCredentials(profileName, options);
26
26
  }
27
27
  throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
28
28
  };
@@ -1,12 +1,8 @@
1
- export const resolveSsoCredentials = async (data) => {
2
- const { fromSSO, validateSsoProfile } = await import("@aws-sdk/credential-provider-sso");
3
- const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
1
+ export const resolveSsoCredentials = async (profile, options = {}) => {
2
+ const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
4
3
  return fromSSO({
5
- ssoStartUrl: sso_start_url,
6
- ssoAccountId: sso_account_id,
7
- ssoSession: sso_session,
8
- ssoRegion: sso_region,
9
- ssoRoleName: sso_role_name,
4
+ profile,
5
+ logger: options.logger,
10
6
  })();
11
7
  };
12
8
  export const isSsoProfile = (arg) => arg &&
@@ -8,4 +8,5 @@ export const resolveWebIdentityCredentials = async (profile, options) => import(
8
8
  roleArn: profile.role_arn,
9
9
  roleSessionName: profile.role_session_name,
10
10
  roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
11
+ logger: options.logger,
11
12
  })());
@@ -1,9 +1,10 @@
1
1
  import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
2
+ import type { CredentialProviderOptions } from "@aws-sdk/types";
2
3
  import type { Profile } from "@smithy/types";
3
4
  /**
4
5
  * @internal
5
6
  */
6
- export declare const resolveSsoCredentials: (data: Partial<SsoProfile>) => Promise<import("@smithy/types").AwsCredentialIdentity>;
7
+ export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
7
8
  /**
8
9
  * @internal
9
10
  * duplicated from \@aws-sdk/credential-provider-sso to defer import.
@@ -1,6 +1,8 @@
1
1
  import { SsoProfile } from "@aws-sdk/credential-provider-sso";
2
+ import { CredentialProviderOptions } from "@aws-sdk/types";
2
3
  import { Profile } from "@smithy/types";
3
4
  export declare const resolveSsoCredentials: (
4
- data: Partial<SsoProfile>
5
- ) => Promise<import("@smithy/types").AwsCredentialIdentity>;
5
+ profile: string,
6
+ options?: CredentialProviderOptions
7
+ ) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
6
8
  export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-ini",
3
- "version": "3.502.0",
3
+ "version": "3.504.0",
4
4
  "description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/client-sts": "3.502.0",
27
+ "@aws-sdk/client-sts": "3.504.0",
28
28
  "@aws-sdk/credential-provider-env": "3.502.0",
29
29
  "@aws-sdk/credential-provider-process": "3.502.0",
30
- "@aws-sdk/credential-provider-sso": "3.502.0",
31
- "@aws-sdk/credential-provider-web-identity": "3.502.0",
30
+ "@aws-sdk/credential-provider-sso": "3.504.0",
31
+ "@aws-sdk/credential-provider-web-identity": "3.504.0",
32
32
  "@aws-sdk/types": "3.502.0",
33
33
  "@smithy/credential-provider-imds": "^2.2.1",
34
34
  "@smithy/property-provider": "^2.1.1",
@@ -47,8 +47,9 @@ var remoteProvider = /* @__PURE__ */ __name(async (init) => {
47
47
  var _a, _b;
48
48
  const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
49
49
  if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
50
- (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromContainerMetadata");
51
- return fromContainerMetadata(init);
50
+ (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
51
+ const { fromHttp } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-http")));
52
+ return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));
52
53
  }
53
54
  if (process.env[ENV_IMDS_DISABLED]) {
54
55
  return async () => {
@@ -73,8 +74,8 @@ var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_
73
74
  async () => {
74
75
  var _a;
75
76
  (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
76
- const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName } = init;
77
- if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
77
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
78
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
78
79
  throw new import_property_provider.CredentialsProviderError(
79
80
  "Skipping SSO provider in default chain (inputs do not include SSO fields)."
80
81
  );
@@ -11,8 +11,8 @@ export const defaultProvider = (init = {}) => memoize(chain(...(init.profile ||
11
11
  },
12
12
  ]), async () => {
13
13
  init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
14
- const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName } = init;
15
- if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
14
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
15
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
16
16
  throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).");
17
17
  }
18
18
  const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
@@ -1,10 +1,11 @@
1
- import { CredentialsProviderError } from "@smithy/property-provider";
1
+ import { chain, CredentialsProviderError } from "@smithy/property-provider";
2
2
  export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
3
3
  export const remoteProvider = async (init) => {
4
4
  const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("@smithy/credential-provider-imds");
5
5
  if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
6
- init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromContainerMetadata");
7
- return fromContainerMetadata(init);
6
+ init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
7
+ const { fromHttp } = await import("@aws-sdk/credential-provider-http");
8
+ return chain(fromHttp(init), fromContainerMetadata(init));
8
9
  }
9
10
  if (process.env[ENV_IMDS_DISABLED]) {
10
11
  return async () => {
@@ -1,5 +1,8 @@
1
1
  import type { RemoteProviderInit } from "@smithy/credential-provider-imds";
2
2
  import type { AwsCredentialIdentityProvider } from "@smithy/types";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
4
7
  /**
5
8
  * @internal
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-node",
3
- "version": "3.502.0",
3
+ "version": "3.504.0",
4
4
  "description": "AWS credential provider that sources credentials from a Node.JS environment. ",
5
5
  "engines": {
6
6
  "node": ">=14.0.0"
@@ -28,10 +28,11 @@
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
30
  "@aws-sdk/credential-provider-env": "3.502.0",
31
- "@aws-sdk/credential-provider-ini": "3.502.0",
31
+ "@aws-sdk/credential-provider-http": "3.503.1",
32
+ "@aws-sdk/credential-provider-ini": "3.504.0",
32
33
  "@aws-sdk/credential-provider-process": "3.502.0",
33
- "@aws-sdk/credential-provider-sso": "3.502.0",
34
- "@aws-sdk/credential-provider-web-identity": "3.502.0",
34
+ "@aws-sdk/credential-provider-sso": "3.504.0",
35
+ "@aws-sdk/credential-provider-web-identity": "3.504.0",
35
36
  "@aws-sdk/types": "3.502.0",
36
37
  "@smithy/credential-provider-imds": "^2.2.1",
37
38
  "@smithy/property-provider": "^2.1.1",