@aws-sdk/credential-provider-web-identity 3.887.0 → 3.890.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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fromTokenFile = void 0;
4
4
  const client_1 = require("@aws-sdk/core/client");
5
5
  const property_provider_1 = require("@smithy/property-provider");
6
+ const shared_ini_file_loader_1 = require("@smithy/shared-ini-file-loader");
6
7
  const fs_1 = require("fs");
7
8
  const fromWebToken_1 = require("./fromWebToken");
8
9
  const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
@@ -20,7 +21,8 @@ const fromTokenFile = (init = {}) => async () => {
20
21
  }
21
22
  const credentials = await (0, fromWebToken_1.fromWebToken)({
22
23
  ...init,
23
- webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
24
+ webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
25
+ (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
24
26
  roleArn,
25
27
  roleSessionName,
26
28
  })();
@@ -1,5 +1,6 @@
1
1
  import { setCredentialFeature } from "@aws-sdk/core/client";
2
2
  import { CredentialsProviderError } from "@smithy/property-provider";
3
+ import { externalDataInterceptor } from "@smithy/shared-ini-file-loader";
3
4
  import { readFileSync } from "fs";
4
5
  import { fromWebToken } from "./fromWebToken";
5
6
  const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
@@ -17,7 +18,8 @@ export const fromTokenFile = (init = {}) => async () => {
17
18
  }
18
19
  const credentials = await fromWebToken({
19
20
  ...init,
20
- webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
21
+ webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
22
+ readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
21
23
  roleArn,
22
24
  roleSessionName,
23
25
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-web-identity",
3
- "version": "3.887.0",
3
+ "version": "3.890.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",
@@ -33,10 +33,11 @@
33
33
  },
34
34
  "license": "Apache-2.0",
35
35
  "dependencies": {
36
- "@aws-sdk/core": "3.887.0",
37
- "@aws-sdk/nested-clients": "3.887.0",
36
+ "@aws-sdk/core": "3.890.0",
37
+ "@aws-sdk/nested-clients": "3.890.0",
38
38
  "@aws-sdk/types": "3.887.0",
39
- "@smithy/property-provider": "^4.0.5",
39
+ "@smithy/property-provider": "^4.1.1",
40
+ "@smithy/shared-ini-file-loader": "^4.2.0",
40
41
  "@smithy/types": "^4.5.0",
41
42
  "tslib": "^2.6.2"
42
43
  },