@cdk8s/awscdk-resolver 0.0.180 → 0.0.182
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/package.json +14 -14
- package/node_modules/@aws-sdk/client-sso/package.json +11 -11
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +13 -13
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +10 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +10 -2
- package/node_modules/@aws-sdk/client-sts/package.json +13 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +12 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +6 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +7 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +6 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/setCredentialFeature.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +11 -0
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +2 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +2 -1
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +29 -13
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js +5 -3
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +2 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js +10 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js +5 -3
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +2 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +8 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +9 -1
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -3
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +13 -1
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +13 -0
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +2 -1
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +6 -1
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +6 -1
- package/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +5 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +4 -1
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +5 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +3 -3
- package/package.json +4 -4
@@ -43,9 +43,11 @@ module.exports = __toCommonJS(src_exports);
|
|
43
43
|
|
44
44
|
// src/resolveAssumeRoleCredentials.ts
|
45
45
|
|
46
|
+
|
46
47
|
var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader");
|
47
48
|
|
48
49
|
// src/resolveCredentialSource.ts
|
50
|
+
var import_client = require("@aws-sdk/core/client");
|
49
51
|
var import_property_provider = require("@smithy/property-provider");
|
50
52
|
var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => {
|
51
53
|
const sourceProvidersMap = {
|
@@ -53,17 +55,17 @@ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileN
|
|
53
55
|
const { fromHttp } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-http")));
|
54
56
|
const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
|
55
57
|
logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
56
|
-
return (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options));
|
58
|
+
return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
57
59
|
},
|
58
60
|
Ec2InstanceMetadata: async (options) => {
|
59
61
|
logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
60
62
|
const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
|
61
|
-
return fromInstanceMetadata(options);
|
63
|
+
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
62
64
|
},
|
63
65
|
Environment: async (options) => {
|
64
66
|
logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
65
67
|
const { fromEnv } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-env")));
|
66
|
-
return fromEnv(options);
|
68
|
+
return async () => fromEnv(options)().then(setNamedProvider);
|
67
69
|
}
|
68
70
|
};
|
69
71
|
if (credentialSource in sourceProvidersMap) {
|
@@ -75,6 +77,7 @@ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileN
|
|
75
77
|
);
|
76
78
|
}
|
77
79
|
}, "resolveCredentialSource");
|
80
|
+
var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider");
|
78
81
|
|
79
82
|
// src/resolveAssumeRoleCredentials.ts
|
80
83
|
var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger } = {}) => {
|
@@ -132,7 +135,7 @@ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, pr
|
|
132
135
|
isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})
|
133
136
|
) : (await resolveCredentialSource(data.credential_source, profileName, options.logger)(options))();
|
134
137
|
if (isCredentialSourceWithoutRoleArn(data)) {
|
135
|
-
return sourceCredsProvider;
|
138
|
+
return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
136
139
|
} else {
|
137
140
|
const params = {
|
138
141
|
RoleArn: data.role_arn,
|
@@ -152,7 +155,9 @@ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, pr
|
|
152
155
|
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
153
156
|
}
|
154
157
|
const sourceCreds = await sourceCredsProvider;
|
155
|
-
return options.roleAssumer(sourceCreds, params)
|
158
|
+
return options.roleAssumer(sourceCreds, params).then(
|
159
|
+
(creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")
|
160
|
+
);
|
156
161
|
}
|
157
162
|
}, "resolveAssumeRoleCredentials");
|
158
163
|
var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => {
|
@@ -160,39 +165,50 @@ var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => {
|
|
160
165
|
}, "isCredentialSourceWithoutRoleArn");
|
161
166
|
|
162
167
|
// src/resolveProcessCredentials.ts
|
168
|
+
|
163
169
|
var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
|
164
170
|
var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-process"))).then(
|
165
171
|
({ fromProcess }) => fromProcess({
|
166
172
|
...options,
|
167
173
|
profile
|
168
|
-
})()
|
174
|
+
})().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))
|
169
175
|
), "resolveProcessCredentials");
|
170
176
|
|
171
177
|
// src/resolveSsoCredentials.ts
|
172
|
-
|
178
|
+
|
179
|
+
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => {
|
173
180
|
const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
|
174
181
|
return fromSSO({
|
175
182
|
profile,
|
176
183
|
logger: options.logger
|
177
|
-
})()
|
184
|
+
})().then((creds) => {
|
185
|
+
if (profileData.sso_session) {
|
186
|
+
return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
187
|
+
} else {
|
188
|
+
return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
189
|
+
}
|
190
|
+
});
|
178
191
|
}, "resolveSsoCredentials");
|
179
192
|
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");
|
180
193
|
|
181
194
|
// src/resolveStaticCredentials.ts
|
195
|
+
|
182
196
|
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");
|
183
|
-
var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
|
197
|
+
var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => {
|
184
198
|
var _a;
|
185
199
|
(_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
186
|
-
|
200
|
+
const credentials = {
|
187
201
|
accessKeyId: profile.aws_access_key_id,
|
188
202
|
secretAccessKey: profile.aws_secret_access_key,
|
189
203
|
sessionToken: profile.aws_session_token,
|
190
204
|
...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
|
191
205
|
...profile.aws_account_id && { accountId: profile.aws_account_id }
|
192
|
-
}
|
206
|
+
};
|
207
|
+
return (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n");
|
193
208
|
}, "resolveStaticCredentials");
|
194
209
|
|
195
210
|
// src/resolveWebIdentityCredentials.ts
|
211
|
+
|
196
212
|
var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
|
197
213
|
var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-web-identity"))).then(
|
198
214
|
({ fromTokenFile }) => fromTokenFile({
|
@@ -202,7 +218,7 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
|
|
202
218
|
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
203
219
|
logger: options.logger,
|
204
220
|
parentClientConfig: options.parentClientConfig
|
205
|
-
})()
|
221
|
+
})().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))
|
206
222
|
), "resolveWebIdentityCredentials");
|
207
223
|
|
208
224
|
// src/resolveProfileData.ts
|
@@ -224,7 +240,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
224
240
|
return resolveProcessCredentials(options, profileName);
|
225
241
|
}
|
226
242
|
if (isSsoProfile(data)) {
|
227
|
-
return await resolveSsoCredentials(profileName, options);
|
243
|
+
return await resolveSsoCredentials(profileName, data, options);
|
228
244
|
}
|
229
245
|
throw new import_property_provider.CredentialsProviderError(
|
230
246
|
`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`,
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
2
3
|
import { getProfileName } from "@smithy/shared-ini-file-loader";
|
3
4
|
import { resolveCredentialSource } from "./resolveCredentialSource";
|
@@ -50,7 +51,7 @@ export const resolveAssumeRoleCredentials = async (profileName, profiles, option
|
|
50
51
|
}, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))
|
51
52
|
: (await resolveCredentialSource(data.credential_source, profileName, options.logger)(options))();
|
52
53
|
if (isCredentialSourceWithoutRoleArn(data)) {
|
53
|
-
return sourceCredsProvider;
|
54
|
+
return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
54
55
|
}
|
55
56
|
else {
|
56
57
|
const params = {
|
@@ -68,7 +69,7 @@ export const resolveAssumeRoleCredentials = async (profileName, profiles, option
|
|
68
69
|
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
69
70
|
}
|
70
71
|
const sourceCreds = await sourceCredsProvider;
|
71
|
-
return options.roleAssumer(sourceCreds, params);
|
72
|
+
return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
|
72
73
|
}
|
73
74
|
};
|
74
75
|
const isCredentialSourceWithoutRoleArn = (section) => {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
import { chain, CredentialsProviderError } from "@smithy/property-provider";
|
2
3
|
export const resolveCredentialSource = (credentialSource, profileName, logger) => {
|
3
4
|
const sourceProvidersMap = {
|
@@ -5,17 +6,17 @@ export const resolveCredentialSource = (credentialSource, profileName, logger) =
|
|
5
6
|
const { fromHttp } = await import("@aws-sdk/credential-provider-http");
|
6
7
|
const { fromContainerMetadata } = await import("@smithy/credential-provider-imds");
|
7
8
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
8
|
-
return chain(fromHttp(options ?? {}), fromContainerMetadata(options));
|
9
|
+
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
9
10
|
},
|
10
11
|
Ec2InstanceMetadata: async (options) => {
|
11
12
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
12
13
|
const { fromInstanceMetadata } = await import("@smithy/credential-provider-imds");
|
13
|
-
return fromInstanceMetadata(options);
|
14
|
+
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
14
15
|
},
|
15
16
|
Environment: async (options) => {
|
16
17
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
17
18
|
const { fromEnv } = await import("@aws-sdk/credential-provider-env");
|
18
|
-
return fromEnv(options);
|
19
|
+
return async () => fromEnv(options)().then(setNamedProvider);
|
19
20
|
},
|
20
21
|
};
|
21
22
|
if (credentialSource in sourceProvidersMap) {
|
@@ -26,3 +27,4 @@ export const resolveCredentialSource = (credentialSource, profileName, logger) =
|
|
26
27
|
`expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
27
28
|
}
|
28
29
|
};
|
30
|
+
const setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
export const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
2
3
|
export const resolveProcessCredentials = async (options, profile) => import("@aws-sdk/credential-provider-process").then(({ fromProcess }) => fromProcess({
|
3
4
|
...options,
|
4
5
|
profile,
|
5
|
-
})());
|
6
|
+
})().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
@@ -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, options);
|
25
|
+
return await resolveSsoCredentials(profileName, data, options);
|
26
26
|
}
|
27
27
|
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
28
28
|
};
|
@@ -1,9 +1,17 @@
|
|
1
|
-
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
2
|
+
export const resolveSsoCredentials = async (profile, profileData, options = {}) => {
|
2
3
|
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
3
4
|
return fromSSO({
|
4
5
|
profile,
|
5
6
|
logger: options.logger,
|
6
|
-
})()
|
7
|
+
})().then((creds) => {
|
8
|
+
if (profileData.sso_session) {
|
9
|
+
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
|
13
|
+
}
|
14
|
+
});
|
7
15
|
};
|
8
16
|
export const isSsoProfile = (arg) => arg &&
|
9
17
|
(typeof arg.sso_start_url === "string" ||
|
@@ -1,16 +1,18 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
export const isStaticCredsProfile = (arg) => Boolean(arg) &&
|
2
3
|
typeof arg === "object" &&
|
3
4
|
typeof arg.aws_access_key_id === "string" &&
|
4
5
|
typeof arg.aws_secret_access_key === "string" &&
|
5
6
|
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
|
6
7
|
["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
7
|
-
export const resolveStaticCredentials = (profile, options) => {
|
8
|
+
export const resolveStaticCredentials = async (profile, options) => {
|
8
9
|
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
9
|
-
|
10
|
+
const credentials = {
|
10
11
|
accessKeyId: profile.aws_access_key_id,
|
11
12
|
secretAccessKey: profile.aws_secret_access_key,
|
12
13
|
sessionToken: profile.aws_session_token,
|
13
14
|
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
14
15
|
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
15
|
-
}
|
16
|
+
};
|
17
|
+
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
16
18
|
};
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
export const isWebIdentityProfile = (arg) => Boolean(arg) &&
|
2
3
|
typeof arg === "object" &&
|
3
4
|
typeof arg.web_identity_token_file === "string" &&
|
@@ -10,4 +11,4 @@ export const resolveWebIdentityCredentials = async (profile, options) => import(
|
|
10
11
|
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
11
12
|
logger: options.logger,
|
12
13
|
parentClientConfig: options.parentClientConfig,
|
13
|
-
})());
|
14
|
+
})().then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")));
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Logger, ParsedIniData } from "@smithy/types";
|
2
2
|
import { FromIniInit } from "./fromIni";
|
3
3
|
/**
|
4
4
|
* @internal
|
@@ -44,4 +44,4 @@ export declare const isAssumeRoleProfile: (arg: any, { profile, logger }?: {
|
|
44
44
|
/**
|
45
45
|
* @internal
|
46
46
|
*/
|
47
|
-
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles?: Record<string, true>) => Promise<
|
47
|
+
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles?: Record<string, true>) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
2
2
|
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
3
|
-
import type { Profile } from "@smithy/types";
|
3
|
+
import type { IniSection, Profile } from "@smithy/types";
|
4
4
|
/**
|
5
5
|
* @internal
|
6
6
|
*/
|
7
|
-
export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").
|
7
|
+
export declare const resolveSsoCredentials: (profile: string, profileData: IniSection, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
8
8
|
/**
|
9
9
|
* @internal
|
10
10
|
* duplicated from \@aws-sdk/credential-provider-sso to defer import.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Logger, ParsedIniData } from "@smithy/types";
|
2
2
|
import { FromIniInit } from "./fromIni";
|
3
3
|
export interface AssumeRoleParams {
|
4
4
|
RoleArn: string;
|
@@ -23,4 +23,4 @@ export declare const resolveAssumeRoleCredentials: (
|
|
23
23
|
profiles: ParsedIniData,
|
24
24
|
options: FromIniInit,
|
25
25
|
visitedProfiles?: Record<string, true>
|
26
|
-
) => Promise<
|
26
|
+
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
2
2
|
import { CredentialProviderOptions } from "@aws-sdk/types";
|
3
|
-
import { Profile } from "@smithy/types";
|
3
|
+
import { IniSection, Profile } from "@smithy/types";
|
4
4
|
export declare const resolveSsoCredentials: (
|
5
5
|
profile: string,
|
6
|
+
profileData: IniSection,
|
6
7
|
options?: CredentialProviderOptions
|
7
|
-
) => Promise<import("@aws-sdk/types").
|
8
|
+
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
8
9
|
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.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,12 +24,13 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@aws-sdk/
|
28
|
-
"@aws-sdk/credential-provider-
|
29
|
-
"@aws-sdk/credential-provider-
|
30
|
-
"@aws-sdk/credential-provider-
|
31
|
-
"@aws-sdk/credential-provider-
|
32
|
-
"@aws-sdk/
|
27
|
+
"@aws-sdk/core": "3.667.0",
|
28
|
+
"@aws-sdk/credential-provider-env": "3.667.0",
|
29
|
+
"@aws-sdk/credential-provider-http": "3.667.0",
|
30
|
+
"@aws-sdk/credential-provider-process": "3.667.0",
|
31
|
+
"@aws-sdk/credential-provider-sso": "3.667.0",
|
32
|
+
"@aws-sdk/credential-provider-web-identity": "3.667.0",
|
33
|
+
"@aws-sdk/types": "3.667.0",
|
33
34
|
"@smithy/credential-provider-imds": "^3.2.4",
|
34
35
|
"@smithy/property-provider": "^3.1.7",
|
35
36
|
"@smithy/shared-ini-file-loader": "^3.1.8",
|
@@ -45,7 +46,7 @@
|
|
45
46
|
"typescript": "~4.9.5"
|
46
47
|
},
|
47
48
|
"peerDependencies": {
|
48
|
-
"@aws-sdk/client-sts": "^3.
|
49
|
+
"@aws-sdk/client-sts": "^3.667.0"
|
49
50
|
},
|
50
51
|
"types": "./dist-types/index.d.ts",
|
51
52
|
"engines": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.0",
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
5
5
|
"engines": {
|
6
6
|
"node": ">=16.0.0"
|
@@ -28,13 +28,13 @@
|
|
28
28
|
},
|
29
29
|
"license": "Apache-2.0",
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-sdk/credential-provider-env": "3.
|
32
|
-
"@aws-sdk/credential-provider-http": "3.
|
33
|
-
"@aws-sdk/credential-provider-ini": "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/types": "3.
|
31
|
+
"@aws-sdk/credential-provider-env": "3.667.0",
|
32
|
+
"@aws-sdk/credential-provider-http": "3.667.0",
|
33
|
+
"@aws-sdk/credential-provider-ini": "3.667.0",
|
34
|
+
"@aws-sdk/credential-provider-process": "3.667.0",
|
35
|
+
"@aws-sdk/credential-provider-sso": "3.667.0",
|
36
|
+
"@aws-sdk/credential-provider-web-identity": "3.667.0",
|
37
|
+
"@aws-sdk/types": "3.667.0",
|
38
38
|
"@smithy/credential-provider-imds": "^3.2.4",
|
39
39
|
"@smithy/property-provider": "^3.1.7",
|
40
40
|
"@smithy/shared-ini-file-loader": "^3.1.8",
|
@@ -34,6 +34,7 @@ var import_child_process = require("child_process");
|
|
34
34
|
var import_util = require("util");
|
35
35
|
|
36
36
|
// src/getValidatedProcessCredentials.ts
|
37
|
+
var import_client = require("@aws-sdk/core/client");
|
37
38
|
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {
|
38
39
|
var _a;
|
39
40
|
if (data.Version !== 1) {
|
@@ -53,7 +54,7 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data,
|
|
53
54
|
if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) {
|
54
55
|
accountId = profiles[profileName].aws_account_id;
|
55
56
|
}
|
56
|
-
|
57
|
+
const credentials = {
|
57
58
|
accessKeyId: data.AccessKeyId,
|
58
59
|
secretAccessKey: data.SecretAccessKey,
|
59
60
|
...data.SessionToken && { sessionToken: data.SessionToken },
|
@@ -61,6 +62,8 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data,
|
|
61
62
|
...data.CredentialScope && { credentialScope: data.CredentialScope },
|
62
63
|
...accountId && { accountId }
|
63
64
|
};
|
65
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w");
|
66
|
+
return credentials;
|
64
67
|
}, "getValidatedProcessCredentials");
|
65
68
|
|
66
69
|
// src/resolveProcessCredentials.ts
|
package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
export const getValidatedProcessCredentials = (profileName, data, profiles) => {
|
2
3
|
if (data.Version !== 1) {
|
3
4
|
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
@@ -16,7 +17,7 @@ export const getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
16
17
|
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
17
18
|
accountId = profiles[profileName].aws_account_id;
|
18
19
|
}
|
19
|
-
|
20
|
+
const credentials = {
|
20
21
|
accessKeyId: data.AccessKeyId,
|
21
22
|
secretAccessKey: data.SecretAccessKey,
|
22
23
|
...(data.SessionToken && { sessionToken: data.SessionToken }),
|
@@ -24,4 +25,6 @@ export const getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
24
25
|
...(data.CredentialScope && { credentialScope: data.CredentialScope }),
|
25
26
|
...(accountId && { accountId }),
|
26
27
|
};
|
28
|
+
setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
|
29
|
+
return credentials;
|
27
30
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.0",
|
4
4
|
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -24,7 +24,8 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@aws-sdk/
|
27
|
+
"@aws-sdk/core": "3.667.0",
|
28
|
+
"@aws-sdk/types": "3.667.0",
|
28
29
|
"@smithy/property-provider": "^3.1.7",
|
29
30
|
"@smithy/shared-ini-file-loader": "^3.1.8",
|
30
31
|
"@smithy/types": "^3.5.0",
|
@@ -52,6 +52,7 @@ module.exports = __toCommonJS(src_exports);
|
|
52
52
|
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");
|
53
53
|
|
54
54
|
// src/resolveSSOCredentials.ts
|
55
|
+
var import_client = require("@aws-sdk/core/client");
|
55
56
|
var import_token_providers = require("@aws-sdk/token-providers");
|
56
57
|
var import_property_provider = require("@smithy/property-provider");
|
57
58
|
var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader");
|
@@ -129,7 +130,7 @@ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
|
|
129
130
|
logger
|
130
131
|
});
|
131
132
|
}
|
132
|
-
|
133
|
+
const credentials = {
|
133
134
|
accessKeyId,
|
134
135
|
secretAccessKey,
|
135
136
|
sessionToken,
|
@@ -137,6 +138,12 @@ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
|
|
137
138
|
...credentialScope && { credentialScope },
|
138
139
|
...accountId && { accountId }
|
139
140
|
};
|
141
|
+
if (ssoSession) {
|
142
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s");
|
143
|
+
} else {
|
144
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u");
|
145
|
+
}
|
146
|
+
return credentials;
|
140
147
|
}, "resolveSSOCredentials");
|
141
148
|
|
142
149
|
// src/validateSsoProfile.ts
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
import { fromSso as getSsoTokenProvider } from "@aws-sdk/token-providers";
|
2
3
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
3
4
|
import { getSSOTokenFromFile } from "@smithy/shared-ini-file-loader";
|
@@ -64,7 +65,7 @@ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccoun
|
|
64
65
|
logger,
|
65
66
|
});
|
66
67
|
}
|
67
|
-
|
68
|
+
const credentials = {
|
68
69
|
accessKeyId,
|
69
70
|
secretAccessKey,
|
70
71
|
sessionToken,
|
@@ -72,4 +73,11 @@ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccoun
|
|
72
73
|
...(credentialScope && { credentialScope }),
|
73
74
|
...(accountId && { accountId }),
|
74
75
|
};
|
76
|
+
if (ssoSession) {
|
77
|
+
setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
|
81
|
+
}
|
82
|
+
return credentials;
|
75
83
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.0",
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -24,9 +24,10 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@aws-sdk/client-sso": "3.
|
28
|
-
"@aws-sdk/
|
29
|
-
"@aws-sdk/
|
27
|
+
"@aws-sdk/client-sso": "3.667.0",
|
28
|
+
"@aws-sdk/core": "3.667.0",
|
29
|
+
"@aws-sdk/token-providers": "3.667.0",
|
30
|
+
"@aws-sdk/types": "3.667.0",
|
30
31
|
"@smithy/property-provider": "^3.1.7",
|
31
32
|
"@smithy/shared-ini-file-loader": "^3.1.8",
|
32
33
|
"@smithy/types": "^3.5.0",
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.fromTokenFile = void 0;
|
4
|
+
const client_1 = require("@aws-sdk/core/client");
|
4
5
|
const property_provider_1 = require("@smithy/property-provider");
|
5
6
|
const fs_1 = require("fs");
|
6
7
|
const fromWebToken_1 = require("./fromWebToken");
|
@@ -17,11 +18,15 @@ const fromTokenFile = (init = {}) => async () => {
|
|
17
18
|
logger: init.logger,
|
18
19
|
});
|
19
20
|
}
|
20
|
-
|
21
|
+
const credentials = await (0, fromWebToken_1.fromWebToken)({
|
21
22
|
...init,
|
22
23
|
webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
|
23
24
|
roleArn,
|
24
25
|
roleSessionName,
|
25
26
|
})();
|
27
|
+
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
28
|
+
(0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
29
|
+
}
|
30
|
+
return credentials;
|
26
31
|
};
|
27
32
|
exports.fromTokenFile = fromTokenFile;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
1
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
2
3
|
import { readFileSync } from "fs";
|
3
4
|
import { fromWebToken } from "./fromWebToken";
|
@@ -14,10 +15,14 @@ export const fromTokenFile = (init = {}) => async () => {
|
|
14
15
|
logger: init.logger,
|
15
16
|
});
|
16
17
|
}
|
17
|
-
|
18
|
+
const credentials = await fromWebToken({
|
18
19
|
...init,
|
19
20
|
webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
|
20
21
|
roleArn,
|
21
22
|
roleSessionName,
|
22
23
|
})();
|
24
|
+
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
25
|
+
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
26
|
+
}
|
27
|
+
return credentials;
|
23
28
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.0",
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -32,7 +32,8 @@
|
|
32
32
|
},
|
33
33
|
"license": "Apache-2.0",
|
34
34
|
"dependencies": {
|
35
|
-
"@aws-sdk/
|
35
|
+
"@aws-sdk/core": "3.667.0",
|
36
|
+
"@aws-sdk/types": "3.667.0",
|
36
37
|
"@smithy/property-provider": "^3.1.7",
|
37
38
|
"@smithy/types": "^3.5.0",
|
38
39
|
"tslib": "^2.6.2"
|
@@ -46,7 +47,7 @@
|
|
46
47
|
"typescript": "~4.9.5"
|
47
48
|
},
|
48
49
|
"peerDependencies": {
|
49
|
-
"@aws-sdk/client-sts": "^3.
|
50
|
+
"@aws-sdk/client-sts": "^3.667.0"
|
50
51
|
},
|
51
52
|
"types": "./dist-types/index.d.ts",
|
52
53
|
"engines": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/middleware-host-header",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.667.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-host-header",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
},
|
22
22
|
"license": "Apache-2.0",
|
23
23
|
"dependencies": {
|
24
|
-
"@aws-sdk/types": "3.
|
24
|
+
"@aws-sdk/types": "3.667.0",
|
25
25
|
"@smithy/protocol-http": "^4.1.4",
|
26
26
|
"@smithy/types": "^3.5.0",
|
27
27
|
"tslib": "^2.6.2"
|