@aws-sdk/credential-provider-ini 3.911.0 → 3.914.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 +2 -2
- package/dist-es/resolveAssumeRoleCredentials.js +1 -2
- package/dist-es/resolveProfileData.js +1 -1
- package/dist-types/resolveAssumeRoleCredentials.d.ts +2 -1
- package/dist-types/resolveProfileData.d.ts +4 -0
- package/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +3 -1
- package/dist-types/ts3.4/resolveProfileData.d.ts +1 -0
- package/package.json +13 -13
package/dist-cjs/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
|
|
56
56
|
}
|
|
57
57
|
return withProviderProfile;
|
|
58
58
|
};
|
|
59
|
-
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
59
|
+
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
|
60
60
|
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
61
61
|
const profileData = profiles[profileName];
|
|
62
62
|
const { source_profile, region } = profileData;
|
|
@@ -176,7 +176,7 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile
|
|
|
176
176
|
return resolveStaticCredentials(data, options);
|
|
177
177
|
}
|
|
178
178
|
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
|
179
|
-
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
|
|
179
|
+
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
|
180
180
|
}
|
|
181
181
|
if (isStaticCredsProfile(data)) {
|
|
182
182
|
return resolveStaticCredentials(data, options);
|
|
@@ -2,7 +2,6 @@ import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
|
2
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
3
3
|
import { getProfileName } from "@smithy/shared-ini-file-loader";
|
|
4
4
|
import { resolveCredentialSource } from "./resolveCredentialSource";
|
|
5
|
-
import { resolveProfileData } from "./resolveProfileData";
|
|
6
5
|
export const isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
7
6
|
return (Boolean(arg) &&
|
|
8
7
|
typeof arg === "object" &&
|
|
@@ -26,7 +25,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
|
|
26
25
|
}
|
|
27
26
|
return withProviderProfile;
|
|
28
27
|
};
|
|
29
|
-
export const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
28
|
+
export const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
|
30
29
|
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
31
30
|
const profileData = profiles[profileName];
|
|
32
31
|
const { source_profile, region } = profileData;
|
|
@@ -10,7 +10,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
10
10
|
return resolveStaticCredentials(data, options);
|
|
11
11
|
}
|
|
12
12
|
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
|
13
|
-
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
|
|
13
|
+
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
|
14
14
|
}
|
|
15
15
|
if (isStaticCredsProfile(data)) {
|
|
16
16
|
return resolveStaticCredentials(data, options);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
import { FromIniInit } from "./fromIni";
|
|
3
|
+
import type { ResolveProfileData } from "./resolveProfileData";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*
|
|
@@ -44,4 +45,4 @@ export declare const isAssumeRoleProfile: (arg: any, { profile, logger }?: {
|
|
|
44
45
|
/**
|
|
45
46
|
* @internal
|
|
46
47
|
*/
|
|
47
|
-
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles
|
|
48
|
+
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles: Record<string, true> | undefined, resolveProfileData: ResolveProfileData) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
import { FromIniInit } from "./fromIni";
|
|
3
|
+
import { ResolveProfileData } from "./resolveProfileData";
|
|
3
4
|
export interface AssumeRoleParams {
|
|
4
5
|
RoleArn: string;
|
|
5
6
|
RoleSessionName: string;
|
|
@@ -22,5 +23,6 @@ export declare const resolveAssumeRoleCredentials: (
|
|
|
22
23
|
profileName: string,
|
|
23
24
|
profiles: ParsedIniData,
|
|
24
25
|
options: FromIniInit,
|
|
25
|
-
visitedProfiles
|
|
26
|
+
visitedProfiles: Record<string, true> | undefined,
|
|
27
|
+
resolveProfileData: ResolveProfileData
|
|
26
28
|
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.914.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",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-sdk/core": "3.
|
|
32
|
-
"@aws-sdk/credential-provider-env": "3.
|
|
33
|
-
"@aws-sdk/credential-provider-http": "3.
|
|
34
|
-
"@aws-sdk/credential-provider-process": "3.
|
|
35
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
36
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
|
37
|
-
"@aws-sdk/nested-clients": "3.
|
|
38
|
-
"@aws-sdk/types": "3.
|
|
39
|
-
"@smithy/credential-provider-imds": "^4.2.
|
|
40
|
-
"@smithy/property-provider": "^4.2.
|
|
41
|
-
"@smithy/shared-ini-file-loader": "^4.3.
|
|
42
|
-
"@smithy/types": "^4.
|
|
31
|
+
"@aws-sdk/core": "3.914.0",
|
|
32
|
+
"@aws-sdk/credential-provider-env": "3.914.0",
|
|
33
|
+
"@aws-sdk/credential-provider-http": "3.914.0",
|
|
34
|
+
"@aws-sdk/credential-provider-process": "3.914.0",
|
|
35
|
+
"@aws-sdk/credential-provider-sso": "3.914.0",
|
|
36
|
+
"@aws-sdk/credential-provider-web-identity": "3.914.0",
|
|
37
|
+
"@aws-sdk/nested-clients": "3.914.0",
|
|
38
|
+
"@aws-sdk/types": "3.914.0",
|
|
39
|
+
"@smithy/credential-provider-imds": "^4.2.3",
|
|
40
|
+
"@smithy/property-provider": "^4.2.3",
|
|
41
|
+
"@smithy/shared-ini-file-loader": "^4.3.3",
|
|
42
|
+
"@smithy/types": "^4.8.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|