Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2543

Investigate changes in CDRIVER-5812: Return default $external auth source for MONGODB-AWS

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 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:
            Unassigned Unassigned
            Reporter:
            esha.bhargava@mongodb.com Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None