Repository navigation
fix(warning): stop warning on the schema read (3.9.1) - #241
Merged
Merged
Conversation
With use_tls=False the CONNECT packet carries the broker username and password, and every panel reading and command crosses in plaintext. The bridge resolves no trust anchor in that posture, so nothing on the MQTT side said so; the schema read's transport warning had been the session's only line.
…es unreported The Homie schema read carries no credential in either direction, yet a consumer reading it before pinning the panel's CA logged a warning naming the passphrase and broker password and used up the once-per-panel slot the registration behind it needs. The transport now exempts a bare request to the CA, status or schema path, judged by the request's shape, so a credential later added to one of them warns. SpanMqttClient warns once when a pinned TLS broker sits beside REST calls with no ssl_context, the one posture whose plaintext schema reads nothing else reports. Docstrings now say pinning is trust on first use.
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
get_homie_schemacarries no credential in either direction. Since SPAN Panel 2.3.0 the integration reads it in its config flow before the panel's CA is pinned, so each panel's first discovery or add after a start logged a warning naming the passphrase and broker password. That read also used up the once-per-panel slot the registration behind it needs.SpanMqttClientwarns once per client whenMqttClientConfig.ca_pempins a TLS broker and nossl_contextcovers the REST calls. That is the one posture whose plaintext schema reads nothing else would report.AsyncMqttBridgewarns once per bridge whenuse_tls=False. The broker username, password, panel data and commands then cross in plaintext, and the bridge said nothing about it.3.9.1b1, to test the integration against before the final.Testing
tests/test_plaintext_warning.pyasserts, for each public bootstrap call, that it warns exactly when it carries a credential. Its completeness guard is built from the coroutinesauthanddetectiondefine. A posture table covers every combination ofuse_tls,ca_pemandssl_context. Each guard was proven by mutation.tests/test_plaintext_broker_warning.pychecks that the broker warning fires once across reconnects and rebuilds, and never logs the password.