Conversation
A reply to an encrypted request without Ehbp-Response-Nonce came from something in front of the Gateway's EHBP handler: an edge, a load balancer or an early rejection. The EHBP client only reported the missing header, so the real status was lost and a brief burst of failures could not be diagnosed. The response guard now fails such replies itself with the HTTP status, Content-Type, Server, Retry-After, Cf-Ray and a 512-byte single-line body excerpt. The reply was plaintext on the wire, so nothing confidential is logged. The 422 key-mismatch reply still reaches the EHBP client so it can re-verify. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
When a reply to an encrypted request has no
Ehbp-Response-Nonce, the proxy only logged:The Gateway sets that header on every reply once its EHBP handler has decrypted the request, so a reply without it came from something in front of that step: an edge, a load balancer or an early rejection. The real HTTP status was dropped before anyone could read it.
This happened on a Dappnode on 2026-09-14: six small requests (likely Hermes title generation) failed in two bursts at 11:49 and 11:51 UTC, while large requests sent at the same moment succeeded, with no Gateway redeploy or key change. Small requests reach the encrypted handler normally (verified against the live TEE Gateway), so the cause is outside it, but the logs can't say what.
Change
GuardEHBPResponsesnow fails an unencrypted reply to an encrypted request itself, describing it:Content-Type,Server,Retry-After,Cf-Raywhen present and a 512-byte single-line body excerpt.problem+jsonkey-mismatch reply still passes through, so the EHBP client re-verifies as before (existing key-rotation test passes).The caller-facing behaviour is unchanged: still a 502.
Tests
Retry-Afterand body.go vet ./...andgo test ./...pass.🤖 Generated with Claude Code