@aws-sdk/client-sts 3.666.0 → 3.667.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 +10 -2
- package/dist-es/defaultStsRoleAssumers.js +10 -2
- package/package.json +13 -13
package/dist-cjs/index.js
CHANGED
|
@@ -1277,6 +1277,7 @@ var STS = _STS;
|
|
|
1277
1277
|
var import_EndpointParameters9 = require("./endpoint/EndpointParameters");
|
|
1278
1278
|
|
|
1279
1279
|
// src/defaultStsRoleAssumers.ts
|
|
1280
|
+
var import_client = require("@aws-sdk/core/client");
|
|
1280
1281
|
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
|
1281
1282
|
var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {
|
|
1282
1283
|
if (typeof (assumedRoleUser == null ? void 0 : assumedRoleUser.Arn) === "string") {
|
|
@@ -1333,7 +1334,7 @@ var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) =
|
|
|
1333
1334
|
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
1334
1335
|
}
|
|
1335
1336
|
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
|
1336
|
-
|
|
1337
|
+
const credentials = {
|
|
1337
1338
|
accessKeyId: Credentials2.AccessKeyId,
|
|
1338
1339
|
secretAccessKey: Credentials2.SecretAccessKey,
|
|
1339
1340
|
sessionToken: Credentials2.SessionToken,
|
|
@@ -1342,6 +1343,8 @@ var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) =
|
|
|
1342
1343
|
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
|
1343
1344
|
...accountId && { accountId }
|
|
1344
1345
|
};
|
|
1346
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
1347
|
+
return credentials;
|
|
1345
1348
|
};
|
|
1346
1349
|
}, "getDefaultRoleAssumer");
|
|
1347
1350
|
var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {
|
|
@@ -1372,7 +1375,7 @@ var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, s
|
|
|
1372
1375
|
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
1373
1376
|
}
|
|
1374
1377
|
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
|
1375
|
-
|
|
1378
|
+
const credentials = {
|
|
1376
1379
|
accessKeyId: Credentials2.AccessKeyId,
|
|
1377
1380
|
secretAccessKey: Credentials2.SecretAccessKey,
|
|
1378
1381
|
sessionToken: Credentials2.SessionToken,
|
|
@@ -1381,6 +1384,11 @@ var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, s
|
|
|
1381
1384
|
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
|
1382
1385
|
...accountId && { accountId }
|
|
1383
1386
|
};
|
|
1387
|
+
if (accountId) {
|
|
1388
|
+
(0, import_client.setCredentialFeature)(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
1389
|
+
}
|
|
1390
|
+
(0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
1391
|
+
return credentials;
|
|
1384
1392
|
};
|
|
1385
1393
|
}, "getDefaultRoleAssumerWithWebIdentity");
|
|
1386
1394
|
var isH2 = /* @__PURE__ */ __name((requestHandler) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
1
2
|
import { AssumeRoleCommand } from "./commands/AssumeRoleCommand";
|
|
2
3
|
import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
3
4
|
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
|
@@ -37,7 +38,7 @@ export const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
|
37
38
|
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
38
39
|
}
|
|
39
40
|
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
40
|
-
|
|
41
|
+
const credentials = {
|
|
41
42
|
accessKeyId: Credentials.AccessKeyId,
|
|
42
43
|
secretAccessKey: Credentials.SecretAccessKey,
|
|
43
44
|
sessionToken: Credentials.SessionToken,
|
|
@@ -45,6 +46,8 @@ export const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
|
|
|
45
46
|
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
46
47
|
...(accountId && { accountId }),
|
|
47
48
|
};
|
|
49
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
50
|
+
return credentials;
|
|
48
51
|
};
|
|
49
52
|
};
|
|
50
53
|
export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
|
|
@@ -65,7 +68,7 @@ export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor)
|
|
|
65
68
|
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
66
69
|
}
|
|
67
70
|
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
68
|
-
|
|
71
|
+
const credentials = {
|
|
69
72
|
accessKeyId: Credentials.AccessKeyId,
|
|
70
73
|
secretAccessKey: Credentials.SecretAccessKey,
|
|
71
74
|
sessionToken: Credentials.SessionToken,
|
|
@@ -73,6 +76,11 @@ export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor)
|
|
|
73
76
|
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
74
77
|
...(accountId && { accountId }),
|
|
75
78
|
};
|
|
79
|
+
if (accountId) {
|
|
80
|
+
setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
81
|
+
}
|
|
82
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
83
|
+
return credentials;
|
|
76
84
|
};
|
|
77
85
|
};
|
|
78
86
|
export const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.667.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sts",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
25
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
26
|
-
"@aws-sdk/core": "3.
|
|
27
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
29
|
-
"@aws-sdk/middleware-logger": "3.
|
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
31
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
32
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
33
|
-
"@aws-sdk/types": "3.
|
|
34
|
-
"@aws-sdk/util-endpoints": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
36
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
25
|
+
"@aws-sdk/client-sso-oidc": "3.667.0",
|
|
26
|
+
"@aws-sdk/core": "3.667.0",
|
|
27
|
+
"@aws-sdk/credential-provider-node": "3.667.0",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "3.667.0",
|
|
29
|
+
"@aws-sdk/middleware-logger": "3.667.0",
|
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "3.667.0",
|
|
31
|
+
"@aws-sdk/middleware-user-agent": "3.667.0",
|
|
32
|
+
"@aws-sdk/region-config-resolver": "3.667.0",
|
|
33
|
+
"@aws-sdk/types": "3.667.0",
|
|
34
|
+
"@aws-sdk/util-endpoints": "3.667.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-browser": "3.667.0",
|
|
36
|
+
"@aws-sdk/util-user-agent-node": "3.667.0",
|
|
37
37
|
"@smithy/config-resolver": "^3.0.9",
|
|
38
38
|
"@smithy/core": "^2.4.8",
|
|
39
39
|
"@smithy/fetch-http-handler": "^3.2.9",
|