Repository navigation
Tighten default Jolokia access policy and bind the web console to loopback - #2639
Merged
jbonofre merged 1 commit intoOct 16, 2026
Merged
Conversation
…pback - jolokia-access.xml: list the allowed read-only operations explicitly instead of a wildcard, list the allowed origins for strict checking, and let denied operation names match a name sent with its signature - jetty-spring.properties: bind the http/https connectors to 127.0.0.1 - JettyServerBean: -Djetty.host overrides the connector bind address - add tests evaluating the shipped Jolokia policy and Jetty configuration
cshannon
approved these changes
Oct 12, 2026
cshannon
left a comment
Contributor
There was a problem hiding this comment.
As this is just hardening and Jolokia is already locked down to admins only now it probably can just go into 6.4.0, but a 6.3.x backport is fine too. Either way.
Member
Author
|
@cshannon let's keep that for 6.4.0 only (no need to backport on 6.3.x). |
mattrpav
added a commit
that referenced
this pull request
Oct 21, 2026
…pback (#2639) (#2721) - jolokia-access.xml: list the allowed read-only operations explicitly instead of a wildcard, list the allowed origins for strict checking, and let denied operation names match a name sent with its signature - jetty-spring.properties: bind the http/https connectors to 127.0.0.1 - JettyServerBean: -Djetty.host overrides the connector bind address - add tests evaluating the shipped Jolokia policy and Jetty configuration (cherry picked from commit 58c1f02) Co-authored-by: JB Onofré <jbonofre@apache.org>
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.
Default configuration changes for the web console and the Jolokia REST API.
conf/jolokia-access.xml<allow>lists the read-only broker operations explicitly (browse, queries, health, scheduled job listing, cursor state) instead of a wildcard onorg.apache.activemq:*. Jolokia consults<allow>only for command types that are not in<commands>(write, exec) and does not consult<deny>for them, so the list has to be explicit. The file now documents how the three sections combine.<cors>lists the console's loopback origins (localhost,127.0.0.1,[::1]on the default http and https ports) for strict checking.<deny>end with*so they also match a name sent with its signature, e.g.purge().conf/jetty-spring.propertiesandJettyServerBeanjetty.http.hostandjetty.ssl.hostare set to127.0.0.1, so the connectors bind loopback by default as they did before the move toconf/jetty/*.xml.-Djetty.host=<address>overrides both again. The Docker entrypoint passes it.Behaviour changes
<allow>.Originheader matching an<allow-origin>entry. Add the scheme, host and port the console is reached through if it differs from the defaults.jetty-spring.propertiesneed to add the two host lines to get the loopback binding.Tests
JolokiaAccessPolicyTestevaluates the shipped policy with Jolokia'sPolicyRestrictor: every operation of the broker MBean interfaces (bare name and with signature), attribute writes and reads, and origins.JettyBindAddressTestapplies the shipped Jetty XML files and properties and checks the connector hosts.JettyServerBeanTestcovers the configured host and the-Djetty.hostoverride.