Skip to content

TLS ServerName deprecation warning when connecting to IP addresses #1368

@wthrajat

Description

@wthrajat

Description

When connecting to Neo4j/Memgraph using an IP address (e.g., bolt://12.34.56.78:7687), Node.js emits a deprecation warning:

(node:30) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.

Stack Trace

at Object.TRUST_ALL_CERTIFICATES (/node_modules/neo4j-driver-bolt-connection/lib/channel...)
at Object.connect (node:_tls_wrap:1811:15)
at _connect (/node_modules/neo4j-driver-bolt-connection/lib/channel/node/node-channel.js...)

Reproduction Steps

Configure driver with IP address:

const driver = neo4j.driver(
  'bolt://12.34.56.78:7687',
  neo4j.auth.basic('username', 'password')
);

Make any query, the error/warning appears in console in production logs.

Environment

Driver Version: "neo4j-driver": "^5.26.0",
Node version v20.11.1

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