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 prefer static credentials over role assumption metadata only if the profile is not the first one visited",async()=>{
299
+
xit("should prefer static credentials over role assumption metadata only if the profile is not the first one visited",async()=>{
134
300
// TODO
135
301
});
136
302
137
303
it("should resolve credentials from STS assumeRoleWithWebIdentity if the ini profile is configured for web identity",async()=>{
138
-
// TODO
304
+
Object.assign(iniProfileData.default,{
305
+
web_identity_token_file: "token-filepath",
306
+
role_arn: "ROLE_ARN",
307
+
});
308
+
awaitsts.getCallerIdentity({});
309
+
constcredentials=awaitsts.config.credentials();
310
+
expect(credentials).toEqual({
311
+
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
312
+
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
313
+
sessionToken: "STS_ARWI_SESSION_TOKEN",
314
+
expiration: newDate("3000/1/1"),
315
+
credentialScope: "us-stsarwi-1",
316
+
});
139
317
});
140
318
141
-
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()=>{
319
+
xit("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()=>{
142
320
// TODO
321
+
// this is difficult to do when getDefaultRoleAssumerWithWebIdentity is mocked.
143
322
});
144
323
145
-
it("should resolve process credentials if the profile is a process profile",async()=>{
324
+
xit("should resolve process credentials if the profile is a process profile",async()=>{
146
325
// TODO
147
326
});
148
327
149
328
it("should resolve SSO credentials if the profile is an SSO profile",async()=>{
150
-
// TODO
329
+
iniProfileData["sso-session.ssoNew"]={
330
+
sso_region: "us-sso-1",
331
+
sso_start_url: "SSO_START_URL",
332
+
sso_registration_scopes: "sso:account:access",
333
+
};
334
+
Object.assign(iniProfileData.default,{
335
+
sso_region: "us-sso-1",
336
+
sso_session: "ssoNew",
337
+
sso_account_id: "1234",
338
+
sso_role_name: "integration-test",
339
+
});
340
+
awaitsts.getCallerIdentity({});
341
+
constcredentials=awaitsts.config.credentials();
342
+
expect(credentials).toEqual({
343
+
accessKeyId: "SSO_ACCESS_KEY_ID",
344
+
secretAccessKey: "SSO_SECRET_ACCESS_KEY",
345
+
sessionToken: "SSO_SESSION_TOKEN",
346
+
expiration: newDate("3000/1/1"),
347
+
credentialScope: "us-sso-1",
348
+
});
151
349
});
152
350
});
153
351
154
352
describe("fromProcess",()=>{
155
-
it("should resolve process credentials if the profile is a process profile",async()=>{
353
+
xit("should resolve process credentials if the profile is a process profile",async()=>{
156
354
// TODO
157
355
});
158
356
});
159
357
160
358
describe("fromTokenFile",()=>{
161
-
it("should resolve credentials with STS assumeRoleWithWebIdentity using a token",async()=>{
359
+
xit("should resolve credentials with STS assumeRoleWithWebIdentity using a token",async()=>{
162
360
// TODO
163
361
});
164
362
});
165
363
166
364
describe("remoteProvider",()=>{
167
-
it("should use container metadata if AWS_CONTAINER_CREDENTIALS_FULL_URI is set",async()=>{
365
+
xit("should use container metadata if AWS_CONTAINER_CREDENTIALS_FULL_URI is set",async()=>{
168
366
// TODO
169
367
});
170
368
171
-
it("should use instance metadata unless IMDS is disabled",async()=>{
369
+
xit("should use instance metadata unless IMDS is disabled",async()=>{
0 commit comments