Repository navigation
fix(sensitive): keep Ring's push client alive on two-part Web Push headers (ADR-0110) - #1386
Merged
Merged
Conversation
…aders (ADR-0109) firebase_messaging 0.4.5 slices the crypto-key and encryption headers by position, and some Ring pushes now carry `dh=…; p256ecdsa=…`. Decoding fails with "Incorrect padding", the client shuts down, and the push is never acknowledged, so it comes back at every login. ADR-0101's parser patch runs later and never sees it: on trinity no Ring event reached Home Assistant from 2026-10-31. ring_push_guard gains fcm_patch.py, gated to firebase_messaging 0.4.5. It reads dh and salt by name, as sdb9696/firebase-messaging#43 does, and logs and acknowledges a push it still cannot decrypt instead of stopping the client. ADR-0109 records it; #1383 tracks the removal. Refs #1383 Refs #1240 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
1 of 3 tasks
There was a problem hiding this comment.
🟡 Changes recommended
A critical error path can log an entire bare crypto-key value when normalization fails, violating the no-key-material logging guarantee.
1 open issue
What changed in this PR
This PR extends ring_push_guard with a version-gated workaround for firebase_messaging 0.4.5, intended to keep Home Assistant’s Ring push receiver running when Web Push headers contain multiple parameters.
Changes:
- Parse header parameters by name and catch message-handling failures so unreadable pushes can be acknowledged.
- Apply both patches during setup and bump the component version to 1.1.0.
- Record ADR-0109 and document each patch’s independent retirement conditions.
| File | Description |
|---|---|
stacks/sensitive/README.md |
Describes both patches and their removal conditions. |
stacks/sensitive/home-assistant/packages/ring_push_guard.yaml |
Updates comments describing protection and retirement. |
stacks/sensitive/home-assistant/packages/README.md |
Documents the package’s expanded purpose. |
stacks/sensitive/home-assistant/custom_components/ring_push_guard/manifest.json |
Bumps the component version to 1.1.0. |
stacks/sensitive/home-assistant/custom_components/ring_push_guard/fcm_patch.py |
Adds header normalization and guarded message handling. |
stacks/sensitive/home-assistant/custom_components/ring_push_guard/__init__.py |
Applies both patches during integration setup. |
README.md |
Updates the ADR count to 109. |
docs/roadmap.md |
Adds the upstream-release gate for retiring the new patch. |
docs/changelog.md |
Records the push failure and workaround. |
docs/adr/0109-patch-firebase-messagings-header-parsing-locally-until-upstream-ships-a-fix.md |
Records the decision, verification, tradeoffs, and retirement plan. |
Review effort: Balanced
…_push_guard _shape logged the text before each segment's first "=" as a parameter name. For a bare crypto-key value with no "dh=" prefix, that text is the key itself, so a push that failed before its crypto-key was rewritten put the whole key in the warning. Segments now log by name only when the name is a known Web Push parameter, and as "<other>" otherwise. Refs #1383 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt
enabled auto-merge (squash)
November 10, 2026 14:38
This was referenced Nov 10, 2026
Gerrrt
added a commit
that referenced
this pull request
Nov 10, 2026
…kers (#1390) #1386 and #1384 both merged an ADR-0110 on 2026-11-10, which fails check_docs.py's one-ADR-per-number rule on main. The eero ADR landed second, and 0111 is held by open #1389, so it becomes ADR-0112. Every current-state reference moves with it, README's ADR count goes to 111, and a changelog correction entry records the renumbering. The same merges left two diff3 base-marker lines in docs/changelog.md; they are removed. Refs #1228. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 of 3 tasks
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.

What changed
ring_push_guardgains a second version-gated patch,fcm_patch.py, forfirebase_messaging0.4.5. It reads thedhandsaltWeb Push header parameters by name. A push it still cannot decrypt is logged and acknowledged instead of shutting down Ring's push client. The new ADR-0110 records the decision, alongside ADR-0101. The changelog, roadmap, stack README, packages README and package comment are updated to match.Why
ADR-0101's parser patch did not keep Ring events flowing. On
trinity, the Ringevent.*entities recorded no real event in the recorder's ten days (since 2026-10-31). The log on 2026-11-10 at 00:30 UTC hasUnknown error: Incorrect padding, shutting down FcmPushClient.firebase_messaging 0.4.5 slices
crypto-key[3:]by position, and some Ring pushes now carrydh=…; p256ecdsa=…(sdb9696/firebase-messaging#44). The failure comes before the ACK, so FCM resends the push and the client dies again at every login. The upstream fix, sdb9696/firebase-messaging#43, is unreleased.Refs #1383. Refs #1240: its removal step still waits on python-ring-doorbell#540/#556, and HA 2026.11.1 and
devstill pin 0.9.14.Blast radius
Home Assistant on
trinity, sensitive tier only. The patch touches only the Ring push client's message handling, and only whenfirebase_messagingis 0.4.5. On any other version it logs a warning and patches nothing. If it is wrong, the worst case is the state before this PR: the Ring push client stops. There is no change to the mount, the package list or compose.secrets/*.sops.yamlVerification
Tested in the running
ghcr.io/home-assistant/home-assistant:2026.11.1container, against its own firebase_messaging 0.4.5. Pushes were encrypted withhttp_ecefor a generated key:The header-parser cases from upstream #43's tests pass as well: unpadded, bare value, reordered, and a missing parameter that raises.
make validatepasses, with caveats:/usr/binfirst onPATH. The misepython3on trinity has no PyYAML.check .andformat --check ., both clean) and yamllint 1.38.0 on the changed package (clean) in containers at the pinned versions. ansible-lint was not run; no Ansible changed.Deployed to the lab and confirmed working. This needs a Home Assistant restart after merge; Home Assistant: delete ring_push_guard's firebase_messaging patch once firebase-messaging ships the header fix (ADR-0110) #1383 tracks the day of motion events.
Docs updated (
docs/, service README, ordocs/roadmap.md)🤖 Generated with Claude Code