@aws-sdk/credential-provider-ini 3.503.0 → 3.504.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 +6 -4
- package/dist-es/resolveProfileData.js +1 -1
- package/dist-es/resolveSsoCredentials.js +2 -1
- 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 +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -130,10 +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 (profile) => {
|
|
133
|
+
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
|
|
134
134
|
const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
|
|
135
135
|
return fromSSO({
|
|
136
|
-
profile
|
|
136
|
+
profile,
|
|
137
|
+
logger: options.logger
|
|
137
138
|
})();
|
|
138
139
|
}, "resolveSsoCredentials");
|
|
139
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");
|
|
@@ -158,7 +159,8 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
|
|
|
158
159
|
webIdentityTokenFile: profile.web_identity_token_file,
|
|
159
160
|
roleArn: profile.role_arn,
|
|
160
161
|
roleSessionName: profile.role_session_name,
|
|
161
|
-
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
|
|
162
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
163
|
+
logger: options.logger
|
|
162
164
|
})()
|
|
163
165
|
), "resolveWebIdentityCredentials");
|
|
164
166
|
|
|
@@ -181,7 +183,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
|
181
183
|
return resolveProcessCredentials(options, profileName);
|
|
182
184
|
}
|
|
183
185
|
if (isSsoProfile(data)) {
|
|
184
|
-
return await resolveSsoCredentials(profileName);
|
|
186
|
+
return await resolveSsoCredentials(profileName, options);
|
|
185
187
|
}
|
|
186
188
|
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
187
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(profileName);
|
|
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,7 +1,8 @@
|
|
|
1
|
-
export const resolveSsoCredentials = async (profile) => {
|
|
1
|
+
export const resolveSsoCredentials = async (profile, options = {}) => {
|
|
2
2
|
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
|
3
3
|
return fromSSO({
|
|
4
4
|
profile,
|
|
5
|
+
logger: options.logger,
|
|
5
6
|
})();
|
|
6
7
|
};
|
|
7
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: (profile: string) => Promise<import("@
|
|
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
|
-
profile: string
|
|
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.504.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",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/client-sts": "3.
|
|
27
|
+
"@aws-sdk/client-sts": "3.504.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.
|
|
31
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
|
30
|
+
"@aws-sdk/credential-provider-sso": "3.504.0",
|
|
31
|
+
"@aws-sdk/credential-provider-web-identity": "3.504.0",
|
|
32
32
|
"@aws-sdk/types": "3.502.0",
|
|
33
33
|
"@smithy/credential-provider-imds": "^2.2.1",
|
|
34
34
|
"@smithy/property-provider": "^2.1.1",
|