Skip to content

Reject polling connections whose certificate is not expected for the subscription - #741

Merged
sburmanoctopus merged 1 commit into
mainfrom
levi/reject-mismatched-polling-subscriptions
Nov 19, 2026
Merged

sburmanoctopus merged 1 commit into
mainfrom
levi/reject-mismatched-polling-subscriptions

Conversation

@sburmanoctopus

@sburmanoctopus sburmanoctopus commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

#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 returns false or throws, Halibut closes the connection before identifying as the server or taking a connection lease, and logs ErrorInIdentify against the subscription.

🤖 Generated with Claude Code

…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
sburmanoctopus marked this pull request as ready for review November 19, 2026 02:44
@sburmanoctopus
sburmanoctopus requested a review from a team as a code owner November 19, 2026 02:44
@sburmanoctopus
sburmanoctopus merged commit a48c142 into main Nov 19, 2026
13 checks passed
@sburmanoctopus
sburmanoctopus deleted the levi/reject-mismatched-polling-subscriptions branch November 19, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants