Skip to content

TLS Node: The tlsConfigDisableLocalFiles option has no effect when enabled #5903

Closed

Description

@CodeforEvolution

Current Behavior

I was hoping to use the tlsConfigDisableLocalFiles option as a way to prevent users from loading some arbitrary key/cert from a device's filesystem. Within Node-RED's settings.js file, I set the option to true, and found that the "Use key and certificates from local files" checkbox did not disappear within the tls-config node's Properties menu. I know the setting was read correctly by Node-RED, because I was able to check the /settings Admin API endpoint, and see that tlsConfigDisableLocalFiles was set to true.

I checked the TLS node's source code files found here:

But I couldn't immediately see anything that looked incorrect.

Expected Behavior

After setting the tlsConfigDisableLocalFiles to true within Node-RED's settings.js file, following a Node-RED restart, I would have expected the tls-config node's "Properties" page to hide the checkbox labeled "Use key and certificates from local files".

Steps To Reproduce

  1. Have an instance of Node-RED ready, and start with it not running.
  2. Access Node-RED's settings.js file and set the tlsConfigDisableLocalFiles option to be true.
  3. Start up Node-RED, and open up the Flow Editor.
  4. Within the Flow Editor, add a "http request" node to the current flow.
  5. Double click on the node you just added, and within the properties pane, check the box with the label "Use custom SSL/TLS configuration".
  6. Within the new "TLS Configuration" row that appears, click the "+" button.
  7. The Properties dialog for a new "tls-config" node should appear, and you will notice that the "Use key and certificates from local files" checkbox is still present, and not hidden.
  8. Repeating the same process expect with tlsConfigDisableLocalFiles set to false leads to the same outcome.

Example flow

[
    {
        "id": "986d9c7022c1e734",
        "type": "tab",
        "label": "Flow",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "31355079794a7440",
        "type": "http request",
        "z": "986d9c7022c1e734",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "520d435f85826019",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 530,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "520d435f85826019",
        "type": "tls-config",
        "name": "",
        "certType": "files",
        "cert": "",
        "key": "",
        "p12": "",
        "p12name": "",
        "ca": "",
        "certname": "",
        "keyname": "",
        "caname": "",
        "servername": "",
        "verifyservercert": true,
        "alpnprotocol": "",
        "certEnv": "",
        "keyEnv": "",
        "caEnv": ""
    }
]

Environment

  • Node-RED version: v5.0.4
  • Node.js version: v25.9.0
  • npm version: 11.18.0
  • Platform/OS: Ubuntu Linux 24.04.4
  • Browser: Tested on Firefox 153.0.4, Edge 151.0.4129.93, and Chrome 151.0.7922.171

Activity

  1. hardillb commented on Aug 24, 2026

    @hardillb
    Member

    This is a race condition in the oneditprepare function.

    The field is hidden then shown again because the change event fires on the type selector.

    I suspect the fix is to add the tlsConfigDisableLocalFiles check in to the change handler as well

  2. self-assigned this
    on Aug 25, 2026
  3. added a commit that references this issue on Sep 2, 2026
    3ba0891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions