davsclaus commented on PR #28539:
URL: https://github.com/apache/camel/pull/28539#issuecomment-6439682741
@allthingssecurity a follow-up for later, not for this PR.
**Stage 1** (this design): chaos at a specific place, such as an endpoint, a
step or a route entry, with the rule syntax as written here.
**Stage 2**, once the stage 1 code is merged and we have tried it for real
with the CLI, an AI and the TUI: people will want to just prompt what they mean
and let the AI figure out the rules. For example:
> the order route should have chaos, by failing 5% or when a message origin
country is spain
Against the current design that prompt hits two gaps:
1. **Failing a route.** The natural reading is "5% of the messages that
enter the order route fail", so `route=orders error rate=0.05`. Today that is
rejected, as route entry offers only `corrupt`. The AI would have to look up
the sends and steps of the route and write one rule for each, which turns one
intent into several rules, with the counts spread out and other routes hit when
an endpoint is shared. Letting route entry offer `error` (and maybe `delay`)
keeps "one kind of target per hook" and covers this. The "sends of route X"
filter can still come later.
2. **A condition on the message.** A rule fires only by `rate` or `every:N`.
"When the origin country is Spain" needs a predicate, for example
`when="${header.originCountry} == 'ES'"` in Simple. The rule comes from the
developer or their AI, not from the message, so that stays within the trusted
side of the security model.
"Or" then means two rules: `rate=0.05`, and `when=...` without a rate. The
report shows each on its own.
We will learn more from trying stage 1 hands-on; this is input for that
round.
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]