@aws-sdk/credential-provider-ini 3.502.0 → 3.503.1
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 +7 -10
- package/dist-es/resolveProfileData.js +1 -1
- package/dist-es/resolveSsoCredentials.js +4 -8
- package/dist-es/resolveWebIdentityCredentials.js +1 -0
- package/dist-types/resolveSsoCredentials.d.ts +2 -1
- package/dist-types/ts3.4/resolveSsoCredentials.d.ts +4 -2
- package/package.json +2 -2
package/dist-cjs/index.js
CHANGED
|
@@ -130,15 +130,11 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile)
|
|
|
130
130
|
), "resolveProcessCredentials");
|
|
131
131
|
|
|
132
132
|
// src/resolveSsoCredentials.ts
|
|
133
|
-
var resolveSsoCredentials = /* @__PURE__ */ __name(async (
|
|
134
|
-
const { fromSSO
|
|
135
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
133
|
+
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
|
|
134
|
+
const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
|
|
136
135
|
return fromSSO({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
ssoSession: sso_session,
|
|
140
|
-
ssoRegion: sso_region,
|
|
141
|
-
ssoRoleName: sso_role_name
|
|
136
|
+
profile,
|
|
137
|
+
logger: options.logger
|
|
142
138
|
})();
|
|
143
139
|
}, "resolveSsoCredentials");
|
|
144
140
|
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
|
|
@@ -163,7 +159,8 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
|
|
|
163
159
|
webIdentityTokenFile: profile.web_identity_token_file,
|
|
164
160
|
roleArn: profile.role_arn,
|
|
165
161
|
roleSessionName: profile.role_session_name,
|
|
166
|
-
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
|
|
162
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
163
|
+
logger: options.logger
|
|
167
164
|
})()
|
|
168
165
|
), "resolveWebIdentityCredentials");
|
|
169
166
|
|
|
@@ -186,7 +183,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
|
186
183
|
return resolveProcessCredentials(options, profileName);
|
|
187
184
|
}
|
|
188
185
|
if (isSsoProfile(data)) {
|
|
189
|
-
return await resolveSsoCredentials(
|
|
186
|
+
return await resolveSsoCredentials(profileName, options);
|
|
190
187
|
}
|
|
191
188
|
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
192
189
|
}, "resolveProfileData");
|
|
@@ -22,7 +22,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
22
22
|
return resolveProcessCredentials(options, profileName);
|
|
23
23
|
}
|
|
24
24
|
if (isSsoProfile(data)) {
|
|
25
|
-
return await resolveSsoCredentials(
|
|
25
|
+
return await resolveSsoCredentials(profileName, options);
|
|
26
26
|
}
|
|
27
27
|
throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
28
28
|
};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
export const resolveSsoCredentials = async (
|
|
2
|
-
const { fromSSO
|
|
3
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
1
|
+
export const resolveSsoCredentials = async (profile, options = {}) => {
|
|
2
|
+
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
|
4
3
|
return fromSSO({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ssoSession: sso_session,
|
|
8
|
-
ssoRegion: sso_region,
|
|
9
|
-
ssoRoleName: sso_role_name,
|
|
4
|
+
profile,
|
|
5
|
+
logger: options.logger,
|
|
10
6
|
})();
|
|
11
7
|
};
|
|
12
8
|
export const isSsoProfile = (arg) => arg &&
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
|
2
|
+
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
3
|
import type { Profile } from "@smithy/types";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
|
-
export declare const resolveSsoCredentials: (
|
|
7
|
+
export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
|
|
7
8
|
/**
|
|
8
9
|
* @internal
|
|
9
10
|
* duplicated from \@aws-sdk/credential-provider-sso to defer import.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
|
2
|
+
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
3
|
import { Profile } from "@smithy/types";
|
|
3
4
|
export declare const resolveSsoCredentials: (
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
profile: string,
|
|
6
|
+
options?: CredentialProviderOptions
|
|
7
|
+
) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
|
|
6
8
|
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.503.1",
|
|
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,7 +27,7 @@
|
|
|
27
27
|
"@aws-sdk/client-sts": "3.502.0",
|
|
28
28
|
"@aws-sdk/credential-provider-env": "3.502.0",
|
|
29
29
|
"@aws-sdk/credential-provider-process": "3.502.0",
|
|
30
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
30
|
+
"@aws-sdk/credential-provider-sso": "3.503.1",
|
|
31
31
|
"@aws-sdk/credential-provider-web-identity": "3.502.0",
|
|
32
32
|
"@aws-sdk/types": "3.502.0",
|
|
33
33
|
"@smithy/credential-provider-imds": "^2.2.1",
|