Add SSL Certificate Verification Control#254
Open
busche wants to merge 2 commits into
Open
Conversation
added 2 commits
May 23, 2026 08:08
Allow users to disable SSL certificate verification for Home Assistant and OpenHAB connections with self-signed or private CA certificates. Adds config field, passes verify parameter to all HTTP requests, and logs security warnings. - New `data_source.ssl_ignore` config field (expert level) - LoadInterface respects setting in __request_with_retries() - Added tests for SSL verify behavior (all 22 existing tests pass)
Author
|
note: especially for real-world testing, I am feeling myself currently unable to do so. I did my best to address the topic and issues from my point of code-knowledge. Feel free to guide me through real-world testing. Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
data_source.ssl_ignoreconfiguration option to allow users to disable SSL/TLS certificate verification when connecting to Home Assistant or OpenHAB instances with self-signed or private CA certificates.Motivation & Use Case
Users deploying Home Assistant or OpenHAB in isolated private networks may use self-signed or internally-signed certificates for HTTPS. Previously, EOS Connect would reject these connections with SSL verification errors, forcing either:
This feature addresses a common real-world scenario in home automation setups where users have legitimate self-signed certificates in trustednetworks but lack Let's Encrypt support (e.g., on internal DNS, behind firewalls).
Changes Made
1. Configuration Schema (
src/config_web/schema.py)data_source.ssl_ignoreboolean field (expert level, default:False)data_source.typeis "homeassistant" or "openhab"restart_requiredfor safety (prevents accidental toggles without full startup)2. LoadInterface Implementation (
src/interfaces/load_interface.py)ssl_ignoreconfig value in__init__and stores as instance variable"[LOAD-IF] ssl_ignore=True: SSL certificate verification is disabled. Only use this with a trusted private network."__request_with_retries()to passverify=not self.ssl_ignoreto both:requests.get()callsrequests.request()calls3. Documentation
System Impact
Security Implications:
Backward Compatibility:
False)Resource Impact:
Testing
Tests Added
test_request_with_retries_ssl_verify_false: Verifies thatverify=Falseis passed torequests.get()whenssl_ignore=Truetest_request_with_retries_ssl_verify_default: Verifies thatverify=True(default) is used whenssl_ignoreis not setTest Execution Results
Coverage
requests.get()andrequests.request()verifiedNot Yet Tested / Future Considerations
End-to-End Integration Testing
CA Bundle Support (Feature for Future)
REQUESTS_CA_BUNDLEenvironment variable or system CA store could be addedcertifilibrary for enhanced CA handlingWire-Level Testing
Edge Cases Not Yet Covered
Documentation in Other Formats
/api/config/(schema already exports the field)Deployment Notes
Related Issues/PRs
Checklist
Ready for review ✅