Repository navigation
feat!: bind embedded proxy and sidecar listener to loopback by default - #423
Merged
Merged
Conversation
olavloite
approved these changes
Nov 19, 2026
Addressed comments
Addressed comments
sakthivelmanii
force-pushed
the
fix/loopback-default-bind
branch
from
November 20, 2026 09:48
21e7d04 to
933f367
Compare
This was referenced Nov 20, 2026
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.
In-process CqlSession instances and standalone sidecar deployments now bind their unauthenticated Cassandra protocol listener and health check server to the loopback interface (127.0.0.1 / InetAddress.getLoopbackAddress()) instead of all network interfaces (0.0.0.0) by default, preventing unintended network exposure of the application Spanner credentials.
Behavior Changes
0.0.0.0->127.0.0.1): StandaloneLauncherlisteners and the optional health check server (-DhealthCheckPort/healthCheckEndpoint) now bind to127.0.0.1by default instead of0.0.0.0. Sidecar deployments that accept connections from other hosts/containers—or Kubernetes deployments where kubelet readiness/liveness probes target the Pod IP via-DhealthCheckPort—must explicitly set-Dhost=0.0.0.0(orhost: 0.0.0.0/healthCheckEndpoint: 0.0.0.0:<port>inconfig.yaml).SpannerCqlSessionBuilderdefault port (9042-> ephemeral port0): When no contact point is configured, the embedded in-process adapter now binds to an OS-assigned ephemeral loopback port (0) instead of9042so multiple sessions in the same JVM do not collide. External tools or tests expecting a fixed local port must explicitly configure.addContactPoint(new InetSocketAddress(InetAddress.getLoopbackAddress(), 9042)).SpannerCqlSessionBuildernow rejects non-loopback or unresolved contact points (via programmatic methods orDriverConfigLoader) with anIllegalArgumentException. Remote clients must connect to a standaloneLaunchersidecar rather than an in-process session.BREAKING CHANGE: Standalone Launcher listeners and health checks now bind to 127.0.0.1 instead of 0.0.0.0 by default, and in-process SpannerCqlSessionBuilder now binds to an ephemeral loopback port (0) by default and rejects non-loopback contact points.