Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-949

Add tests for allowed cases when authSource is given but username is not

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-3618 Backlog
      CXX-1992 Backlog
      CSHARP-3060 Done
      GODRIVER-1577 Fixed 1.5.0
      JAVA-3698 Fixed 4.1.0
      NODE-2563 Done 4.4.0
      MOTOR-534 Duplicate
      PYTHON-2203 Fixed 4.1
      PHPC-1591 Fixed 1.8.0-beta2, 1.8.0
      RUBY-2217 Fixed 2.13.0.beta1
      RUST-357 Fixed 1.1.0
      SWIFT-781 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-3618 Backlog CXX-1992 Backlog CSHARP-3060 Done GODRIVER-1577 Fixed 1.5.0 JAVA-3698 Fixed 4.1.0 NODE-2563 Done 4.4.0 MOTOR-534 Duplicate PYTHON-2203 Fixed 4.1 PHPC-1591 Fixed 1.8.0-beta2, 1.8.0 RUBY-2217 Fixed 2.13.0.beta1 RUST-357 Fixed 1.1.0 SWIFT-781 Won't Do

    Description

      https://jira.mongodb.org/browse/SPEC-1270 added an auth spec test which specified auth source and no username, requiring this to be an error:

          -
              description: "authSource without username is invalid (default mechanism)"
              uri: "mongodb://localhost/?authSource=foo"
              valid: false
      

      I think it will be helpful to also include tests that specify auth source and no username for other mechanisms, since the auth spec allows username to be omitted for some mechanisms:

      username (string)
       
              Applies to all mechanisms.
              Optional for MONGODB-X509 and MONGODB-IAM.
      
      

      For example, I propose adding the following test:

          -
              description: "authSource without username is valid for $external"
              uri: "mongodb://localhost/?authSource=$external"
              valid: true
              credential:
                  source: "$external"
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: