Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-5812

Return default $external auth source for MONGODB-AWS

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.0.0
    • Affects Version/s: None
    • Component/s: None
    • Needed
    • None
    • Major Change
    • C Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      Change the return of mongoc_uri_get_auth_source to return "$external" for MONGODB-AWS to agree with the applied auth source.

      Background & Motivation

      Tests for the MONGODB-AWS auth mechanism were added in SPEC-1515 but missed when implementing MONGODB-AWS.

      Many MONGODB-AWS connection string tests fail. Example:

      {
        "description": "should recognise the mechanism (MONGODB-AWS)",
        "uri": "mongodb://localhost/?authMechanism=MONGODB-AWS",
        "valid": true,
        "credential": {
          "username": null,
          "password": null,
          "source": "$external",
          "mechanism": "MONGODB-AWS",
          "mechanism_properties": null
        }
      }
      

      The expected "source" is "$external" to agree with the specified default:

      source

      MUST be "$external". Defaults to $external.

      However, mongoc_uri_get_auth_source returns "admin". Internally, "$external" is hardcoded for MONGODB-AWS auth. As a workaround, this test is planned to be skipped (search code for this ticket number).

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None