-
Notifications
You must be signed in to change notification settings - Fork 488
Description
Motivation
When debugging encrypted MQTT communications (e.g., with Wireshark), the inability to capture TLS session keys significantly hinders troubleshooting efforts. Many TLS-enabled clients (e.g., browsers, curl) support the SSLKEYLOGFILE environment variable to export session keys, but MQTTX currently lacks this capability. This forces developers to use alternative tools solely for debugging purposes, reducing workflow efficiency.
Detailed design
-
Environment Variable Integration:
Add support for the SSLKEYLOGFILE environment variable. When set, MQTTX should automatically write TLS session keys to the specified file path in NSS Key Log Format. -
Library Compatibility Check:
Ensure the underlying TLS library (e.g., Node.js tls/crypto modules) allows key logging. If not, consider implementing a workaround or documenting limitations. -
Documentation:
Add a note in the documentation explaining how to use this feature for debugging purposes, with security warnings about avoiding production use.
More detail (optional)
Use Case: Debugging TLS handshake failures or analyzing encrypted payloads during development.
Security Note: This feature should explicitly be flagged as a debugging-only tool in documentation.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status