446
446
}
447
447
},
448
448
{
449
- "description" : " should recognise the mechanism and request callback (MONGODB-OIDC)" ,
450
- "uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC" ,
451
- "callback" : [" oidcRequest" ],
452
- "valid" : true ,
453
- "credential" : {
454
- "username" : null ,
455
- "password" : null ,
456
- "source" : " $external" ,
457
- "mechanism" : " MONGODB-OIDC" ,
458
- "mechanism_properties" : {
459
- "REQUEST_TOKEN_CALLBACK" : true
460
- }
461
- }
462
- },
463
- {
464
- "description" : " should recognise the mechanism when auth source is explicitly specified and with request callback (MONGODB-OIDC)" ,
465
- "uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external" ,
466
- "callback" : [" oidcRequest" ],
467
- "valid" : true ,
468
- "credential" : {
469
- "username" : null ,
470
- "password" : null ,
471
- "source" : " $external" ,
472
- "mechanism" : " MONGODB-OIDC" ,
473
- "mechanism_properties" : {
474
- "REQUEST_TOKEN_CALLBACK" : true
475
- }
476
- }
477
- },
478
- {
479
- "description" : " should recognise the mechanism and username with request callback (MONGODB-OIDC)" ,
480
- "uri" : " mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC" ,
481
- "callback" : [" oidcRequest" ],
482
- "valid" : true ,
483
- "credential" : {
484
- "username" : " principalName" ,
485
- "password" : null ,
486
- "source" : " $external" ,
487
- "mechanism" : " MONGODB-OIDC" ,
488
- "mechanism_properties" : {
489
- "REQUEST_TOKEN_CALLBACK" : true
490
- }
491
- }
492
- },
493
- {
494
- "description" : " should recognise the mechanism with aws device (MONGODB-OIDC)" ,
449
+ "description" : " should recognise the mechanism with aws provider (MONGODB-OIDC)" ,
495
450
"uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws" ,
496
451
"valid" : true ,
497
452
"credential" : {
505
460
}
506
461
},
507
462
{
508
- "description" : " should recognise the mechanism when auth source is explicitly specified and with aws device (MONGODB-OIDC)" ,
463
+ "description" : " should recognise the mechanism when auth source is explicitly specified and with provider (MONGODB-OIDC)" ,
509
464
"uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=PROVIDER_NAME:aws" ,
510
465
"valid" : true ,
511
466
"credential" : {
519
474
}
520
475
},
521
476
{
522
- "description" : " should throw an exception if username and password are specified (MONGODB-OIDC)" ,
523
- "uri" : " mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC" ,
524
- "callback" : [" oidcRequest" ],
477
+ "description" : " should throw an exception if supplied a password (MONGODB-OIDC)" ,
478
+ "uri" : " mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws" ,
525
479
"valid" : false ,
526
480
"credential" : null
527
481
},
528
482
{
529
- "description" : " should throw an exception if username and deviceName are specified (MONGODB-OIDC)" ,
530
- "uri" : " mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&PROVIDER_NAME:gcp " ,
483
+ "description" : " should throw an exception if username is specified for aws (MONGODB-OIDC)" ,
484
+ "uri" : " mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&PROVIDER_NAME:aws " ,
531
485
"valid" : false ,
532
486
"credential" : null
533
487
},
534
488
{
535
- "description" : " should throw an exception if specified deviceName is not supported (MONGODB-OIDC)" ,
536
- "uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:unexisted " ,
489
+ "description" : " should throw an exception if specified provider is not supported (MONGODB-OIDC)" ,
490
+ "uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:invalid " ,
537
491
"valid" : false ,
538
492
"credential" : null
539
493
},
540
494
{
541
- "description" : " should throw an exception if neither deviceName nor callbacks specified (MONGODB-OIDC)" ,
495
+ "description" : " should throw an exception if neither provider nor callbacks specified (MONGODB-OIDC)" ,
542
496
"uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC" ,
543
497
"valid" : false ,
544
498
"credential" : null
545
499
},
546
- {
547
- "description" : " should throw an exception if provider name and request callback are specified" ,
548
- "uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws" ,
549
- "callback" : [" oidcRequest" ],
550
- "valid" : false ,
551
- "credential" : null
552
- },
553
500
{
554
501
"description" : " should throw an exception when unsupported auth property is specified (MONGODB-OIDC)" ,
555
502
"uri" : " mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=UnsupportedProperty:unexisted" ,
556
503
"valid" : false ,
557
504
"credential" : null
558
505
}
559
506
]
560
- }
507
+ }
0 commit comments