-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: include username in server metadata key (#194)
This is something we should have ideally always been doing (as hinted at by the doc comment for `getAuthState()`), but which the driver only added back support for in 6.7.0. This shouldn't have an immediate impact on our products, because we already have some mitigations in place for the fact that usernames were previously not being taken into account (e.g. here: https://github.com/mongodb-js/mongosh/blob/adc530e7ffcf092677d944fd69670c5cbd8e103d/packages/service-provider-server/src/cli-service-provider.ts#L172 ), but is semantically the right thing to do and should give us a bit more flexibility in the future. Also, add a test that confirms that changes to server metadata/username actually have the expected effect, and emit a message bus event that shares information about the server metadata, as that may be helpful debugging information.
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters