Skip to content

User defined SSL CA environment variable should always be honored #14705

@matthewwiesen

Description

@matthewwiesen

Per @silverwind's request, I'm creating a separate issue that I had brought up over here:

Node.js implements the following environment variables for the user to augment Nodes default certificates list:

https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file
https://nodejs.org/api/cli.html#cli_ssl_cert_dir_dir
https://nodejs.org/api/cli.html#cli_ssl_cert_file_file

It it explicitly states that if a ca option is directly utilized with the TLS or HTTPSClient module it is overridden. I've run across instances where as an end user, attempting to configure node with my private / internal CA cert, some node module author is somehow overriding this through their own usage of request and thus I have no way to get this to work correctly.

It would seem that if the end user has specified these environment variables that they should not be allowed to be overridden through direct utilization / configuration within code as this allows for a use case where an imported node module can override the user's intention of utilizing specific CA certificates, which is undesirable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions