Skip to content

Regression: ssl_target_name_override no longer work since 1.13.0 #2955

@mjameswh

Description

@mjameswh

Problem description

Starting with version 1.13.0, setting the grpc.ssl_target_name_override channel argument no longer correctly influences the SNI sent during the TLS handshake, resulting in ECONNRESET. This behavior breaks use cases relying on SNI-based routing, such as AWS PrivateLink setups.

Downgrading to grpc-js@1.12.6 restores the expected behavior, and the correct SNI override is applied.

Discussion

According to our investigation, we believe this line is misplaced, as it undoes the more specific assignments from lines 226 and 239.

I think something similar to this would be more appropriate:

  if (options['grpc.ssl_target_name_override']) {
    // ...
    connectionOptions.servername = sslTargetNameOverride;
  } if ('grpc.http_connect_target' in options) {
    // ...
    connectionOptions.servername = hostPort?.host ?? targetPath;
  } else {
    connectionOptions.servername = remoteHost;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions