Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5886

Consolidate URI and Client Options

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Connection String
    • Not Needed

      Use Case

      As a Node.js deveoper
      I want proper URI and MongoClient options
      So that I can leverage different driver and Node native options.

      User Impact

      • Customers passing Node native TLS options in the URI via mongosh

      Dependencies

      • None

      Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • Separate the allowlist of URI-supported options from the allowlist of constructor-supported options (via shared, uri-only, and constructor-only options)
      • Use the corresponding allowlist when validating the options during parsing
      • Ensure we continue to prefer the constructor options over the URI options when both are specified
      • Update the the currently misdocumented MongoClientOptions type to draw from the correct allowlist of options and clearly indicate that the options are constructor-only
      • Ensure that w, journal, and wtimeoutMS, along with loadBalancer are on the uri-only list
      • Ensure that writeConcern and serverApi are on the constructor-only list
      • Review the remaining shared options to ensure that they should, in fact, be shared
      • Allow for pass through Node.js TLS options that accept strings, booleans or numbers to be allowed in the URI: ciphers, ecdhCurve, passphrase, rejectUnauthorized, servername
      • Allow for paas through Node.js TLS options to all be accepted as client options.

      Testing Requirements

      • Add connection string unit tests for ciphers, ecdhCurve, passphrase, rejectUnauthorized, servername to ensure they get properly set/converted to options.

      Documentation Requirements

      • Add DOCSP ticket to add the native Node.js TLS options support.

      Follow Up Requirements

      • None

            Assignee:
            Unassigned Unassigned
            Reporter:
            durran.jordan@mongodb.com Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: