-
Notifications
You must be signed in to change notification settings - Fork 185
RUST-1954 Disallow commas in authMechanismProperties
values
#1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Auth Tests | ||
|
||
## Introduction | ||
|
||
This document describes the format of the driver spec tests included in the JSON and YAML files included in the `legacy` | ||
sub-directory. Tests in the `unified` directory are written using the | ||
[Unified Test Format](../../unified-test-format/unified-test-format.md). | ||
|
||
The YAML and JSON files in the `legacy` directory tree are platform-independent tests that drivers can use to prove | ||
their conformance to the Auth Spec at least with respect to connection string URI input. | ||
|
||
Drivers should do additional unit testing if there are alternate ways of configuring credentials on a client. | ||
|
||
Driver must also conduct the prose tests in the Auth Spec test plan section. | ||
|
||
## Format | ||
|
||
Each YAML file contains an object with a single `tests` key. This key is an array of test case objects, each of which | ||
have the following keys: | ||
|
||
- `description`: A string describing the test. | ||
- `uri`: A string containing the URI to be parsed. | ||
- `valid:` A boolean indicating if the URI should be considered valid. | ||
- `credential`: If null, the credential must not be considered configured for the the purpose of deciding if the driver | ||
should authenticate to the topology. If non-null, it is an object containing one or more of the following properties | ||
of a credential: | ||
- `username`: A string containing the username. For auth mechanisms that do not utilize a password, this may be the | ||
entire `userinfo` token from the connection string. | ||
- `password`: A string containing the password. | ||
- `source`: A string containing the authentication database. | ||
- `mechanism`: A string containing the authentication mechanism. A null value for this key is used to indicate that a | ||
mechanism wasn't specified and that mechanism negotiation is required. Test harnesses should modify the mechanism | ||
test as needed to assert this condition. | ||
- `mechanism_properties`: A document containing mechanism-specific properties. It specifies a subset of properties | ||
that must match. If a key exists in the test data, it must exist with the corresponding value in the credential. | ||
Other values may exist in the credential without failing the test. | ||
|
||
If any key is missing, no assertion about that key is necessary. Except as specified explicitly above, if a key is | ||
present, but the test value is null, the observed value for that key must be uninitialized (whatever that means for a | ||
given driver and data type). | ||
|
||
## Implementation notes | ||
|
||
Testing whether a URI is valid or not should simply be a matter of checking whether URI parsing (or MongoClient | ||
construction) raises an error or exception. | ||
|
||
If a credential is configured, its properties must be compared to the `credential` field. |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -648,4 +648,4 @@ | |
"credential": null | ||
} | ||
] | ||
} | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no functional changes were needed here, just did a bit of cleanup to remove the last use of
exclusive_split_at