@aws-sdk/credential-provider-imds
Advanced tools
Comparing version 3.53.0 to 3.54.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [3.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11) | ||
### Features | ||
* **credential-provider-imds:** accept custom logger ([#3409](https://github.com/aws/aws-sdk-js-v3/issues/3409)) ([11c4a7b](https://github.com/aws/aws-sdk-js-v3/commit/11c4a7b5ac00763139f130595a37e182d34d9a72)) | ||
* **credential-provider-imds:** support static stability ([#3402](https://github.com/aws/aws-sdk-js-v3/issues/3402)) ([a4beeba](https://github.com/aws/aws-sdk-js-v3/commit/a4beebae5b2a967a0c7b6bc91fa8312867dd7079)) | ||
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24) | ||
@@ -8,0 +20,0 @@ |
@@ -10,5 +10,8 @@ "use strict"; | ||
const getInstanceMetadataEndpoint_1 = require("./utils/getInstanceMetadataEndpoint"); | ||
const staticStabilityProvider_1 = require("./utils/staticStabilityProvider"); | ||
const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; | ||
const IMDS_TOKEN_PATH = "/latest/api/token"; | ||
const fromInstanceMetadata = (init = {}) => { | ||
const fromInstanceMetadata = (init = {}) => staticStabilityProvider_1.staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }); | ||
exports.fromInstanceMetadata = fromInstanceMetadata; | ||
const getInstanceImdsProvider = (init) => { | ||
let disableFetchToken = false; | ||
@@ -75,3 +78,2 @@ const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init); | ||
}; | ||
exports.fromInstanceMetadata = fromInstanceMetadata; | ||
const getMetadataToken = async (options) => httpRequest_1.httpRequest({ | ||
@@ -78,0 +80,0 @@ ...options, |
@@ -8,2 +8,3 @@ "use strict"; | ||
tslib_1.__exportStar(require("./remoteProvider/RemoteProviderInit"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
var httpRequest_1 = require("./remoteProvider/httpRequest"); | ||
@@ -10,0 +11,0 @@ Object.defineProperty(exports, "httpRequest", { enumerable: true, get: function () { return httpRequest_1.httpRequest; } }); |
@@ -8,2 +8,3 @@ import { __assign, __awaiter, __generator } from "tslib"; | ||
import { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; | ||
import { staticStabilityProvider } from "./utils/staticStabilityProvider"; | ||
var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; | ||
@@ -13,2 +14,5 @@ var IMDS_TOKEN_PATH = "/latest/api/token"; | ||
if (init === void 0) { init = {}; } | ||
return staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }); | ||
}; | ||
var getInstanceImdsProvider = function (init) { | ||
var disableFetchToken = false; | ||
@@ -15,0 +19,0 @@ var _a = providerConfigFromInit(init), timeout = _a.timeout, maxRetries = _a.maxRetries; |
export * from "./fromContainerMetadata"; | ||
export * from "./fromInstanceMetadata"; | ||
export * from "./remoteProvider/RemoteProviderInit"; | ||
export * from "./types"; | ||
export { httpRequest } from "./remoteProvider/httpRequest"; | ||
export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; |
@@ -1,3 +0,4 @@ | ||
import { CredentialProvider } from "@aws-sdk/types"; | ||
import { Provider } from "@aws-sdk/types"; | ||
import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; | ||
import { InstanceMetadataCredentials } from "./types"; | ||
/** | ||
@@ -7,2 +8,2 @@ * Creates a credential provider that will source credentials from the EC2 | ||
*/ | ||
export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => CredentialProvider; | ||
export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => Provider<InstanceMetadataCredentials>; |
export * from "./fromContainerMetadata"; | ||
export * from "./fromInstanceMetadata"; | ||
export * from "./remoteProvider/RemoteProviderInit"; | ||
export * from "./types"; | ||
export { httpRequest } from "./remoteProvider/httpRequest"; | ||
export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; |
@@ -0,1 +1,2 @@ | ||
import { Logger } from "@aws-sdk/types"; | ||
export declare const DEFAULT_TIMEOUT = 1000; | ||
@@ -13,3 +14,5 @@ export declare const DEFAULT_MAX_RETRIES = 0; | ||
} | ||
export declare type RemoteProviderInit = Partial<RemoteProviderConfig>; | ||
export interface RemoteProviderInit extends Partial<RemoteProviderConfig> { | ||
logger?: Logger; | ||
} | ||
export declare const providerConfigFromInit: ({ maxRetries, timeout, }: RemoteProviderInit) => RemoteProviderConfig; |
@@ -1,4 +0,5 @@ | ||
import { CredentialProvider } from "@aws-sdk/types"; | ||
import { Provider } from "@aws-sdk/types"; | ||
import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; | ||
import { InstanceMetadataCredentials } from "./types"; | ||
export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => CredentialProvider; | ||
export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => Provider<InstanceMetadataCredentials>; |
export * from "./fromContainerMetadata"; | ||
export * from "./fromInstanceMetadata"; | ||
export * from "./remoteProvider/RemoteProviderInit"; | ||
export * from "./types"; | ||
export { httpRequest } from "./remoteProvider/httpRequest"; | ||
export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; |
@@ -0,1 +1,2 @@ | ||
import { Logger } from "@aws-sdk/types"; | ||
export declare const DEFAULT_TIMEOUT = 1000; | ||
@@ -9,3 +10,5 @@ export declare const DEFAULT_MAX_RETRIES = 0; | ||
} | ||
export declare type RemoteProviderInit = Partial<RemoteProviderConfig>; | ||
export interface RemoteProviderInit extends Partial<RemoteProviderConfig> { | ||
logger?: Logger; | ||
} | ||
export declare const providerConfigFromInit: ({ maxRetries, timeout, }: RemoteProviderInit) => RemoteProviderConfig; |
{ | ||
"name": "@aws-sdk/credential-provider-imds", | ||
"version": "3.53.0", | ||
"version": "3.54.0", | ||
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service", | ||
@@ -26,6 +26,6 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/node-config-provider": "3.53.0", | ||
"@aws-sdk/property-provider": "3.53.0", | ||
"@aws-sdk/types": "3.53.0", | ||
"@aws-sdk/url-parser": "3.53.0", | ||
"@aws-sdk/node-config-provider": "3.54.0", | ||
"@aws-sdk/property-provider": "3.54.0", | ||
"@aws-sdk/types": "3.54.0", | ||
"@aws-sdk/url-parser": "3.54.0", | ||
"tslib": "^2.3.0" | ||
@@ -32,0 +32,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92057
68
971
+ Added@aws-sdk/node-config-provider@3.54.0(transitive)
+ Added@aws-sdk/property-provider@3.54.0(transitive)
+ Added@aws-sdk/querystring-parser@3.54.0(transitive)
+ Added@aws-sdk/types@3.54.0(transitive)
+ Added@aws-sdk/url-parser@3.54.0(transitive)
- Removed@aws-sdk/node-config-provider@3.53.0(transitive)
- Removed@aws-sdk/property-provider@3.53.0(transitive)
- Removed@aws-sdk/querystring-parser@3.53.0(transitive)
- Removed@aws-sdk/types@3.53.0(transitive)
- Removed@aws-sdk/url-parser@3.53.0(transitive)
Updated@aws-sdk/types@3.54.0
Updated@aws-sdk/url-parser@3.54.0