Skip to content

Commit

Permalink
Add authMechanism option where needed, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
katcharov committed Jun 7, 2024
1 parent 57cdf9b commit b0e4afb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions source/connection-string/connection-string-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ The values in connection options MUST be URL decoded by the parser. The values c
?readPreferenceTags=dc:ny,rack:1
```

Drivers MUST handle unencoded colon signs (":") within the value. For example, given the connection string:
Drivers MUST handle unencoded colon signs (":") within the value. For example, given the connection string option:

```
?authMechanismProperties=TOKEN_RESOURCE:mongodb://foo
authMechanismProperties=TOKEN_RESOURCE:mongodb://foo
```

the driver MUST interpret the key as `TOKEN_RESOURCE` and the value as `mongodb://foo`.
Expand Down
2 changes: 1 addition & 1 deletion source/connection-string/tests/valid-options.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions source/connection-string/tests/valid-options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tests:
tls: true
-
description: Colon in a key value pair
uri: mongodb://example.com?authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster
uri: mongodb://example.com/?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster
valid: true
warning: false
hosts:
Expand All @@ -40,5 +40,5 @@ tests:
port: ~
auth: ~
options:
authmechanismProperties:
TOKEN_RESOURCE: 'mongodb://test-cluster'
authmechanismProperties:
TOKEN_RESOURCE: 'mongodb://test-cluster'
4 changes: 2 additions & 2 deletions source/connection-string/tests/valid-warnings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/connection-string/tests/valid-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tests:
options: ~
-
description: Comma in a key value pair causes a warning
uri: mongodb://example.com?authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2
uri: mongodb://example.com?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2
valid: true
warning: true
hosts:
Expand Down

0 comments on commit b0e4afb

Please sign in to comment.