Repository navigation
Reject polling connections whose certificate is not expected for the subscription - #741
Merged
sburmanoctopus merged 1 commit intoNov 19, 2026
Merged
Conversation
…subscription A polling client is trusted by its certificate, but chooses which subscription it polls. Add an optional IPollingSubscriptionVerifier, set with HalibutRuntimeBuilder.WithPollingSubscriptionVerifier. When set, the listener asks it as soon as a polling client names its subscription. If it returns false or throws, the connection is closed before the server identifies itself or takes a connection lease, and ErrorInIdentify is logged against the subscription. Without a verifier, behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sburmanoctopus
marked this pull request as ready for review
November 19, 2026 02:44
LukeButters
approved these changes
Nov 19, 2026
sburmanoctopus
deleted the
levi/reject-mismatched-polling-subscriptions
branch
November 19, 2026 04:56
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.
#738 stops requests being sent to a polling client with the wrong certificate. But a trusted client can still connect for another Tentacle's subscription, take its requests off the queue and make them fail.
This adds an optional
IPollingSubscriptionVerifier(HalibutRuntimeBuilder.WithPollingSubscriptionVerifier). When a polling client names its subscription, the listener asks the verifier. If the verifier returnsfalseor throws, Halibut closes the connection before identifying as the server or taking a connection lease, and logsErrorInIdentifyagainst the subscription.ExchangeAsServerAsyncgains a parameter.🤖 Generated with Claude Code