@smithy/credential-provider-imds 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(src_exports, {
|
|
|
25
25
|
ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,
|
|
26
26
|
ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,
|
|
27
27
|
ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,
|
|
28
|
+
Endpoint: () => Endpoint,
|
|
28
29
|
fromContainerMetadata: () => fromContainerMetadata,
|
|
29
30
|
fromInstanceMetadata: () => fromInstanceMetadata,
|
|
30
31
|
getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,
|
|
@@ -197,6 +198,13 @@ var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError;
|
|
|
197
198
|
var import_node_config_provider = require("@smithy/node-config-provider");
|
|
198
199
|
var import_url_parser = require("@smithy/url-parser");
|
|
199
200
|
|
|
201
|
+
// src/config/Endpoint.ts
|
|
202
|
+
var Endpoint = /* @__PURE__ */ ((Endpoint2) => {
|
|
203
|
+
Endpoint2["IPv4"] = "http://169.254.169.254";
|
|
204
|
+
Endpoint2["IPv6"] = "http://[fd00:ec2::254]";
|
|
205
|
+
return Endpoint2;
|
|
206
|
+
})(Endpoint || {});
|
|
207
|
+
|
|
200
208
|
// src/config/EndpointConfigOptions.ts
|
|
201
209
|
var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
|
|
202
210
|
var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
|
|
@@ -245,7 +253,8 @@ var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials
|
|
|
245
253
|
const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
|
|
246
254
|
const newExpiration = new Date(Date.now() + refreshInterval * 1e3);
|
|
247
255
|
logger.warn(
|
|
248
|
-
|
|
256
|
+
`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.
|
|
257
|
+
For more information, please visit: ` + STATIC_STABILITY_DOC_URL
|
|
249
258
|
);
|
|
250
259
|
const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
|
|
251
260
|
return {
|
|
@@ -415,6 +424,7 @@ var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options)
|
|
|
415
424
|
0 && (module.exports = {
|
|
416
425
|
httpRequest,
|
|
417
426
|
getInstanceMetadataEndpoint,
|
|
427
|
+
Endpoint,
|
|
418
428
|
ENV_CMDS_FULL_URI,
|
|
419
429
|
ENV_CMDS_RELATIVE_URI,
|
|
420
430
|
ENV_CMDS_AUTH_TOKEN,
|
package/dist-es/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export const getExtendedInstanceMetadataCredentials = (credentials, logger) => {
|
|
|
6
6
|
Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
|
|
7
7
|
const newExpiration = new Date(Date.now() + refreshInterval * 1000);
|
|
8
8
|
logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " +
|
|
9
|
-
|
|
9
|
+
`credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` +
|
|
10
10
|
STATIC_STABILITY_DOC_URL);
|
|
11
11
|
const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
|
|
12
12
|
return {
|
package/dist-types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|