Repository navigation
Make an unauthenticated cluster bus port an explicit choice - #15722
Merged
Merged
Conversation
The cluster bus has no authentication of its own: the sender of a packet is identified solely by the node ID in its header, which is public information, so any peer able to reach the bus port can speak the protocol. The bus also carries sensitive information shared between the nodes, which must not leak outside the cluster, as that can potentially threaten the whole cluster. Introduce cluster-bus-require-tls, defaulting to yes: a cluster node now refuses to start unless its bus is protected by TLS. Running the bus on plain TCP becomes an explicit choice, made by setting the option to no, in the spirit of protected-mode. This is a breaking change for non-TLS cluster deployments, which have to acknowledge the plaintext bus once. The requirement is gated on cluster mode, since only a cluster node opens a bus port; a standalone instance is unaffected regardless of tls-cluster. The startup check runs in the post-load block of loadServerConfigFromString(), so it observes the final configuration: config file, includes and command line alike. At runtime the invariant is enforced from the apply callbacks of both options rather than from their setters, because CONFIG SET stores every value before running the first apply callback: the pair is therefore judged on the state it produces, so a single command disabling both options is accepted whatever the order of its arguments, while disabling tls-cluster alone is refused. A node whose bus is plaintext because the requirement was waived says so in the log, at startup and whenever the bus leaves TLS at runtime. The test suite waives the requirement in tests/assets/default.conf, as non-TLS runs have no TLS to offer; the tests covering the requirement itself enable it explicitly. The cluster-bus-require-tls unit covers the default, the startup refusal, both CONFIG SET rejections and the atomic downgrade in either argument order. The three places that start cluster nodes outside that file - the legacy cluster suite, the external-test workflow and utils/create-cluster - waive it too.
…ests Gating the cluster bus TLS requirement on cluster mode is only sound because cluster-enabled is IMMUTABLE_CONFIG: were it settable, a standalone instance running with the requirement enabled and tls-cluster disabled could enter cluster mode and open a plaintext bus without ever facing the startup check. unit/introspection covers the immutable mechanism itself, through daemonize, but no test asserted that cluster-enabled in particular still carries the flag. Add one next to the standalone case that depends on it, reusing that server since it already runs in exactly the configuration that the missing flag would make unsafe.
The startup check runs from the post-load block of loadServerConfigFromString(), guarded by config_load_depth so that it only fires once the outermost load finishes. That guard is what lets directives reaching the server through "include" be accounted for: an included file ends at the position of its "include" line, before the rest of the parent file has been parsed, so a check running per-load would judge an incomplete configuration. Nothing exercised that. Add a test driving src/redis-server against a hand-written pair of config files, in both directions: cluster-enabled arriving from the included file still gets its plaintext bus refused, and the waiver arriving from the same file is honoured, with the node starting and reporting the unprotected bus in its log exactly once. start_server cannot express this, as it generates the config file itself and offers no way to place directives behind an include, so the files are written by a small helper and the server is spawned directly. It is reached over the plain port, which keeps the test identical under --tls.
hristostaykov-del
requested review from
CMeans-Redis,
YaacovHazan,
oranagra and
sundb
August 28, 2026 17:02
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 6b8a2b1. Configure here.
Member
|
a few random points:
|
applyTlsCluster() reconfigures TLS and calls
clusterNotifyTopologyChanged() whenever it runs, without checking that
tls-cluster actually moved. That is not free: the former rebuilds the
SSL_CTX, and the latter cancels the ASM tasks invalidated by the new
topology besides queueing the module event.
configSetCommand() reaches the callback in a state where nothing moved.
When any apply of a command fails, it restores the previous values and
re-runs the apply callback of every config in that command,
unconditionally, so a rolled back CONFIG SET touching tls-cluster
reconfigures and notifies for a change that never took effect:
CONFIG SET tls-cluster no tls-cert-file /nonexistent
-> ERR ... Unable to update TLS configuration
-> a NODE topology change is reported
Filtering the rollback on whether a config changed would not help, since
tls-cluster did change and did move back; only the callback knows that the
apply which failed made no changes. So return early when the value equals
the one this callback last acted on, tracking that value the way
clusterUpdateMyselfIp() tracks prev_ip and seeding it from the startup
configuration. Configs that feed the TLS context - the certificate, the
key, the CA, the protocols - are unaffected: applyTlsCfg() is their own
apply callback, which the rollback runs regardless of this decision.
With cluster-bus-require-tls the same path is reached without any failure,
by refusing to move the cluster bus to plain TCP, so cover both: a rolled
back change and a refused one must report nothing, and neither may leave
the tracked value out of step with tls-cluster for the next real change.
The problem the option guards against is not that the cluster bus is readable on the wire, it is that the bus protocol has no authentication of its own: a packet's sender is identified solely by the node ID in its header, and that ID is public - a node picks it at random only so IDs do not collide, then publishes it in CLUSTER MYID, in CLUSTER NODES and in every packet header. It is an identifier, not a credential. So any host that can reach the bus port can speak the protocol and threaten the whole cluster, whether or not it can read anyone else's traffic. Name and wording now say that. The option becomes cluster-bus-port-protected-mode, which also stops promising that TLS specifically is the remedy: what is required is authentication of the bus port, or an acknowledgement that the network already provides it. That is the same bargain protected-mode offers for unauthenticated client access, and the reason to follow its name. What tls-cluster contributes is spelled out where the check lives, because the check leans on it: enabling it makes a peer present, in either direction, a certificate verified against the CA that tls-cluster itself makes mandatory, and it does so regardless of tls-auth-clients, which governs the client port only - clusterAcceptHandler() always demands a peer certificate. That is why testing tls-cluster alone is a sound test for an authenticated bus, and it would stop being one if the accept path ever started honouring tls-auth-clients. No behaviour change: the condition remains cluster mode, protection enabled, tls-cluster disabled.
Collaborator
Author
Points 2 and 4 addressed in 582ce67 |
cluster-bus-port-protected-mode treats tls-cluster as equivalent to an authenticated bus port. Nothing tested that equivalence: the existing peer-impersonation test presents a certificate that does chain to the CA but lacks the cluster identity, so the narrower case was covered while the plain one, a certificate from an unrelated CA, was not - in either direction. On accept, a self-signed certificate is offered to the bus port, and a CA-signed one to that same port immediately before. The rejection is asserted from the server's log, since it is not observable from the client: under TLS 1.3 the certificate travels after the server's Finished, so the client's own handshake completes before the server has judged it. Requiring exactly one rejection makes the check honest in both directions - everything being refused would count two, nothing being refused would time out. On connect, a second cluster node is started that differs only in serving a self-signed certificate, and is met by the node under test. Its outbound link uses the client-role context, which loads the same CA, so the dial must fail; besides the log this asserts that the peer never joins, which is the property that actually matters. The peer needs "wait_ready false", as the suite's own client would refuse that certificate too and no client is therefore created for it. A real node rather than a stand-in peer, because every stand-in was worse: a Tcl TLS listener never handshakes at all, since the test blocks the event loop that would run its accept callback, and the connection then sits in SSL_connect until the handshake node expires with nothing logged - a test that passes while proving nothing. openssl s_server does drive itself but serves one connection at a time and was flaky in practice.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #15722 +/- ##
============================================
- Coverage 76.82% 76.74% -0.08%
============================================
Files 145 145
Lines 87684 87715 +31
============================================
- Hits 67360 67319 -41
- Misses 20324 20396 +72
🚀 New features to boost your workflow:
|
The guide said only that --tls-cluster yes makes Redis Cluster use TLS across nodes, which is no longer the whole story now that a cluster node refuses to start without it. A reader following TLS.md would meet the startup refusal with no explanation of what it is asking for. Describe what the cluster bus exposes and what tls-cluster actually contributes: a message's sender is identified only by the node ID in its header, which is public, so authentication comes from every peer presenting a certificate verified against the CA that tls-cluster makes mandatory, in both the accepting and the connecting direction. Then state the consequence: cluster-bus-port-protected-mode defaults to yes, an unauthenticated bus stays supported but has to be asked for, and the option is inert outside cluster mode. That explanation turns on tls-auth-clients not applying to the bus, and the guide never introduced tls-auth-clients at all - it passed a client certificate to redis-cli without saying why, leaving the reader to guess that clients on a TLS port are required to present one by default. Say so where the example is, together with what "no" and "optional" relax, that they relax the client port alone, and that tls-auth-clients-user turns a validated certificate into an ACL identity.
tezc
reviewed
Sep 2, 2026
tezc
reviewed
Sep 2, 2026
tezc
reviewed
Sep 2, 2026
Describe the two effects that the check prevents. Reconfiguring TLS rebuilds the SSL_CTX and so discards the session cache held on it, and the notification reports a NODE change to modules that did not happen. Both remain good reasons for a refused CONFIG SET to do neither, so the check and the tests are untouched - only their explanation. The previous wording overstated the cost by pointing at ASM task cancellation, which reads as though a redundant apply could abort an in-flight slot migration. clusterAsmCancelInvalidTasks() only cancels when this node has become a replica or when a task's source or destination node no longer exists, so a value that never moved leaves every task alone.
Both refusals told the operator to change the other option "in the same CONFIG SET call", which reads as a requirement. It is not one: the check judges only the state a command produces, so waiving protection and then disabling tls-cluster, or authenticating the bus and then enabling protection, are accepted just as well as separate calls. What is refused is the unsafe single step - disabling tls-cluster while protection is still enabled - whichever way the operator gets there. Offer both routes in the two messages, and cover the sequential one, which nothing pinned until now even though the messages point at it.
The startup error, the check's comment, redis.conf, TLS.md and the test's header all opened by explaining that a packet's sender is identified only by the node ID in its header. That is a detail most readers of an error message have no use for, and it framed the exposure more narrowly than it is: the absence of authentication is not only about attributing packets. An unknown host that reaches the port can send a MEET and be added as a node outright, with its gossip section processed as trusted - clusterProcessPacket() says as much where it does so. Lead with that instead. The operator-facing message now says only that any host able to reach the port can join the cluster and speak the cluster protocol, and the prose keeps the MEET case as the concrete illustration. The one place the node ID stays is the shared-CA discussion in TLS.md, where it carries the argument rather than decorating it: forging a message that impersonates a real member is possible precisely because the sender is named by a public value.
Protected mode treats tls-cluster on its own as an authenticated bus port. That reading depends on tls-auth-clients governing the client port only, and nothing exercised it: every test so far ran with the suite default, where client certificates are required anyway, so the bus and the client port were never asked to disagree. Run a cluster with tls-auth-clients no and require them to. On the client port a peer presenting no certificate is served, which is what establishes that the setting took effect; on the cluster bus the same peer is refused, because clusterAcceptHandler() demands a certificate whatever the option says. The rejection is matched on "peer did not return a certificate" rather than any accept failure, so it cannot be satisfied by the chain check that other tests already cover. Two details the test comments record: redis-cli provides the certificate-less peer because the suite's own client always offers one, and the assertion reads the server log because a TLS 1.3 client is not told of the rejection - its handshake completes before the server judges the certificate.
tezc
reviewed
Sep 3, 2026
Co-authored-by: Ozan Tezcan <[email protected]>
Co-authored-by: Ozan Tezcan <[email protected]>
The variable that lets applyTlsCluster() tell a real change from a restored one was called tls_cluster_applied, while the comment pointed at clusterUpdateMyselfIp()'s prev_ip as the pattern it follows. Name it the same way, so the parallel is visible without the cross-reference, and shorten the comment to what a reader needs: it holds the previous value, and it exists because configSetCommand() re-runs every apply callback of a command when it rolls a failed one back, including for values that ended up unchanged. Also drop two trailing spaces, one of them in the comment added by the previous commit.
1 of 4 tasks
pull Bot
pushed a commit
to Stars1233/RediSearch
that referenced
this pull request
Sep 24, 2026
…le line (RediSearch#11545) * [MOD-18751] Disable cluster-bus-port-protected-mode for oss-cluster tests on unstable redis/redis#15722 added cluster-bus-port-protected-mode, defaulting to enabled on the unstable line. RLTest builds oss-cluster shards with tls-cluster disabled, so the new default treats the cluster bus port as unauthenticated and every shard refuses to start -- every coordinator flow-test job in the nightly matrix has failed this way since 2026-09-15. Bump rltest to 0.7.29 (RedisLabsModules/RLTest#255), which adds --cluster_bus_port_protected_mode, and pass "no" for it in the coordinator flow-test step, gated on redis-ref == 'unstable' since pinned release refs don't have the option yet and reject it outright. Co-Authored-By: Claude Sonnet 5 <[email protected]> * Trim comments to match single-line style used nearby Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
LiranAbir
added a commit
to RedisTimeSeries/RedisTimeSeries
that referenced
this pull request
Sep 24, 2026
… bus test_topology_events:test_failover spawns its own cluster-node replicas, rather than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does not reach them. Since redis/redis#15722 a cluster node whose bus port is not authenticated by tls-cluster refuses to start unless protection is waived, so those replicas died at startup and the test timed out after 2308s on every oss-cluster leg. Mirror the master's value of the option onto the replica we spawn. The config is absent on older redis, which reports an empty dict and gets nothing added, since passing an unknown config would be fatal there instead. Also bound the wait for the replica to serve. It was the one unbounded wait in the helper, so a replica that never started produced only a test timeout, with the cause nowhere in the output: a config redis rejects is reported before the logfile is opened, leaving an empty log. Co-Authored-By: Claude Opus 5 <[email protected]>
LiranAbir
added a commit
to RedisTimeSeries/RedisTimeSeries
that referenced
this pull request
Sep 24, 2026
… bus (#2196) test_topology_events:test_failover spawns its own cluster-node replicas, rather than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does not reach them. Since redis/redis#15722 a cluster node whose bus port is not authenticated by tls-cluster refuses to start unless protection is waived, so those replicas died at startup and the test timed out after 2308s on every oss-cluster leg. Mirror the master's value of the option onto the replica we spawn. The config is absent on older redis, which reports an empty dict and gets nothing added, since passing an unknown config would be fatal there instead. Also bound the wait for the replica to serve. It was the one unbounded wait in the helper, so a replica that never started produced only a test timeout, with the cause nowhere in the output: a config redis rejects is reported before the logfile is opened, leaving an empty log. Co-authored-by: Claude Opus 5 <[email protected]>
LiranAbir
added a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 27, 2026
…#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
LiranAbir
added a commit
to RedisBloom/RedisBloom
that referenced
this pull request
Sep 27, 2026
…#1068) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * MOD-18341 - Cap redis-py below 6 so the flow suite keeps a usable client Nothing here pinned the client, and RLTest's own requirement is uncapped (redis = ">=5.0.0"), so pip installs redis-py 8.1.0. From redis-py 6 on, a connection pool carries kwargs that Redis.__init__ does not accept, so the tests that rebuild a raw client out of an existing pool's connection_kwargs fail: raw = redis.Redis(**kwargs) TypeError: Redis.__init__() got an unexpected keyword argument 'himport_registry' That is every build-linux leg on both architectures, on four tests in test_cms and test_overall. Pin the client to the 5.x series, which is what the previous RLTest pin was capping it to in effect.
LiranAbir
added a commit
to RedisTimeSeries/RedisTimeSeries
that referenced
this pull request
Sep 27, 2026
…ack (#2194) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Keep the waiver inside the oss-cluster phase Setting it on RLTEST_ARGS in the OSS_CLUSTER block leaks into the tls_cluster block below, which is a separate if and inherits the parent shell's value - the tls_cluster phase was getting the option too, which this change had claimed it would not. Set it inside each oss-cluster invocation's own subshell instead, as the other phases do. Found by dry-running tests.sh with NOP=1 and reading the generated RLTest configuration per phase. Verified after: one occurrence, in "tests on OSS cluster" only; the general, slaves, AOF and tls_cluster phases carry none. Note the pre-existing duplicate --cluster_node_timeout in the tls_cluster configuration, which comes from the same leak and is left alone here. * Trigger CI * MOD-18906 - Start the failover test's replicas on a protected cluster bus (#2196) test_topology_events:test_failover spawns its own cluster-node replicas, rather than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does not reach them. Since redis/redis#15722 a cluster node whose bus port is not authenticated by tls-cluster refuses to start unless protection is waived, so those replicas died at startup and the test timed out after 2308s on every oss-cluster leg. Mirror the master's value of the option onto the replica we spawn. The config is absent on older redis, which reports an empty dict and gets nothing added, since passing an unknown config would be fatal there instead. Also bound the wait for the replica to serve. It was the one unbounded wait in the helper, so a replica that never started produced only a test timeout, with the cause nowhere in the output: a config redis rejects is reported before the logfile is opened, leaving an empty log. Co-authored-by: Claude Opus 5 <[email protected]> * MOD-18913 - Cap redis-py below 6 so the suite stays on RESP2 RLTest's own requirement on the client is uncapped (redis = ">=5.0.0"), where the commit this repo was pinned to until now capped it at "^5.0.0rc2". Moving the pin therefore let pip install redis-py 8.1.0, which negotiates RESP3 by default, and under RESP3 TS.MRANGE ... GROUPBY replies with a map rather than rows: ((filtered_by, withlabels, samples),) = result ValueError: too many values to unpack (expected 3) Pin the client to the 5.x series, which is what the old RLTest pin was silently giving us, so the pin bump does not carry a protocol change with it. Supporting RESP3 in the assertions is the real fix and stays with MOD-18913. * Restore the MOD-18906 replica fix It was reverted by accident in the previous commit, which picked up a stale staged copy of the file alongside the requirements change. * MOD-18913: absorb the RLTest upgrade - unescape moduleArgs semicolons (#2197) * MOD-18913 - Pin the RLTest fix for escaped semicolons in moduleArgs The plain-string branch of fix_modulesArgs reuses the raw input instead of the unescaped split, so an escaped semicolon reaches the module with its backslash. test_globalconfigs passes COMPACTION_POLICY that way, the module then fails to load, the server never starts, and the test reports only Connection refused against the Env it just built - on gen, slaves, aof and aof_slaves. Fixed upstream in RLTest#256; pinned to that commit until it merges. Co-Authored-By: Claude Opus 5 <[email protected]> * Trigger CI * Point the pin at upstream RLTest now that the fix has merged RedisLabsModules/RLTest#256 merged as 7e9f69ac1, so the escaped-semicolon fix is available upstream and the pin no longer has to reference a fork. Same code either way - 8dc964e was that PR's head - so this changes nothing in CI, it just stops the branch from merging with a personal fork as a dependency. * Spell the RLTest pin as a full SHA An abbreviated SHA only resolves while the commit stays reachable from the default branch, because a git fetch of a specific object needs the full hash and an abbreviation is resolved after the clone. It works today - CI on the previous commit passed - but it is a needless dependency on that reachability, and the pin this replaced was a full SHA. Same commit either way. Raised by Cursor Bugbot on 965b2db. --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
GuyAv46
added a commit
to RediSearch/RediSearch
that referenced
this pull request
Sep 28, 2026
The pinned Redis (past redis/redis#15722) refuses cluster mode unless cluster-bus-port-protected-mode is waived, so every oss-cluster setup passes it. Slack notifications are dropped from the compare step: the webhook send fails and redisbench-admin 0.12.38 crashes in its error handler after a completed run. Temporary, draft-only: the proper fixes belong in redisbench-admin. Co-Authored-By: Claude Fable 5.1 <[email protected]>
AvivDavid23
pushed a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
…#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
pushed a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
…#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
pushed a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
…#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
pushed a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
…#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
added a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
* MOD-18952 Fix MGET command key spec (#1648) * MOD-18952 Fix MGET command key spec * fix tests * MOD-18751: waive cluster bus protected mode for the oss-cluster phase (#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: LiranAbir <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
added a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
* MOD-18952 Fix MGET command key spec (#1648) * MOD-18952 Fix MGET command key spec * fix tests * MOD-18751: waive cluster bus protected mode for the oss-cluster phase (#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: LiranAbir <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
added a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
* MOD-18952 Fix MGET command key spec (#1648) * MOD-18952 Fix MGET command key spec * fix tests * MOD-18751: waive cluster bus protected mode for the oss-cluster phase (#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: LiranAbir <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
AvivDavid23
added a commit
to RedisJSON/RedisJSON
that referenced
this pull request
Sep 28, 2026
* MOD-18952 Fix MGET command key spec (#1648) * MOD-18952 Fix MGET command key spec * fix tests * MOD-18751: waive cluster bus protected mode for the oss-cluster phase (#1644) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch calls run_env and exits 20 lines before the assignment, so that path started its cluster without the waiver and the shards refused to start on 8.12. Moving the assignment above the branch; it depends on nothing in between. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: LiranAbir <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
3 of 4 tasks
TalBarYakar
added a commit
to RedisBloom/RedisBloom
that referenced
this pull request
Oct 13, 2026
* MOD-17398 CMS Extention (#1063) * MOD-17398 CMS Extention * add test * fixes * incrby summery change * opt - cache some values(capped) to skip calculating hash twice in `CMS_IncrBy` * Undo writes on error instead * move undo incrs to a function * cms info rename cell size key (#1064) * cms info renamke cell size key * fix test * MOD-18487 - Reject excessive Bloom filter hash counts during restore (#1067) * Reject excessive Bloom filter hash counts during restore * added test which explicitly checks BLOOM_MAX_HASHES * MOD-18751: waive cluster bus protected mode for the oss-cluster phase (#1068) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Trigger CI to build the image locally, so it installs RLTest 0.7.29 * MOD-18341 - Cap redis-py below 6 so the flow suite keeps a usable client Nothing here pinned the client, and RLTest's own requirement is uncapped (redis = ">=5.0.0"), so pip installs redis-py 8.1.0. From redis-py 6 on, a connection pool carries kwargs that Redis.__init__ does not accept, so the tests that rebuild a raw client out of an existing pool's connection_kwargs fail: raw = redis.Redis(**kwargs) TypeError: Redis.__init__() got an unexpected keyword argument 'himport_registry' That is every build-linux leg on both architectures, on four tests in test_cms and test_overall. Pin the client to the 5.x series, which is what the previous RLTest pin was capping it to in effect. * MOD-18922: drop the bullseye legs from the test matrices (#1069) Debian 11 reached end of LTS on 2026-08-31, and its packages have rotated off deb.debian.org/debian-security. The bullseye legs can therefore no longer build their Docker image whenever the image is built locally rather than pulled (i.e. on any PR carrying the docker-image-changes label): apt install 404s on the pinned Debian 11 package versions, and the leg reports no test result at all. Remove bullseye from the OS lists that drive the test legs only: - flow-linux.yml default lists (x64 and arm64) -> Event CI - event-nightly.yml (x64 and arm64) - flow-random-traffic.yml OS_LIST The release surface is deliberately left as it was: event-tag.yml and push-docker-images.yml keep bullseye, so tagged builds still publish a Debian 11 artifact and image. Dockerfile.bullseye and .install/os/bullseye.sh are kept for the same reason. Co-authored-by: Claude Opus 5 <[email protected]> * MOD-18559 - Fix missing command info for CF.COMPACT (#1071) * MOD-18559 - Fix missing command info for CF.COMPACT Adds CF.COMPACT metadata with arity 2, a single read/write key specification, and argument documentation. This lets RAMP packing consume explicit metadata instead of fallback values. Existing command flags remain unchanged. Adds regression coverage for command metadata, key extraction, argument errors, and successful execution. Validation: local build and both targeted tests passed. Redis Enterprise proxy routing remains unverified. * fix linter issue * MOD-18948: verify every write command replicates to the replica (#1072) * MOD-18948: verify every write command replicates to the replica A write command can be implemented correctly on the primary while its propagation to the replica is wrong or missing, and nothing in the suite catches it. MOD-16050 is the canonical case: CF.LOADCHUNK replicated only its header chunk and never the data chunks. The divergence was silent -- master_link_status:up, matching replication offsets, CF.INFO reporting the full inserted count on both sides -- and only surfaced as total data loss when a failover promoted the replica. Add tests/flow/test_replication.py, a table of one representative invocation per write command (23 of them, covering bf/cf/cms/topk/tdigest). Each row runs on the primary, waits for the replica to ack, then compares the key set, the DUMP payload of every key, and a semantic read-back. The invocation per command is chosen to be the form most likely to diverge rather than the simplest one: autocreate-on-write instead of a pre-reserved key, a scaling BF.INSERT instead of a single add, a full SCANDUMP chunk round-trip instead of a header. No argument permutations. Two details worth noting: - topk.add and topk.incrby are exempt from the DUMP comparison. HeavyKeeper decays counters with an unseeded rand(), so the replica re-executing the same command legitimately ends up with a different internal layout. The key set and the value read-backs are still compared. - A read that returns the type default proves nothing, since both sides match trivially. Every row asserts the primary's read-back is non-default before comparing it, and asserts WAIT actually acked. testEveryWriteCommandIsCovered enumerates write commands from the running server via COMMAND LIST FILTERBY MODULE and fails if any is missing from the table, so a newly added command cannot land without a replication test. Co-Authored-By: Claude Opus 5 <[email protected]> * MOD-18948: skip the replication test on a cluster env tests.sh runs a `--env oss-cluster` variant, where RLTest's getSlaveConnection() is an unconditional `raise Exception('unsupported')`. The test errored there instead of skipping, and since a single failing variant fails the whole job this reddened every OS leg. Verified locally against all four tests.sh variants: general, --use-slaves and --use-aof pass, oss-cluster now skips. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> * MOD-18948: don't start a replica under --use-aof in test_replication (#1073) Since #1072, arm64 nightly jobs hang in the --use-aof env group until the 360-minute cancel: test_replication reports, and the class that runs next never does. Bloom has no per-test timeout, so the hang leaves no trace, but RedisJSON's identical test hit the same group with a 1800 s per-test timeout, and its traceback shows where it sits: after the test passed, RLTest stopping the test's replica -- redis_std.py stopEnv -> _stopProcess(SLAVE) -> process.communicate() RLTest sends SIGTERM, waits 30 s, then calls communicate() with no timeout. The same hang predates this test (RedisJSON's test_mset_replication_in_aof, another replica running with AOF), but in the --use-aof group no other test starts a replica, so test_replication is what brings one in. - testWriteCommandsReplicate skips under AOF, before it builds the replica env. Replication stays covered by the general and --use-slaves groups. - testEveryWriteCommandIsCovered no longer asks for a replica at all: it only reads the command table, and on RedisJSON it was the test whose teardown hung. Locally, every tests.sh variant passes, and under --use-aof no replica is started any more. Co-authored-by: Claude Opus 5.5 <[email protected]> * MOD-19291: bound RLTest teardown and flow test timeouts (#1074) * MOD-19291: bound RLTest teardown and flow test timeouts Configure shared Env creation to retry shutdown for 20 seconds before SIGKILL, preventing stalled replicas from blocking teardown indefinitely. Add a configurable per-test timeout: 30 minutes by default and 3 hours under Valgrind. * increase timeout to vg * MOD-19365 Use released RLTest 0.7.31 for module tests (#1076) * if redis does not expose the adress - using hardcoded addr (#1075) * update version to 8.11.90 --------- Co-authored-by: Aviv David <[email protected]> Co-authored-by: LiranAbir <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Tom Gabsow <[email protected]>
GuyAv46
added a commit
to RediSearch/RediSearch
that referenced
this pull request
Oct 14, 2026
The pinned Redis (past redis/redis#15722) refuses cluster mode unless cluster-bus-port-protected-mode is waived, so every oss-cluster setup passes it. Slack notifications are dropped from the compare step: the webhook send fails and redisbench-admin 0.12.38 crashes in its error handler after a completed run. Temporary, draft-only: the proper fixes belong in redisbench-admin. Co-Authored-By: Claude Fable 5.1 <[email protected]>
alonre24
added a commit
to RediSearch/RediSearch
that referenced
this pull request
Oct 14, 2026
The pinned Redis ref now includes redis/redis#15722, which refuses to start a cluster node with a non-TLS bus unless cluster-bus-port-protected-mode is waived. CI waived it only for the literal `unstable` ref, so every coordinator flow test failed on the new pin. runtests.sh now adds the waiver for cluster runs whenever the redis-server binary knows the option. That covers CI and local runs, and any future pin, without matching ref names. Also move the macOS OpenSSL linkage check from task-build.yml, which only runs on Linux, to task-test.yml, which builds the macOS test jobs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 of 4 tasks
aradalvand
pushed a commit
to aradalvand/RediSearch
that referenced
this pull request
Oct 21, 2026
* [MOD-19641] Build macOS against OpenSSL 4 The Homebrew Redis package now ships Redis core against openssl@4 (as homebrew-core does), so the module must link the same major version. - macOS setup installs openssl@4; CMake prefers it over openssl@3. - CI builds Redis against openssl@4. Bump the pinned Redis ref to redis/redis#15227, which replaces the tls.c API OpenSSL 4 deprecates (it broke Redis's -Werror build, the reason for the openssl@3 pin). - Drop the hard-coded /usr/local/opt/openssl from hiredis.cmake: it could pick a different OpenSSL than OPENSSL_ROOT_DIR. - New CI check fails the macOS build if redisearch.so links any libssl/libcrypto outside openssl@4. Co-Authored-By: Claude Opus 5.5 <[email protected]> * [MOD-19641] Waive cluster-bus protected mode whenever Redis has it The pinned Redis ref now includes redis/redis#15722, which refuses to start a cluster node with a non-TLS bus unless cluster-bus-port-protected-mode is waived. CI waived it only for the literal `unstable` ref, so every coordinator flow test failed on the new pin. runtests.sh now adds the waiver for cluster runs whenever the redis-server binary knows the option. That covers CI and local runs, and any future pin, without matching ref names. Also move the macOS OpenSSL linkage check from task-build.yml, which only runs on Linux, to task-test.yml, which builds the macOS test jobs. Co-Authored-By: Claude Opus 5.5 <[email protected]> * [MOD-19641] Require OpenSSL 4 for macOS builds Drop the unversioned Homebrew `opt/openssl` fallbacks and fail CMake configure when the OpenSSL found is not major version 4. A host without openssl@4 used to fall back silently to whatever `opt/openssl` pointed at, producing a module that fails to load in the Homebrew Redis package. Co-Authored-By: Claude Opus 5.5 <[email protected]> * [MOD-19641] Waive cluster-bus protected mode for ENV_ONLY clusters too `make run REDIS_STANDALONE=0` sets ENV_ONLY=1, which starts the cluster through run_env and exits before the test path's waiver, so its nodes refused to start on a Redis that has cluster-bus-port-protected-mode. Probe the option in one helper and apply it on both paths. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Make an unauthenticated cluster bus port an explicit choice
Problem
The cluster bus protocol has no authentication of its own: any host that can reach a node's cluster bus port can speak the protocol and so threaten the whole cluster. What authenticates the bus is
tls-cluster, which is disabled by default — so until it is enabled, the only thing standing between the cluster and an arbitrary host is whatever the operator has done to keep the cluster bus port inaccessible to untrusted hosts (firewall, VPN, private network), and nothing in Redis says so.What this PR does
Introduces
cluster-bus-port-protected-mode, a boolean defaulting to yes. A cluster node now refuses to start unless its bus port is authenticated; running an unauthenticated one becomes something the operator opts into, in the spirit ofprotected-mode.cluster-enabledcluster-bus-port-protected-modetls-clusterThe refusal message:
Non-TLS cluster deployments will not start after upgrading until they add
cluster-bus-port-protected-mode no. This is deliberate and unavoidable: a default that is safe for new deployments cannot also be silent for existing ones. The failure is loud, immediate (before any listener is opened or pid file written), and the message states both remedies.Upgrade path for a cluster on a trusted network: add
cluster-bus-port-protected-mode notoredis.conf, or pass--cluster-bus-port-protected-mode no. No data or topology implications.Design notes
Two decisions worth a reviewer's attention:
Protection is gated on cluster mode. Only a cluster node opens a bus port, so the enforced invariant is
cluster_enabled && cluster_bus_port_protected_mode ⟹ tls_cluster. A standalone instance is unaffected regardless oftls-cluster— otherwise the new default would refuse to start every non-TLS Redis in existence, not just clusters. The gate is safe to rely on becausecluster-enabledisIMMUTABLE_CONFIG(no assignment toserver.cluster_enabledexists outside the config system), so it cannot flip at runtime; there is a test pinning that.Testing
tls-clusteralone is sound because it does not depend ontls-auth-clients, which governs the client port only: the bus has dedicated dial/accept paths, andclusterAcceptHandler()hardcodesTLS_CLIENT_AUTH_YES, so a peer certificate verified against the CA — whichtls-clustermakes mandatory — is required in both directions regardless of how client authentication is configured. A test pins this by running a cluster withtls-auth-clients noand requiring the two ports to disagree: a certificate-less peer is served on the client port and refused on the bus.Runtime enforcement lives in the
applycallbacks, not the setters.configSetCommand()stores every value before running the first apply callback, so an apply-time check judges the pair of values the command produces. That makesCONFIG SET tls-cluster no cluster-bus-port-protected-mode nosucceed in either argument order, whileCONFIG SET tls-cluster noalone is refused. A setter-time check would have rejected the legitimate atomic waiver depending on argument order. A refused set is also a true no-op, which takes more than putting the check first:configSetCommand()restores the previous value and calls every apply callback of the command again, soapplyTlsCluster()additionally short-circuits whentls-clusterdid not effectively move — otherwise a refusal would rebuild theSSL_CTXand, throughclusterNotifyTopologyChanged(), rebuild the SSL_CTX, discarding the TLS session cache, and report a NODE topology change to modules for a change that never happened. Same shadow-previous-value pattern asclusterUpdateMyselfIp().The option is kept
MODIFIABLE_CONFIG, likeprotected-mode. Making it immutable would additionally have removed the existing ability toCONFIG SET tls-cluster nowithout a restart, which would be a second breaking change.Startup check placement. It runs in the post-load block of
loadServerConfigFromString()(theconfig_load_depth == 0guard), so it observes the final configuration: main config file,include-d files and command-line arguments alike. Covered by the "protection is judged after the whole configuration is loaded" test, which drivessrc/redis-serveragainst a hand-writtenincludepair in both directions —start_servercannot express this, as it generates the config file itself.Logging. A node whose bus port is unauthenticated because protection was waived says so once at startup, and again whenever the bus loses its authentication at runtime (any such transition necessarily changes
tls-cluster, so thetls-clusterapply callback is the single place that needs to report it). This mirrors how Redis warns aboutprotected-mode/ a passwordless default user.Tests
New
tests/unit/cluster/cluster-bus-port-protected-mode.tcl, 10 tests (4 of them TLS-only), green inboth non-TLS and
--tlsruns:yesand refuses an unauthenticated bus — run with no config file at all, so it observes the compiled-in default rather than anything the suite configurescluster-enabledand the waiver are honoured when they reach the server through aninclude, which an included file's early end would otherwise hidecluster-enabledis still immutable so the cluster-mode gate cannot be opened at runtimeCONFIG SET cluster-bus-port-protected-mode yesis refused while the bus is unauthenticatedtls-clusteron, a cluster node starts with its bus authenticated and logs no advisoryCONFIG SET tls-cluster nois refused while protected mode is enabledCONFIG SETcan un-authenticate the bus in either argument order, and put it backtls-cluster, and authenticating the bus before enabling protection, since the check judges only the state each call producesNew
tests/unit/cluster/cluster-bus-tls.tcl, 3 TLS-only tests. These cover whattls-clusterverifies rather than the new option — the properties protected mode relies on when it treats
tls-clusteralone as an authenticated bus port, which nothing pinned before:tls-auth-clients nodoes not relax the cluster bus: a certificate-less peer is served on the client port, and refused on the bus withpeer did not return a certificatetests/unit/cluster/cluster-topology-change.tclgains two TLS-only tests for theapplyTlsCluster()short-circuit described above, since it already loads the module thatcounts the notifications:
CONFIG SET tls-cluster no tls-cert-file /nonexistentreports no NODE change — the trigger that predates this PR, withcluster-bus-port-protected-modeexplicitly out of the pictureCONFIG SET tls-cluster noreports no NODE change — the trigger this PR addsBoth also assert that the tracked value is not left out of step with
tls-cluster, by drivinga real change afterwards and requiring it to still be reported. Both were verified to fail
without the short-circuit (
Expected '11' to be equal to '12'), so they are not vacuous.Test infrastructure and tooling
The new default means anything that starts a cluster node with an unauthenticated bus has to waive protection:
tests/assets/default.conf— waived suite-wide; non-TLS runs have no TLS to offer, so without this every cluster test fails to start. The tests that cover the protection itself enable it explicitly. Chosen over per-test overrides because the alternative silently breaks any future test that addscluster-enabled yes.tests/cluster/run.tcl,.github/workflows/external.yml,utils/create-cluster/create-cluster— the three places that start cluster nodes without going throughdefault.conf(git grep cluster-enabledconfirms there are no others).create-clustergets aBUS_PROTECTED_MODEvariable, overridable fromconfig.shlike the existingPROTECTED_MODE.Documentation
redis.confgains a documented block in the REDIS CLUSTER section explaining what the bus port exposes, whattls-clusterauthenticates, and when waiving is acceptable.tls-auth-clientsgains a paragraph recording that it governs the client port only and cannot weaken the cluster bus, since that is the property the startup check relies on. The TLS section'stls-clusternote is also rewritten — it described the option as a way to encrypt the bus, and stated a default that a cluster node no longer has, neither of which reflects what the option is for.TLS.mdgains a Cluster bus protection section describing what the cluster bus port exposes, whattls-clusterverifies in each direction, that it is independent oftls-auth-clients, and the new default. Previously the guide stated only that--tls-cluster yesmakes Redis Cluster use TLS across nodes.The Getting Started section also now describes
tls-auth-clients, which the guide did not cover before although theredis-cliexample depends on it: clients on a TLS port are required to present a certificate by default,noaccepts none andoptionalvalidates one only when offered, both apply to the client port only, andtls-auth-clients-usermaps a validated certificate's Common Name to a Redis ACL user.Note
High Risk
Breaking startup for non-TLS Redis Cluster until operators waive protection or enable tls-cluster; changes cluster security defaults and CONFIG SET behavior around tls-cluster.
Overview
Adds
cluster-bus-port-protected-mode(default yes): cluster nodes fail startup whencluster-enabledis on, protection is on, andtls-clusteris off, unless the operator setscluster-bus-port-protected-mode noto acknowledge a bus reachable only by trusted hosts. Waived setups log a warning once at startup and when the bus loses TLS at runtime.Enforcement runs after the full config load (includes + CLI) and on
CONFIG SETviaapplyTlsCluster/applyClusterBusPortProtectedMode, so atomic pairs liketls-cluster no+cluster-bus-port-protected-mode nowork in either order;applyTlsClusteralso no-ops whentls-clusterdid not actually change, avoiding spurious TLS rebuilds and module topology notifications on refused or rolled-back sets.Breaking: existing non-TLS clusters must add
cluster-bus-port-protected-mode no(or enabletls-cluster). Test harness, external CI cluster job, andcreate-clusterwaive protection where they start plain cluster nodes. New tests cover protection defaults, include ordering, TLS bus cert requirements vstls-auth-clients, and topology-change behavior.Docs:
redis.confandTLS.mdexplain bus risk, thattls-clusterauthenticates the bus independently oftls-auth-clients, and the new option.Reviewed by Cursor Bugbot for commit 3baaa58. Bugbot is set up for automated code reviews on this repo. Configure here.