@cdk8s/awscdk-resolver 0.0.600 → 0.0.601
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +2 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +449 -469
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/CloudFormationServiceException.js +4 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/errors.js +59 -91
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.browser.js +22 -26
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.js +30 -34
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.native.js +4 -7
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +20 -24
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/schemas/schemas_0.js +814 -533
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
- package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
- package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -6
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +6 -6
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +4 -4
- package/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var protocols = require('@smithy/core/protocols');
|
|
1
|
+
const { buildQueryString } = require("@smithy/core/protocols");
|
|
4
2
|
|
|
5
3
|
const validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
|
|
6
4
|
const parse = (arn) => {
|
|
@@ -36,7 +34,7 @@ function formatUrl(request) {
|
|
|
36
34
|
if (path && path.charAt(0) !== "/") {
|
|
37
35
|
path = `/${path}`;
|
|
38
36
|
}
|
|
39
|
-
let queryString = query ?
|
|
37
|
+
let queryString = query ? buildQueryString(query) : "";
|
|
40
38
|
if (queryString && queryString[0] !== "?") {
|
|
41
39
|
queryString = `?${queryString}`;
|
|
42
40
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.974.
|
|
3
|
+
"version": "3.974.21",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "
|
|
6
|
+
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline && premove ./dist-cjs/api-extractor-type-index.js",
|
|
8
|
-
"build:es": "tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js",
|
|
8
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js",
|
|
9
9
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
-
"build:types": "premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types": "premove dist-types && premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"extract:docs": "api-extractor run --local",
|
|
14
14
|
"lint": "node ../../scripts/validation/submodules-linter.js",
|
|
15
|
-
"prebuild": "node scripts/copy-partitions.js",
|
|
15
|
+
"prebuild": "node scripts/copy-partitions.js && yarn lint",
|
|
16
16
|
"test": "yarn g:vitest run",
|
|
17
17
|
"test:watch": "yarn g:vitest watch",
|
|
18
18
|
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts && yarn test:temp:retry",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
},
|
|
111
111
|
"license": "Apache-2.0",
|
|
112
112
|
"dependencies": {
|
|
113
|
-
"@aws-sdk/types": "^3.973.
|
|
114
|
-
"@aws-sdk/xml-builder": "^3.972.
|
|
113
|
+
"@aws-sdk/types": "^3.973.13",
|
|
114
|
+
"@aws-sdk/xml-builder": "^3.972.30",
|
|
115
115
|
"@aws/lambda-invoke-store": "^0.2.2",
|
|
116
116
|
"@smithy/core": "^3.24.6",
|
|
117
117
|
"@smithy/signature-v4": "^5.4.6",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var client = require('@aws-sdk/core/client');
|
|
4
|
-
var config = require('@smithy/core/config');
|
|
1
|
+
const { setCredentialFeature } = require("@aws-sdk/core/client");
|
|
2
|
+
const { CredentialsProviderError } = require("@smithy/core/config");
|
|
5
3
|
|
|
6
4
|
const ENV_KEY = "AWS_ACCESS_KEY_ID";
|
|
7
5
|
const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
@@ -26,10 +24,10 @@ const fromEnv = (init) => async () => {
|
|
|
26
24
|
...(credentialScope && { credentialScope }),
|
|
27
25
|
...(accountId && { accountId }),
|
|
28
26
|
};
|
|
29
|
-
|
|
27
|
+
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
|
|
30
28
|
return credentials;
|
|
31
29
|
}
|
|
32
|
-
throw new
|
|
30
|
+
throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
|
|
33
31
|
};
|
|
34
32
|
|
|
35
33
|
exports.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.47",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
9
9
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
10
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
10
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
11
11
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
12
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
12
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
13
13
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
14
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
14
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
15
15
|
"test": "yarn g:vitest run",
|
|
16
16
|
"test:watch": "yarn g:vitest watch"
|
|
17
17
|
},
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aws-sdk/core": "^3.974.
|
|
30
|
-
"@aws-sdk/types": "^3.973.
|
|
29
|
+
"@aws-sdk/core": "^3.974.21",
|
|
30
|
+
"@aws-sdk/types": "^3.973.13",
|
|
31
31
|
"@smithy/core": "^3.24.6",
|
|
32
32
|
"@smithy/types": "^4.14.3",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkUrl = void 0;
|
|
4
|
-
const config_1 = require("@smithy/core/config");
|
|
1
|
+
const { CredentialsProviderError } = require("@smithy/core/config");
|
|
5
2
|
const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8";
|
|
6
3
|
const LOOPBACK_CIDR_IPv6 = "::1/128";
|
|
7
4
|
const ECS_CONTAINER_HOST = "169.254.170.2";
|
|
8
5
|
const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
|
|
9
6
|
const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
|
|
10
|
-
|
|
7
|
+
exports.checkUrl = (url, logger) => {
|
|
11
8
|
if (url.protocol === "https:") {
|
|
12
9
|
return;
|
|
13
10
|
}
|
|
@@ -38,9 +35,8 @@ const checkUrl = (url, logger) => {
|
|
|
38
35
|
return;
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
|
-
throw new
|
|
38
|
+
throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
42
39
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
43
40
|
- ECS container host 169.254.170.2
|
|
44
41
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
|
|
45
42
|
};
|
|
46
|
-
exports.checkUrl = checkUrl;
|
package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const requestHelpers_1 = require("./requestHelpers");
|
|
8
|
-
const retry_wrapper_1 = require("./retry-wrapper");
|
|
9
|
-
const fromHttp = (options = {}) => {
|
|
1
|
+
const { CredentialsProviderError } = require("@smithy/core/config");
|
|
2
|
+
const { FetchHttpHandler } = require("@smithy/fetch-http-handler");
|
|
3
|
+
const { checkUrl } = require("./checkUrl");
|
|
4
|
+
const { createGetRequest, getCredentials } = require("./requestHelpers");
|
|
5
|
+
const { retryWrapper } = require("./retry-wrapper");
|
|
6
|
+
exports.fromHttp = (options = {}) => {
|
|
10
7
|
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
|
|
11
8
|
let host;
|
|
12
9
|
const full = options.credentialsFullUri;
|
|
@@ -14,18 +11,17 @@ const fromHttp = (options = {}) => {
|
|
|
14
11
|
host = full;
|
|
15
12
|
}
|
|
16
13
|
else {
|
|
17
|
-
throw new
|
|
14
|
+
throw new CredentialsProviderError("No HTTP credential provider host provided.", { logger: options.logger });
|
|
18
15
|
}
|
|
19
16
|
const url = new URL(host);
|
|
20
|
-
|
|
21
|
-
const requestHandler = new
|
|
22
|
-
return
|
|
23
|
-
const request =
|
|
17
|
+
checkUrl(url, options.logger);
|
|
18
|
+
const requestHandler = new FetchHttpHandler();
|
|
19
|
+
return retryWrapper(async () => {
|
|
20
|
+
const request = createGetRequest(url);
|
|
24
21
|
if (options.authorizationToken) {
|
|
25
22
|
request.headers.Authorization = options.authorizationToken;
|
|
26
23
|
}
|
|
27
24
|
const result = await requestHandler.handle(request);
|
|
28
|
-
return
|
|
25
|
+
return getCredentials(result.response);
|
|
29
26
|
}, options.maxRetries ?? 3, options.timeout ?? 1000);
|
|
30
27
|
};
|
|
31
|
-
exports.fromHttp = fromHttp;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const promises_1 = tslib_1.__importDefault(require("node:fs/promises"));
|
|
9
|
-
const checkUrl_1 = require("./checkUrl");
|
|
10
|
-
const requestHelpers_1 = require("./requestHelpers");
|
|
11
|
-
const retry_wrapper_1 = require("./retry-wrapper");
|
|
1
|
+
const { setCredentialFeature } = require("@aws-sdk/core/client");
|
|
2
|
+
const { CredentialsProviderError } = require("@smithy/core/config");
|
|
3
|
+
const { NodeHttpHandler } = require("@smithy/node-http-handler");
|
|
4
|
+
const fs = require("node:fs/promises");
|
|
5
|
+
const { checkUrl } = require("./checkUrl");
|
|
6
|
+
const { createGetRequest, getCredentials } = require("./requestHelpers");
|
|
7
|
+
const { retryWrapper } = require("./retry-wrapper");
|
|
12
8
|
const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
|
|
13
9
|
const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
|
|
14
10
|
const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
|
|
15
11
|
const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
|
|
16
12
|
const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
|
|
17
|
-
|
|
13
|
+
exports.fromHttp = (options = {}) => {
|
|
18
14
|
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
|
|
19
15
|
let host;
|
|
20
16
|
const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
|
|
@@ -41,27 +37,27 @@ const fromHttp = (options = {}) => {
|
|
|
41
37
|
host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
|
|
42
38
|
}
|
|
43
39
|
else {
|
|
44
|
-
throw new
|
|
40
|
+
throw new CredentialsProviderError(`No HTTP credential provider host provided.
|
|
45
41
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
|
|
46
42
|
}
|
|
47
43
|
const url = new URL(host);
|
|
48
|
-
|
|
49
|
-
const requestHandler =
|
|
44
|
+
checkUrl(url, options.logger);
|
|
45
|
+
const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });
|
|
50
46
|
const requestTimeout = options.timeout ?? 1000;
|
|
51
|
-
const provider =
|
|
52
|
-
const request =
|
|
47
|
+
const provider = retryWrapper(async () => {
|
|
48
|
+
const request = createGetRequest(url);
|
|
53
49
|
if (token) {
|
|
54
50
|
request.headers.Authorization = token;
|
|
55
51
|
}
|
|
56
52
|
else if (tokenFile) {
|
|
57
|
-
request.headers.Authorization = (await
|
|
53
|
+
request.headers.Authorization = (await fs.readFile(tokenFile)).toString();
|
|
58
54
|
}
|
|
59
55
|
try {
|
|
60
56
|
const result = await requestHandler.handle(request, { requestTimeout });
|
|
61
|
-
return
|
|
57
|
+
return getCredentials(result.response).then((creds) => setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
|
|
62
58
|
}
|
|
63
59
|
catch (e) {
|
|
64
|
-
throw new
|
|
60
|
+
throw new CredentialsProviderError(String(e), { logger: options.logger });
|
|
65
61
|
}
|
|
66
62
|
}, options.maxRetries ?? 3, options.timeout ?? 1000);
|
|
67
63
|
return async () => {
|
|
@@ -73,4 +69,3 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
|
|
|
73
69
|
}
|
|
74
70
|
};
|
|
75
71
|
};
|
|
76
|
-
exports.fromHttp = fromHttp;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const serde_1 = require("@smithy/core/serde");
|
|
8
|
-
const serde_2 = require("@smithy/core/serde");
|
|
9
|
-
function createGetRequest(url) {
|
|
10
|
-
return new protocols_1.HttpRequest({
|
|
1
|
+
const { CredentialsProviderError } = require("@smithy/core/config");
|
|
2
|
+
const { HttpRequest } = require("@smithy/core/protocols");
|
|
3
|
+
const { parseRfc3339DateTime } = require("@smithy/core/serde");
|
|
4
|
+
const { sdkStreamMixin } = require("@smithy/core/serde");
|
|
5
|
+
exports.createGetRequest = function createGetRequest(url) {
|
|
6
|
+
return new HttpRequest({
|
|
11
7
|
protocol: url.protocol,
|
|
12
8
|
hostname: url.hostname,
|
|
13
9
|
port: Number(url.port),
|
|
@@ -18,9 +14,9 @@ function createGetRequest(url) {
|
|
|
18
14
|
}, {}),
|
|
19
15
|
fragment: url.hash,
|
|
20
16
|
});
|
|
21
|
-
}
|
|
22
|
-
async function getCredentials(response, logger) {
|
|
23
|
-
const stream =
|
|
17
|
+
};
|
|
18
|
+
exports.getCredentials = async function getCredentials(response, logger) {
|
|
19
|
+
const stream = sdkStreamMixin(response.body);
|
|
24
20
|
const str = await stream.transformToString();
|
|
25
21
|
if (response.statusCode === 200) {
|
|
26
22
|
const parsed = JSON.parse(str);
|
|
@@ -28,14 +24,14 @@ async function getCredentials(response, logger) {
|
|
|
28
24
|
typeof parsed.SecretAccessKey !== "string" ||
|
|
29
25
|
typeof parsed.Token !== "string" ||
|
|
30
26
|
typeof parsed.Expiration !== "string") {
|
|
31
|
-
throw new
|
|
27
|
+
throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " +
|
|
32
28
|
"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
|
|
33
29
|
}
|
|
34
30
|
return {
|
|
35
31
|
accessKeyId: parsed.AccessKeyId,
|
|
36
32
|
secretAccessKey: parsed.SecretAccessKey,
|
|
37
33
|
sessionToken: parsed.Token,
|
|
38
|
-
expiration:
|
|
34
|
+
expiration: parseRfc3339DateTime(parsed.Expiration),
|
|
39
35
|
};
|
|
40
36
|
}
|
|
41
37
|
if (response.statusCode >= 400 && response.statusCode < 500) {
|
|
@@ -44,10 +40,10 @@ async function getCredentials(response, logger) {
|
|
|
44
40
|
parsedBody = JSON.parse(str);
|
|
45
41
|
}
|
|
46
42
|
catch (e) { }
|
|
47
|
-
throw Object.assign(new
|
|
43
|
+
throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
|
|
48
44
|
Code: parsedBody.Code,
|
|
49
45
|
Message: parsedBody.Message,
|
|
50
46
|
});
|
|
51
47
|
}
|
|
52
|
-
throw new
|
|
53
|
-
}
|
|
48
|
+
throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
|
|
49
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retryWrapper = void 0;
|
|
4
|
-
const retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
1
|
+
exports.retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
5
2
|
return async () => {
|
|
6
3
|
for (let i = 0; i < maxRetries; ++i) {
|
|
7
4
|
try {
|
|
@@ -14,4 +11,3 @@ const retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
|
14
11
|
return await toRetry();
|
|
15
12
|
};
|
|
16
13
|
};
|
|
17
|
-
exports.retryWrapper = retryWrapper;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.fromHttp = void 0;
|
|
4
|
-
var fromHttp_browser_1 = require("./fromHttp/fromHttp.browser");
|
|
5
|
-
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_browser_1.fromHttp; } });
|
|
1
|
+
const { fromHttp } = require("./fromHttp/fromHttp.browser");
|
|
2
|
+
exports.fromHttp = fromHttp;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.49",
|
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
19
19
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
20
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
20
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
21
21
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
22
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
22
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
23
23
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
24
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
24
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
25
25
|
"test": "yarn g:vitest run",
|
|
26
26
|
"test:watch": "yarn g:vitest watch",
|
|
27
27
|
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@aws-sdk/core": "^3.974.
|
|
42
|
-
"@aws-sdk/types": "^3.973.
|
|
41
|
+
"@aws-sdk/core": "^3.974.21",
|
|
42
|
+
"@aws-sdk/types": "^3.973.13",
|
|
43
43
|
"@smithy/core": "^3.24.6",
|
|
44
44
|
"@smithy/fetch-http-handler": "^5.4.6",
|
|
45
45
|
"@smithy/node-http-handler": "^4.7.6",
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var client = require('@aws-sdk/core/client');
|
|
5
|
-
var credentialProviderLogin = require('@aws-sdk/credential-provider-login');
|
|
1
|
+
const { CredentialsProviderError, chain, getProfileName, parseKnownFiles } = require("@smithy/core/config");
|
|
2
|
+
const { setCredentialFeature } = require("@aws-sdk/core/client");
|
|
3
|
+
const { fromLoginCredentials } = require("@aws-sdk/credential-provider-login");
|
|
6
4
|
|
|
7
5
|
const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
8
6
|
const sourceProvidersMap = {
|
|
9
7
|
EcsContainer: async (options) => {
|
|
10
|
-
const { fromHttp } =
|
|
11
|
-
const { fromContainerMetadata } =
|
|
8
|
+
const { fromHttp } = require('@aws-sdk/credential-provider-http');
|
|
9
|
+
const { fromContainerMetadata } = require('@smithy/credential-provider-imds');
|
|
12
10
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
|
13
|
-
return async () =>
|
|
11
|
+
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
|
14
12
|
},
|
|
15
13
|
Ec2InstanceMetadata: async (options) => {
|
|
16
14
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
|
17
|
-
const { fromInstanceMetadata } =
|
|
15
|
+
const { fromInstanceMetadata } = require('@smithy/credential-provider-imds');
|
|
18
16
|
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
|
19
17
|
},
|
|
20
18
|
Environment: async (options) => {
|
|
21
19
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
|
22
|
-
const { fromEnv } =
|
|
20
|
+
const { fromEnv } = require('@aws-sdk/credential-provider-env');
|
|
23
21
|
return async () => fromEnv(options)().then(setNamedProvider);
|
|
24
22
|
},
|
|
25
23
|
};
|
|
@@ -27,11 +25,11 @@ const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
|
27
25
|
return sourceProvidersMap[credentialSource];
|
|
28
26
|
}
|
|
29
27
|
else {
|
|
30
|
-
throw new
|
|
28
|
+
throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
|
|
31
29
|
`expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
|
-
const setNamedProvider = (creds) =>
|
|
32
|
+
const setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
|
35
33
|
|
|
36
34
|
const isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
37
35
|
return (Boolean(arg) &&
|
|
@@ -61,7 +59,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
|
|
|
61
59
|
const profileData = profiles[profileName];
|
|
62
60
|
const { source_profile, region } = profileData;
|
|
63
61
|
if (!options.roleAssumer) {
|
|
64
|
-
const { getDefaultRoleAssumer } =
|
|
62
|
+
const { getDefaultRoleAssumer } = require('@aws-sdk/nested-clients/sts');
|
|
65
63
|
options.roleAssumer = getDefaultRoleAssumer({
|
|
66
64
|
...options.clientConfig,
|
|
67
65
|
credentialProviderLogger: options.logger,
|
|
@@ -73,8 +71,8 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
|
|
|
73
71
|
}, options.clientPlugins);
|
|
74
72
|
}
|
|
75
73
|
if (source_profile && source_profile in visitedProfiles) {
|
|
76
|
-
throw new
|
|
77
|
-
` ${
|
|
74
|
+
throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
|
|
75
|
+
` ${getProfileName(options)}. Profiles visited: ` +
|
|
78
76
|
Object.keys(visitedProfiles).join(", "), { logger: options.logger });
|
|
79
77
|
}
|
|
80
78
|
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
|
@@ -85,7 +83,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
|
|
|
85
83
|
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
|
86
84
|
: (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
|
|
87
85
|
if (isCredentialSourceWithoutRoleArn(profileData)) {
|
|
88
|
-
return sourceCredsProvider.then((creds) =>
|
|
86
|
+
return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
|
89
87
|
}
|
|
90
88
|
else {
|
|
91
89
|
const params = {
|
|
@@ -97,13 +95,13 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
|
|
|
97
95
|
const { mfa_serial } = profileData;
|
|
98
96
|
if (mfa_serial) {
|
|
99
97
|
if (!options.mfaCodeProvider) {
|
|
100
|
-
throw new
|
|
98
|
+
throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
|
|
101
99
|
}
|
|
102
100
|
params.SerialNumber = mfa_serial;
|
|
103
101
|
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
|
104
102
|
}
|
|
105
103
|
const sourceCreds = await sourceCredsProvider;
|
|
106
|
-
return options.roleAssumer(sourceCreds, params).then((creds) =>
|
|
104
|
+
return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
|
107
105
|
}
|
|
108
106
|
};
|
|
109
107
|
const isCredentialSourceWithoutRoleArn = (section) => {
|
|
@@ -114,21 +112,25 @@ const isLoginProfile = (data) => {
|
|
|
114
112
|
return Boolean(data && data.login_session);
|
|
115
113
|
};
|
|
116
114
|
const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
|
117
|
-
const credentials = await
|
|
115
|
+
const credentials = await fromLoginCredentials({
|
|
118
116
|
...options,
|
|
119
117
|
profile: profileName,
|
|
120
118
|
})({ callerClientConfig });
|
|
121
|
-
return
|
|
119
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
|
122
120
|
};
|
|
123
121
|
|
|
124
122
|
const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
125
|
-
const resolveProcessCredentials = async (options, profile) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
const resolveProcessCredentials = async (options, profile) => {
|
|
124
|
+
const { fromProcess } = require('@aws-sdk/credential-provider-process');
|
|
125
|
+
const credentials = await fromProcess({
|
|
126
|
+
...options,
|
|
127
|
+
profile,
|
|
128
|
+
})();
|
|
129
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
|
|
130
|
+
};
|
|
129
131
|
|
|
130
132
|
const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
|
131
|
-
const { fromSSO } =
|
|
133
|
+
const { fromSSO } = require('@aws-sdk/credential-provider-sso');
|
|
132
134
|
return fromSSO({
|
|
133
135
|
profile,
|
|
134
136
|
logger: options.logger,
|
|
@@ -138,10 +140,10 @@ const resolveSsoCredentials = async (profile, profileData, options = {}, callerC
|
|
|
138
140
|
callerClientConfig,
|
|
139
141
|
}).then((creds) => {
|
|
140
142
|
if (profileData.sso_session) {
|
|
141
|
-
return
|
|
143
|
+
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
|
142
144
|
}
|
|
143
145
|
else {
|
|
144
|
-
return
|
|
146
|
+
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
|
145
147
|
}
|
|
146
148
|
});
|
|
147
149
|
};
|
|
@@ -167,7 +169,7 @@ const resolveStaticCredentials = async (profile, options) => {
|
|
|
167
169
|
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
|
168
170
|
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
|
169
171
|
};
|
|
170
|
-
return
|
|
172
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
|
171
173
|
};
|
|
172
174
|
|
|
173
175
|
const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
|
@@ -175,16 +177,20 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
|
|
175
177
|
typeof arg.web_identity_token_file === "string" &&
|
|
176
178
|
typeof arg.role_arn === "string" &&
|
|
177
179
|
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
|
178
|
-
const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) =>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
})
|
|
180
|
+
const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
|
|
181
|
+
const { fromTokenFile } = require('@aws-sdk/credential-provider-web-identity');
|
|
182
|
+
const credentials = await fromTokenFile({
|
|
183
|
+
webIdentityTokenFile: profile.web_identity_token_file,
|
|
184
|
+
roleArn: profile.role_arn,
|
|
185
|
+
roleSessionName: profile.role_session_name,
|
|
186
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
187
|
+
logger: options.logger,
|
|
188
|
+
parentClientConfig: options.parentClientConfig,
|
|
189
|
+
})({
|
|
190
|
+
callerClientConfig,
|
|
191
|
+
});
|
|
192
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
|
|
193
|
+
};
|
|
188
194
|
|
|
189
195
|
const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
|
190
196
|
const data = profiles[profileName];
|
|
@@ -209,13 +215,13 @@ const resolveProfileData = async (profileName, profiles, options, callerClientCo
|
|
|
209
215
|
if (isLoginProfile(data)) {
|
|
210
216
|
return resolveLoginCredentials(profileName, options, callerClientConfig);
|
|
211
217
|
}
|
|
212
|
-
throw new
|
|
218
|
+
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
213
219
|
};
|
|
214
220
|
|
|
215
221
|
const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
216
222
|
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
|
217
|
-
const profiles = await
|
|
218
|
-
return resolveProfileData(
|
|
223
|
+
const profiles = await parseKnownFiles(init);
|
|
224
|
+
return resolveProfileData(getProfileName({
|
|
219
225
|
profile: init.profile ?? callerClientConfig?.profile,
|
|
220
226
|
}), profiles, init, callerClientConfig);
|
|
221
227
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
2
2
|
export const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
3
|
-
export const resolveProcessCredentials = async (options, profile) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export const resolveProcessCredentials = async (options, profile) => {
|
|
4
|
+
const { fromProcess } = await import("@aws-sdk/credential-provider-process");
|
|
5
|
+
const credentials = await fromProcess({
|
|
6
|
+
...options,
|
|
7
|
+
profile,
|
|
8
|
+
})();
|
|
9
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
|
|
10
|
+
};
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
CHANGED
|
@@ -4,13 +4,17 @@ export const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
|
|
4
4
|
typeof arg.web_identity_token_file === "string" &&
|
|
5
5
|
typeof arg.role_arn === "string" &&
|
|
6
6
|
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
|
|
7
|
-
export const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
7
|
+
export const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
|
|
8
|
+
const { fromTokenFile } = await import("@aws-sdk/credential-provider-web-identity");
|
|
9
|
+
const credentials = await fromTokenFile({
|
|
10
|
+
webIdentityTokenFile: profile.web_identity_token_file,
|
|
11
|
+
roleArn: profile.role_arn,
|
|
12
|
+
roleSessionName: profile.role_session_name,
|
|
13
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
14
|
+
logger: options.logger,
|
|
15
|
+
parentClientConfig: options.parentClientConfig,
|
|
16
|
+
})({
|
|
17
|
+
callerClientConfig,
|
|
18
|
+
});
|
|
19
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
|
|
20
|
+
};
|