Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4090

Speculative auth on a pooled client may reuse a closed stream

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

      Background & Motivation

      The changes of CDRIVER-3934 ensured that a failure to complete speculative authentication due to a network error would not attempt to restart the authentication handshake.

      A pooled client has similar behavior in _mongoc_cluster_add_node:

            bool is_auth = _mongoc_cluster_finish_speculative_auth (
               cluster, stream, sd, &speculative_auth_response, &scram, error);
       
            if (!is_auth && !_mongoc_cluster_auth_node (cluster,
                                                        cluster_node->stream,
                                                        sd,
                                                        &sasl_supported_mechs,
                                                        error)) {
      

      If a network error occurs during _mongoc_cluster_finish_speculative_auth, the newly closed stream is reused for the re-authentication attempt.

      Scope
      TBD. This may be low impact if the only consequence is an immediate network error on the first attempt to reuse the closed stream. Investigate the impact and possible solutions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: