You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("should resolve credentials from STS assumeRoleWithWebIdentity if the ini profile is configured for web identity and the client region is not the default AWS partition",async()=>{
478
-
sts=newSTS({
479
-
region: "us-gov-sts-1",
480
-
requestHandler: mockRequestHandler,
481
-
});
482
-
Object.assign(iniProfileData.default,{
483
-
region: "us-gov-sts-1",
484
-
web_identity_token_file: "token-filepath",
485
-
role_arn: "ROLE_ARN",
486
-
});
487
-
awaitsts.getCallerIdentity({});
488
-
constcredentials=awaitsts.config.credentials();
489
-
expect(credentials).toEqual({
490
-
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
491
-
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
492
-
sessionToken: "STS_ARWI_SESSION_TOKEN",
493
-
expiration: newDate("3000-01-01T00:00:00.000Z"),
494
-
credentialScope: "us-stsarwi-1__us-gov-sts-1",
495
-
});
496
-
});
509
+
it(
510
+
"should resolve credentials from STS assumeRoleWithWebIdentity if the ini profile is"+
511
+
" configured for web identity and the client region is not the default AWS partition",
512
+
async()=>{
513
+
sts=newSTS({
514
+
region: "us-gov-sts-1",
515
+
requestHandler: mockRequestHandler,
516
+
});
517
+
Object.assign(iniProfileData.default,{
518
+
region: "us-gov-sts-1",
519
+
web_identity_token_file: "token-filepath",
520
+
role_arn: "ROLE_ARN",
521
+
});
522
+
awaitsts.getCallerIdentity({});
523
+
constcredentials=awaitsts.config.credentials();
524
+
expect(credentials).toEqual({
525
+
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
526
+
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
527
+
sessionToken: "STS_ARWI_SESSION_TOKEN",
528
+
expiration: newDate("3000-01-01T00:00:00.000Z"),
529
+
credentialScope: "us-stsarwi-1__us-gov-sts-1",
530
+
$source: {
531
+
CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN: "q",
532
+
CREDENTIALS_STS_ASSUME_ROLE_WEB_ID: "k",
533
+
},
534
+
});
535
+
}
536
+
);
497
537
498
538
it("should resolve process credentials if the profile is a process profile",async()=>{
0 commit comments