INT-1926: Option to disallow arbitrary routing
JIRA: https://jira.spring.io/browse/INT-1926 Add an option to mapping routers to disable falling back to the channel key as the channel name.
This commit is contained in:
committed by
Artem Bilan
parent
ef1d7be020
commit
b1dfb7bfa3
@@ -1122,6 +1122,11 @@ That map's setter method is exposed as a public method along with the 'setChanne
|
||||
These let you change, add, and remove router mappings at runtime, as long as you have a reference to the router itself.
|
||||
It also means that you could expose these same configuration options through JMX (see <<./jmx.adoc#jmx,JMX Support>>) or the Spring Integration control bus (see <<./control-bus.adoc#control-bus,Control Bus>>) functionality.
|
||||
|
||||
IMPORTANT: Falling back to the channel key as the channel name is flexible and convenient.
|
||||
However, if you don't trust the message creator, a malicious actor (who has knowledge of the system) could create a message that is routed to an unexpected channel.
|
||||
For example, if the key is set to the channel name of the router's input channel, such a message would be routed back to the router, eventually resulting in a stack overflow error.
|
||||
You may therefore wish to disable this feature (set the `channelKeyFallback` property to `false`), and change the mappings instead if needed.
|
||||
|
||||
[[dynamic-routers-control-bus]]
|
||||
===== Manage Router Mappings using the Control Bus
|
||||
|
||||
@@ -1256,7 +1261,7 @@ The `routingSlipIndex` remains unchanged.
|
||||
* When the `routingSlipIndex` exceeds the size of the routing slip `path` list, the algorithm moves to the default behavior for the standard `replyChannel` header.
|
||||
|
||||
[[process-manager]]
|
||||
===== Process Manager Enterprise Integration Pattern
|
||||
==== Process Manager Enterprise Integration Pattern
|
||||
|
||||
Enterprise integration patterns include the https://www.enterpriseintegrationpatterns.com/ProcessManager.html[process manager] pattern.
|
||||
You can now easily implement this pattern by using custom process manager logic encapsulated in a `RoutingSlipRouteStrategy` within the routing slip.
|
||||
|
||||
@@ -130,3 +130,9 @@ See <<./mongodb.adoc#mongodb, MongoDB Support>> for more information.
|
||||
|
||||
Simple Apache Avro transformers are now provided.
|
||||
See <<./transformers.adoc#avro-transformers, Avro Transformers>> for more information.
|
||||
|
||||
[[x5.2-routers]]
|
||||
==== Router Changes
|
||||
|
||||
You can now disable falling back to the channel key as the channel bean name.
|
||||
See <<./router.adoc#dynamic-routers, Dynamic Routers>> for more information.
|
||||
|
||||
Reference in New Issue
Block a user