@aws-sdk/credential-provider-web-identity 3.664.0 → 3.667.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fromTokenFile = void 0;
|
|
4
|
+
const client_1 = require("@aws-sdk/core/client");
|
|
4
5
|
const property_provider_1 = require("@smithy/property-provider");
|
|
5
6
|
const fs_1 = require("fs");
|
|
6
7
|
const fromWebToken_1 = require("./fromWebToken");
|
|
@@ -17,11 +18,15 @@ const fromTokenFile = (init = {}) => async () => {
|
|
|
17
18
|
logger: init.logger,
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
const credentials = await (0, fromWebToken_1.fromWebToken)({
|
|
21
22
|
...init,
|
|
22
23
|
webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
|
|
23
24
|
roleArn,
|
|
24
25
|
roleSessionName,
|
|
25
26
|
})();
|
|
27
|
+
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
|
28
|
+
(0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
|
29
|
+
}
|
|
30
|
+
return credentials;
|
|
26
31
|
};
|
|
27
32
|
exports.fromTokenFile = fromTokenFile;
|
package/dist-es/fromTokenFile.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
1
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
2
3
|
import { readFileSync } from "fs";
|
|
3
4
|
import { fromWebToken } from "./fromWebToken";
|
|
@@ -14,10 +15,14 @@ export const fromTokenFile = (init = {}) => async () => {
|
|
|
14
15
|
logger: init.logger,
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const credentials = await fromWebToken({
|
|
18
19
|
...init,
|
|
19
20
|
webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
|
|
20
21
|
roleArn,
|
|
21
22
|
roleSessionName,
|
|
22
23
|
})();
|
|
24
|
+
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
|
25
|
+
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
|
26
|
+
}
|
|
27
|
+
return credentials;
|
|
23
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.667.0",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/
|
|
35
|
+
"@aws-sdk/core": "3.667.0",
|
|
36
|
+
"@aws-sdk/types": "3.667.0",
|
|
36
37
|
"@smithy/property-provider": "^3.1.7",
|
|
37
38
|
"@smithy/types": "^3.5.0",
|
|
38
39
|
"tslib": "^2.6.2"
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"typescript": "~4.9.5"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@aws-sdk/client-sts": "^3.
|
|
50
|
+
"@aws-sdk/client-sts": "^3.667.0"
|
|
50
51
|
},
|
|
51
52
|
"types": "./dist-types/index.d.ts",
|
|
52
53
|
"engines": {
|