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).
- causes
-
PHPC-2543 Investigate changes in CDRIVER-5812: Return default $external auth source for MONGODB-AWS
-
- Backlog
-
- related to
-
CDRIVER-5811 Error if URI has username and no password for MONGODB-AWS
-
- Closed
-