Repository navigation
fix(#732): hide the CXF service list page by default - #740
Merged
Merged
Conversation
ServletExporter registered the CXF transport servlet with hide-service-list-page defaulting to "false" and service-list-page-authenticate defaulting to "false". Since HTTPTransportActivator registers the ManagedService, those defaults apply as-is when no org.apache.cxf.osgi configuration exists, including on the updated(null) path that a default install actually takes. Installing the feature therefore published an enumerable, unauthenticated listing of every CXF endpoint in the container at /cxf with no configuration step. Default hide-service-list-page to "true" so the listing is opt in. An operator who wants it back sets org.apache.cxf.servlet.hide-service-list-page=false in the org.apache.cxf.osgi PID, optionally with service-list-page-authenticate, whose realm already defaults to karaf. These values match historic upstream CXF defaults, but CXF 4.x ships no OSGi transport module, so this glue is maintained here and the default is ours to pick. This is visible behaviour for anyone relying on the page, so it wants a release note. Adds ServletExporterTest, which pins the default on both the empty and the null config path, checks an explicit opt in is still honoured, and checks the surrounding defaults are untouched. The module had no test sources, so this also adds the junit-jupiter and mockito test dependencies.
jbonofre
approved these changes
Aug 25, 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.
Fixes #732
What
ServletExporterregistered the CXF transport servlet with:HTTPTransportActivatorregisters theManagedService, so with noorg.apache.cxf.osgiconfiguration these defaults apply as-is — including on theupdated(null)path (:61-63), which is the shape a default install actuallytakes. Installing the feature therefore published an enumerable, unauthenticated
listing of every CXF endpoint in the container at
/cxf, with no configurationstep needed to turn it on.
How
hide-service-list-pagenow defaults to"true", making the listing opt-in.I left
service-list-page-authenticatealone: once the page is hidden bydefault, turning it on is a deliberate act, and the authentication realm already
defaults to
karaffor an operator who wants both. Flipping two defaults atonce would make the opt-in path harder to reason about.
An operator who wants the page back sets, in the
org.apache.cxf.osgiPID:which is recorded in a comment at the call site.
Tests
ServletExporterTestcaptures the whiteboard properties handed toregisterServiceand asserts:"true"for an empty configupdated(null)path — that is the one a default installexercises, and it was a separate code path
hide-service-list-page=falseis still honoured, so the opt-inworks
disable-address-updates,service-list-page-authenticate-realm,use-x-forwarded-headers, the servletpattern) are unchanged
The module had no test sources, so this adds the
junit-jupiterandmockitotest dependencies.
Notes
transport module, so this glue is maintained here now and the default is ours
to choose.
?wsdlis reachable without authentication regardless, so thisremoves a discovery convenience rather than closing a disclosure channel —
which is why it is a default change rather than a fix to the servlet itself.
note. camel-cxf: CXF OSGi servlet registers with the service-list page enabled by default #732 also asked for the PID to be documented in the camel-cxf feature
docs;
docs/modules/ROOT/pages/components.adocis currently just a pointer tocamel-features.xmlwith no per-component pages, so there is no natural placefor it yet — the call-site comment carries it yet.
Claude Code on behalf of Andrea Cosentino