This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch doc-sync/CAMEL-24576-4_22-upgrade-guide in repository https://gitbox.apache.org/repos/asf/camel.git
commit fbe9b91ad172629a3ffcdabb45764768b7e5caef Author: Claus Ibsen <[email protected]> AuthorDate: Tue Sep 1 16:55:38 2026 +0200 CAMEL-24576: doc-sync 4.22 upgrade guide for dynamic-router backport Backporting the dynamic-router-control predicate gate to camel-4.22.x (#26011) requires the matching upgrade-guide note on main's camel-4x-upgrade-guide-4_22.adoc, per the project's backport upgrade-guide policy. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../ROOT/pages/camel-4x-upgrade-guide-4_22.adoc | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc index 91118ac92bf5..1b004aa7bad8 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc @@ -13,6 +13,39 @@ See the xref:camel-upgrade-recipes-tool.adoc[documentation] page for details. == Upgrading from 4.22.0 to 4.22.1 +=== camel-dynamic-router + +The `dynamic-router-control` endpoint no longer takes the subscription `predicate`, or the +`expressionLanguage` used to compile it, from the incoming control message. A control message that +supplies either is now rejected with an `IllegalArgumentException`. + +The predicate is compiled and then evaluated against every exchange on the channel, so letting the +control message choose both the language and the expression means the sender of that message decides +what runs inside the Camel process. Only enable this when control messages can only come from a +trusted source: + +[source,java] +---- +from("kafka:subscriptions") + .unmarshal().json(DynamicRouterControlMessage.class) + .to("dynamic-router-control:subscribe?allowPredicateFromMessage=true"); +---- + +The option is annotated `security = "insecure:dev"`, so with `camel.main.profile = prod` the default +policy for that category is `fail`, and an endpoint that sets `allowPredicateFromMessage=true` will +not start unless you relax `camel.security.insecureDevPolicy`. + +Two alternatives avoid the flag entirely. A control message may still name a `predicateBean`, which +selects a `Predicate` that the route author bound in the registry; that path is unchanged. The +control endpoint may also carry `predicate` and `expressionLanguage` as URI parameters, in which case +every subscription made through that endpoint uses the route author's expression. Subscription +parameters that the control message does not carry now fall back to the values configured on the +endpoint. + +The `dynamic-router` endpoint gained an `allowedSchemes` option, an optional comma-separated +allow-list of component schemes that a subscription destination may resolve to. It is unset by +default, which allows any scheme, matching the previous behaviour. + === camel-exec `allowControlHeaders` is now annotated `security = "insecure:dev"`.
