@aws-sdk/credential-provider-node 3.186.0 → 3.188.0
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/CHANGELOG.md +8 -0
- package/dist-es/defaultProvider.js +3 -14
- package/dist-es/remoteProvider.js +5 -8
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/credential-provider-node
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aws-sdk/credential-provider-node
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { fromEnv } from "@aws-sdk/credential-provider-env";
|
|
3
2
|
import { fromIni } from "@aws-sdk/credential-provider-ini";
|
|
4
3
|
import { fromProcess } from "@aws-sdk/credential-provider-process";
|
|
@@ -7,16 +6,6 @@ import { fromTokenFile } from "@aws-sdk/credential-provider-web-identity";
|
|
|
7
6
|
import { chain, CredentialsProviderError, memoize } from "@aws-sdk/property-provider";
|
|
8
7
|
import { ENV_PROFILE } from "@aws-sdk/shared-ini-file-loader";
|
|
9
8
|
import { remoteProvider } from "./remoteProvider";
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
fromIni(init),
|
|
14
|
-
fromProcess(init),
|
|
15
|
-
fromTokenFile(init),
|
|
16
|
-
remoteProvider(init),
|
|
17
|
-
function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
-
return __generator(this, function (_a) {
|
|
19
|
-
throw new CredentialsProviderError("Could not load credentials from any providers", false);
|
|
20
|
-
});
|
|
21
|
-
}); }], false)), function (credentials) { return credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; }, function (credentials) { return credentials.expiration !== undefined; });
|
|
22
|
-
};
|
|
9
|
+
export const defaultProvider = (init = {}) => memoize(chain(...(init.profile || process.env[ENV_PROFILE] ? [] : [fromEnv()]), fromSSO(init), fromIni(init), fromProcess(init), fromTokenFile(init), remoteProvider(init), async () => {
|
|
10
|
+
throw new CredentialsProviderError("Could not load credentials from any providers", false);
|
|
11
|
+
}), (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined);
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
1
|
import { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata, } from "@aws-sdk/credential-provider-imds";
|
|
3
2
|
import { CredentialsProviderError } from "@aws-sdk/property-provider";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
4
|
+
export const remoteProvider = (init) => {
|
|
6
5
|
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
7
6
|
return fromContainerMetadata(init);
|
|
8
7
|
}
|
|
9
8
|
if (process.env[ENV_IMDS_DISABLED]) {
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
}); };
|
|
9
|
+
return async () => {
|
|
10
|
+
throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled");
|
|
11
|
+
};
|
|
15
12
|
}
|
|
16
13
|
return fromInstanceMetadata(init);
|
|
17
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.188.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12.0.0"
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/credential-provider-env": "3.
|
|
31
|
-
"@aws-sdk/credential-provider-imds": "3.
|
|
32
|
-
"@aws-sdk/credential-provider-ini": "3.
|
|
33
|
-
"@aws-sdk/credential-provider-process": "3.
|
|
34
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
35
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
|
36
|
-
"@aws-sdk/property-provider": "3.
|
|
37
|
-
"@aws-sdk/shared-ini-file-loader": "3.
|
|
38
|
-
"@aws-sdk/types": "3.
|
|
30
|
+
"@aws-sdk/credential-provider-env": "3.188.0",
|
|
31
|
+
"@aws-sdk/credential-provider-imds": "3.188.0",
|
|
32
|
+
"@aws-sdk/credential-provider-ini": "3.188.0",
|
|
33
|
+
"@aws-sdk/credential-provider-process": "3.188.0",
|
|
34
|
+
"@aws-sdk/credential-provider-sso": "3.188.0",
|
|
35
|
+
"@aws-sdk/credential-provider-web-identity": "3.188.0",
|
|
36
|
+
"@aws-sdk/property-provider": "3.188.0",
|
|
37
|
+
"@aws-sdk/shared-ini-file-loader": "3.188.0",
|
|
38
|
+
"@aws-sdk/types": "3.188.0",
|
|
39
39
|
"tslib": "^2.3.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|