@aws-sdk/credential-provider-ini 3.721.0 → 3.723.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/dist-cjs/index.js +12 -17
- package/package.json +16 -16
package/dist-cjs/index.js
CHANGED
|
@@ -54,16 +54,16 @@ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileN
|
|
|
54
54
|
EcsContainer: async (options) => {
|
|
55
55
|
const { fromHttp } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-http")));
|
|
56
56
|
const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
|
|
57
|
-
logger
|
|
57
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
|
58
58
|
return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
|
59
59
|
},
|
|
60
60
|
Ec2InstanceMetadata: async (options) => {
|
|
61
|
-
logger
|
|
61
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
|
62
62
|
const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
|
|
63
63
|
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
|
64
64
|
},
|
|
65
65
|
Environment: async (options) => {
|
|
66
|
-
logger
|
|
66
|
+
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
|
67
67
|
const { fromEnv } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-env")));
|
|
68
68
|
return async () => fromEnv(options)().then(setNamedProvider);
|
|
69
69
|
}
|
|
@@ -84,24 +84,21 @@ var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", lo
|
|
|
84
84
|
return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
|
|
85
85
|
}, "isAssumeRoleProfile");
|
|
86
86
|
var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {
|
|
87
|
-
var _a;
|
|
88
87
|
const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
|
|
89
88
|
if (withSourceProfile) {
|
|
90
|
-
|
|
89
|
+
logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
|
|
91
90
|
}
|
|
92
91
|
return withSourceProfile;
|
|
93
92
|
}, "isAssumeRoleWithSourceProfile");
|
|
94
93
|
var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {
|
|
95
|
-
var _a;
|
|
96
94
|
const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
|
|
97
95
|
if (withProviderProfile) {
|
|
98
|
-
|
|
96
|
+
logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
|
|
99
97
|
}
|
|
100
98
|
return withProviderProfile;
|
|
101
99
|
}, "isCredentialSourceProfile");
|
|
102
100
|
var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
103
|
-
|
|
104
|
-
(_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
101
|
+
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
105
102
|
const profileData = profiles[profileName];
|
|
106
103
|
const { source_profile, region } = profileData;
|
|
107
104
|
if (!options.roleAssumer) {
|
|
@@ -111,8 +108,8 @@ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, pr
|
|
|
111
108
|
...options.clientConfig,
|
|
112
109
|
credentialProviderLogger: options.logger,
|
|
113
110
|
parentClientConfig: {
|
|
114
|
-
...options
|
|
115
|
-
region: region ??
|
|
111
|
+
...options?.parentClientConfig,
|
|
112
|
+
region: region ?? options?.parentClientConfig?.region
|
|
116
113
|
}
|
|
117
114
|
},
|
|
118
115
|
options.clientPlugins
|
|
@@ -124,7 +121,7 @@ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, pr
|
|
|
124
121
|
{ logger: options.logger }
|
|
125
122
|
);
|
|
126
123
|
}
|
|
127
|
-
|
|
124
|
+
options.logger?.debug(
|
|
128
125
|
`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`
|
|
129
126
|
);
|
|
130
127
|
const sourceCredsProvider = source_profile ? resolveProfileData(
|
|
@@ -200,8 +197,7 @@ var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_
|
|
|
200
197
|
|
|
201
198
|
var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
|
|
202
199
|
var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => {
|
|
203
|
-
|
|
204
|
-
(_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
|
200
|
+
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
|
205
201
|
const credentials = {
|
|
206
202
|
accessKeyId: profile.aws_access_key_id,
|
|
207
203
|
secretAccessKey: profile.aws_secret_access_key,
|
|
@@ -255,7 +251,6 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
|
255
251
|
|
|
256
252
|
// src/fromIni.ts
|
|
257
253
|
var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {
|
|
258
|
-
var _a;
|
|
259
254
|
const init = {
|
|
260
255
|
..._init,
|
|
261
256
|
parentClientConfig: {
|
|
@@ -263,11 +258,11 @@ var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig
|
|
|
263
258
|
..._init.parentClientConfig
|
|
264
259
|
}
|
|
265
260
|
};
|
|
266
|
-
|
|
261
|
+
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
|
267
262
|
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
|
|
268
263
|
return resolveProfileData(
|
|
269
264
|
(0, import_shared_ini_file_loader.getProfileName)({
|
|
270
|
-
profile: _init.profile ??
|
|
265
|
+
profile: _init.profile ?? callerClientConfig?.profile
|
|
271
266
|
}),
|
|
272
267
|
profiles,
|
|
273
268
|
init
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.723.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,33 +27,33 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/core": "3.
|
|
31
|
-
"@aws-sdk/credential-provider-env": "3.
|
|
32
|
-
"@aws-sdk/credential-provider-http": "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/types": "3.
|
|
37
|
-
"@smithy/credential-provider-imds": "^
|
|
38
|
-
"@smithy/property-provider": "^
|
|
39
|
-
"@smithy/shared-ini-file-loader": "^
|
|
40
|
-
"@smithy/types": "^
|
|
30
|
+
"@aws-sdk/core": "3.723.0",
|
|
31
|
+
"@aws-sdk/credential-provider-env": "3.723.0",
|
|
32
|
+
"@aws-sdk/credential-provider-http": "3.723.0",
|
|
33
|
+
"@aws-sdk/credential-provider-process": "3.723.0",
|
|
34
|
+
"@aws-sdk/credential-provider-sso": "3.723.0",
|
|
35
|
+
"@aws-sdk/credential-provider-web-identity": "3.723.0",
|
|
36
|
+
"@aws-sdk/types": "3.723.0",
|
|
37
|
+
"@smithy/credential-provider-imds": "^4.0.0",
|
|
38
|
+
"@smithy/property-provider": "^4.0.0",
|
|
39
|
+
"@smithy/shared-ini-file-loader": "^4.0.0",
|
|
40
|
+
"@smithy/types": "^4.0.0",
|
|
41
41
|
"tslib": "^2.6.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@tsconfig/recommended": "1.0.1",
|
|
45
|
-
"@types/node": "^
|
|
45
|
+
"@types/node": "^18.19.69",
|
|
46
46
|
"concurrently": "7.0.0",
|
|
47
47
|
"downlevel-dts": "0.10.1",
|
|
48
48
|
"rimraf": "3.0.2",
|
|
49
|
-
"typescript": "~
|
|
49
|
+
"typescript": "~5.2.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aws-sdk/client-sts": "^3.
|
|
52
|
+
"@aws-sdk/client-sts": "^3.723.0"
|
|
53
53
|
},
|
|
54
54
|
"types": "./dist-types/index.d.ts",
|
|
55
55
|
"engines": {
|
|
56
|
-
"node": ">=
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
57
|
},
|
|
58
58
|
"typesVersions": {
|
|
59
59
|
"<4.0": {
|