|
480 | 480 | "AWS_SESSION_TOKEN": "token!@#$%^&*()_+" |
481 | 481 | } |
482 | 482 | } |
483 | | - }, |
484 | | - { |
485 | | - "description": "should recognise the mechanism and request callback (MONGODB-OIDC)", |
486 | | - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC", |
487 | | - "callback": ["oidcRequest"], |
488 | | - "valid": true, |
489 | | - "credential": { |
490 | | - "username": null, |
491 | | - "password": null, |
492 | | - "source": "$external", |
493 | | - "mechanism": "MONGODB-OIDC", |
494 | | - "mechanism_properties": { |
495 | | - "OIDC_TOKEN_CALLBACK": true |
496 | | - } |
497 | | - } |
498 | 483 | }, |
499 | 484 | { |
500 | | - "description": "should recognise the mechanism when auth source is explicitly specified and with request callback (MONGODB-OIDC)", |
501 | | - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external", |
502 | | - "callback": ["oidcRequest"], |
503 | | - "valid": true, |
504 | | - "credential": { |
505 | | - "username": null, |
506 | | - "password": null, |
507 | | - "source": "$external", |
508 | | - "mechanism": "MONGODB-OIDC", |
509 | | - "mechanism_properties": { |
510 | | - "OIDC_TOKEN_CALLBACK": true |
511 | | - } |
512 | | - } |
513 | | - }, |
514 | | - { |
515 | | - "description": "should recognise the mechanism and username with request callback (MONGODB-OIDC)", |
516 | | - "uri": "mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC", |
517 | | - "callback": ["oidcRequest"], |
518 | | - "valid": true, |
519 | | - "credential": { |
520 | | - "username": "principalName", |
521 | | - "password": null, |
522 | | - "source": "$external", |
523 | | - "mechanism": "MONGODB-OIDC", |
524 | | - "mechanism_properties": { |
525 | | - "OIDC_TOKEN_CALLBACK": true |
526 | | - } |
527 | | - } |
528 | | - }, |
529 | | - { |
530 | | - "description": "should recognise the mechanism with aws device (MONGODB-OIDC)", |
| 485 | + "description": "should recognise the mechanism with aws provider (MONGODB-OIDC)", |
531 | 486 | "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws", |
532 | 487 | "valid": true, |
533 | 488 | "credential": { |
|
536 | 491 | "source": "$external", |
537 | 492 | "mechanism": "MONGODB-OIDC", |
538 | 493 | "mechanism_properties": { |
539 | | - "PROVIDER_NAME": "aws" |
| 494 | + "PROVIDER_NAME": "aws" |
540 | 495 | } |
541 | 496 | } |
542 | 497 | }, |
543 | 498 | { |
544 | | - "description": "should recognise the mechanism when auth source is explicitly specified and with aws device (MONGODB-OIDC)", |
| 499 | + "description": "should recognise the mechanism when auth source is explicitly specified and with provider (MONGODB-OIDC)", |
545 | 500 | "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=PROVIDER_NAME:aws", |
546 | 501 | "valid": true, |
547 | 502 | "credential": { |
|
550 | 505 | "source": "$external", |
551 | 506 | "mechanism": "MONGODB-OIDC", |
552 | 507 | "mechanism_properties": { |
553 | | - "PROVIDER_NAME": "aws" |
| 508 | + "PROVIDER_NAME": "aws" |
554 | 509 | } |
555 | 510 | } |
556 | 511 | }, |
557 | 512 | { |
558 | | - "description": "should throw an exception if username and password are specified (MONGODB-OIDC)", |
559 | | - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC", |
560 | | - "callback": ["oidcRequest"], |
| 513 | + "description": "should throw an exception if supplied a password (MONGODB-OIDC)", |
| 514 | + "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws", |
561 | 515 | "valid": false, |
562 | 516 | "credential": null |
563 | 517 | }, |
564 | 518 | { |
565 | | - "description": "should throw an exception if username and deviceName are specified (MONGODB-OIDC)", |
566 | | - "uri": "mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&PROVIDER_NAME:gcp", |
| 519 | + "description": "should throw an exception if username is specified for aws (MONGODB-OIDC)", |
| 520 | + "uri": "mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&PROVIDER_NAME:aws", |
567 | 521 | "valid": false, |
568 | 522 | "credential": null |
569 | 523 | }, |
570 | 524 | { |
571 | | - "description": "should throw an exception if specified deviceName is not supported (MONGODB-OIDC)", |
572 | | - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:unexisted", |
573 | | - "valid": false, |
574 | | - "credential": null |
575 | | - }, |
576 | | - { |
577 | | - "description": "should throw an exception if neither deviceName nor callbacks specified (MONGODB-OIDC)", |
578 | | - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC", |
| 525 | + "description": "should throw an exception if specified provider is not supported (MONGODB-OIDC)", |
| 526 | + "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:invalid", |
579 | 527 | "valid": false, |
580 | 528 | "credential": null |
581 | 529 | }, |
582 | 530 | { |
583 | | - "description": "should throw an exception when only refresh callback is specified (MONGODB-OIDC)", |
| 531 | + "description": "should throw an exception if neither provider nor callbacks specified (MONGODB-OIDC)", |
584 | 532 | "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC", |
585 | | - "callback": ["oidcRefresh"], |
586 | 533 | "valid": false, |
587 | 534 | "credential": null |
588 | 535 | }, |
|
0 commit comments