Skip to content

SSL Error After Upgrading Application To Node 18 #239

@tcs-cclaflin

Description

@tcs-cclaflin

We have an application that connects to vault that we are trying to upgrade from Node 14 to Node 18. Node 18 introduced a change in the ssl library that is causes SSL issues with our instance of vault. The error we are seeing is:

Error: write EPROTO 389B736FE57F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:921:

Recommended solutions when searching that error is to change the SSL configuration at the endpoint (which we can't do easily at this time) or implement SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION or SSL_OP_LEGACY_SERVER_CONNECT as described here: nodejs/node#45378

I found an example of adding securityOptions in pass_request_options.js and tried adding multiple variations (secureOptions, securityOptions, agentOptions, etc.) of that to the options section in the application:

    const options = {
      apiVersion: "v1",
      endpoint: "<SANITIZED>",
      token: process.env.VAULT_TOKEN,
      secureOptions: 'SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION',
      agentOptions: {
        secureOptions: 'SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION',
      },
    };

Can someone confirm what the correct option should be for this package and if this is the correct location to try and implement it?

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