GROOVY-12348: JmxBuilder: listen where the connector was asked to listen - #2870
Merged
Conversation
The model said Groovy is not deployed as a network service and listed such a tool as a future condition, while `groovy -l` and JmxBuilder connector servers already shipped. Both are development tools rather than services: they run only where an operator started one, they bind loopback unless given a wider address, and neither evaluates what a peer sends as code. They belong with the shell and console tools in §9, so §2 carries them in the interactive tools row rather than as an exception to the framing. §7 gains the peer as an adversary and the closed capability list gains connecting to such a listener. The two differ in what they offer: a line reaches `groovy -l` as the `line` binding and a script that evaluates it has opted into §3, whereas a connector server offers whatever its MBean server holds, which for the platform server includes dumping the heap and running diagnostic commands. §9 records that neither authenticates or encrypts by default, and gives connector servers their own false-friends row: every connector security property was assembled and discarded between 2008 and 2026, so no configuration produced a secured connector in that window and none can have been relied upon. §10 tells whoever widens a listener what they take on, and §12 says why a loopback-bound development tool does not meet its condition and what would.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2870 +/- ##
==================================================
+ Coverage 70.9418% 70.9642% +0.0224%
- Complexity 37054 37190 +136
==================================================
Files 1576 1578 +2
Lines 134857 135226 +369
Branches 24973 25049 +76
==================================================
+ Hits 95670 95962 +292
- Misses 30530 30570 +40
- Partials 8657 8694 +37
🚀 New features to boost your workflow:
|
connectorServer takes a host, defaulting to localhost, but it reached only the service URL. The authority before /jndi/ was left empty, which exports the RMI object on every interface, so host named the registry the stub was bound into and never restricted the listener. A connector asked for localhost was reachable from any host that could route to the port, and since the default MBean server is the platform one, that offered HotSpotDiagnostic.dumpHeap and the DiagnosticCommand operations to whoever arrived. The connector now binds the host it was given. Both halves are needed: the server socket factory decides where the exported object listens, and the stub carries the client factory, which decides where a client dials. Binding without the second leaves clients dialling the host RMI advertises, where nothing is listening. A caller who supplied either factory keeps their own, so the SSL path is untouched, and a wildcard host still listens everywhere. Starting a connector that both reaches other hosts and authenticates nobody now warns. A connector confined to loopback stays quiet, so the warning marks the case where a peer other than the operator can arrive. The documentation recorded that its own example failed on Mac and CentOS 5 under Groovy 1.6 and wondered about /etc/hosts. The example fails because it does not create the RMI registry, which the corrected example below it already showed, so it now says that and describes what the connector exposes and to whom.
paulk-asert
force-pushed
the
groovy12348
branch
from
September 3, 2026 05:20
2034875 to
7b40c25
Compare
🚨 TestLens detected 3 failed tests 🚨Here is what you can do:
Test SummaryBuild and test / lts (17, windows-latest, 1) > :groovy-groovysh:test
🏷️ Commit: 7b40c25 Test FailuresGroovyPosixCommandsTest > headAndGrepAndWcStripControlCharactersFromNames() (:groovy-groovysh:test in Build and test / lts (17, windows-latest, 1))GroovyPosixCommandsTest > lsStripsControlCharactersFromFileNames() (:groovy-groovysh:test in Build and test / lts (17, windows-latest, 1))GroovyPosixCommandsTest > lsStripsControlCharactersFromSymlinkTargets() (:groovy-groovysh:test in Build and test / lts (17, windows-latest, 1))Rerun ControlsSelect tests to mute in this pull request:
Reuse successful test results:
Click the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app/docs. |
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.
connectorServer takes a host, defaulting to localhost, but it reached only the service URL. The authority before /jndi/ was left empty, which exports the RMI object on every interface, so host named the registry the stub was bound into and never restricted the listener. A connector asked for localhost was reachable from any host that could route to the port, and since the default MBean server is the platform one, that offered HotSpotDiagnostic.dumpHeap and the DiagnosticCommand operations to whoever arrived.
The connector now binds the host it was given. Both halves are needed: the server socket factory decides where the exported object listens, and the stub carries the client factory, which decides where a client dials. Binding without the second leaves clients dialling the host RMI advertises, where nothing is listening. A caller who supplied either factory keeps their own, so the SSL path is untouched, and a wildcard host still listens everywhere.
Starting a connector that both reaches other hosts and authenticates nobody now warns. A connector confined to loopback stays quiet, so the warning marks the case where a peer other than the operator can arrive.
The documentation recorded that its own example failed on Mac and CentOS 5 under Groovy 1.6 and wondered about /etc/hosts. The example fails because it does not create the RMI registry, which the corrected example below it already showed, so it now says that and describes what the connector exposes and to whom.