Repository navigation
Description
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:
- https://github.com/node-red/node-red/blob/1f38dc899b1d6d24b05369023ef2d83b808cd55d/packages/node_modules/%40node-red/nodes/core/network/05-tls.html
- https://github.com/node-red/node-red/blob/1f38dc899b1d6d24b05369023ef2d83b808cd55d/packages/node_modules/%40node-red/nodes/core/network/05-tls.js
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
- Have an instance of Node-RED ready, and start with it not running.
- Access Node-RED's settings.js file and set the
tlsConfigDisableLocalFilesoption to betrue. - Start up Node-RED, and open up the Flow Editor.
- Within the Flow Editor, add a "http request" node to the current flow.
- Double click on the node you just added, and within the properties pane, check the box with the label "Use custom SSL/TLS configuration".
- Within the new "TLS Configuration" row that appears, click the "+" button.
- 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.
- Repeating the same process expect with
tlsConfigDisableLocalFilesset tofalseleads 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
hardillb commentedon Aug 24, 2026
This is a race condition in the
oneditpreparefunction.The field is hidden then shown again because the
changeevent fires on the type selector.I suspect the fix is to add the
tlsConfigDisableLocalFilescheck in to thechangehandler as wellFix tlsConfigDisableLocalFiles