[DRIVERS-2381] Connection String spec requires equals sign after keys to permit empty input values Created: 06/Jul/22  Updated: 06/Jan/23

Status: Scheduled
Project: Drivers
Component/s: Connection String
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Neal Beeken Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by NODE-4354 Unable to specify empty readPreferenc... Blocked
Issue split
split to CDRIVER-4424 Connection String spec requires equal... Blocked
split to CSHARP-4249 Connection String spec requires equal... Blocked
split to CXX-2542 Connection String spec requires equal... Blocked
split to GODRIVER-2486 Connection String spec requires equal... Blocked
split to JAVA-4675 Connection String spec requires equal... Blocked
split to NODE-4403 Connection String spec requires equal... Blocked
split to PHPLIB-908 Connection String spec requires equal... Blocked
split to PYTHON-3350 Connection String spec requires equal... Blocked
split to RUBY-3048 Connection String spec requires equal... Blocked
split to RUST-1404 Connection String spec requires equal... Blocked
split to MOTOR-991 Connection String spec requires equal... Closed
Driver Changes: Needed
Case:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4424 Blocked
CXX-2542 Blocked
CSHARP-4249 Blocked
GODRIVER-2486 Blocked
JAVA-4675 Blocked
NODE-4403 Blocked
MOTOR-991 Duplicate
PYTHON-3350 Blocked
PHPLIB-908 Blocked
RUBY-3048 Blocked
RUST-1404 Blocked
SWIFT-1598 Won't Do

 Description   

Summary

The Connection String spec states here that: The key is everything up to the first equals sign ("=") and the value is everything afterwards. However, there is no test to verify that equal sign terminated keys with no value are successfully parsed. There is a test here that confirms non-equals terminated strings are errored on.

The ask
  • Implement a test to confirm that equals terminated keys with no value are parsed without error.
  • Consider permitting drivers to disallow empty values in a major version
    • Permitting empty values have risk of being silently accepted when the intention was to pass something (ex. environment variables left undefined are empty strings).
    • If there is a desire for a way to configure "nothing" as a value an indicator of some kind should be considered as it is a clear choice of omission.

Motivation

Who is the affected end user?

  • At least C# and the Node.js driver have confirmed divergence where they do not accept empty values for keys.
  • Users wanting to specify an empty value for a readPreferenceTags: NODE-4354

How does this affect the end user?

How likely is it that this problem or use case will occur?

  • Could be frequent depending on the usage of connection string. Node.js has maintained this behavior since at least July of 2021.

If the problem does occur, what are the consequences and how severe are they?

  • On drivers that don't permit empty values you get an error at start up so an early warning that would prevent you from proceeding.

Is this issue urgent?

No.

Is this ticket required by a downstream team?

n/a

Is this ticket only for tests?

  • No.

Generated at Thu Feb 08 08:25:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.