allthingssecurity commented on PR #29047:
URL: https://github.com/apache/camel/pull/29047#issuecomment-6598834493

   Thanks Claus, all five are in 0bd35f926705 (on top of your rebase).
   
   1. Kept the design rule. `JbangDevMcpServer` now takes 
`ToolRegistry.httpTools()` instead of `allTools()`: every shared tool except 
the chaos tools that change rules, so over HTTP chaos only lists and reports 
again (`chaos_list` and `chaos_report` stay; `chaos_add`, `chaos_change`, 
`chaos_remove` and `chaos_clear` are left out). I left out remove and clear 
too, so the component page can say again that a rule cannot be added, changed 
or removed over HTTP. I did not leave out every destructive tool: the dev 
server already offers `send_message`, `execute_sql`, `stop_route` and 
`stop_application`, and dropping them would change `camel run --mcp` beyond 
chaos. `JbangDevMcpServerTest` now checks over a real MCP client that the four 
are not offered and the list and report are; 
`ToolRegistryTest.overHttpChaosOnlyListsAndReports` checks that these four are 
the only tools left out. The design (Control and Risks), the chaos page (with 
its catalog copy) and the security model say again that r
 ules never come over the HTTP server of the application, and the contradictory 
Risks sentence is gone. One scope note: `camel mcp --http` is a separate 
process the developer starts, and it serves the chaos tools with their hints 
and the access levels, as it serves route control and SQL; the rule here is 
about the integration's own HTTP.
   2. #29046 is not merged yet, so I left the branch as it is. Whichever goes 
in second resolves "Order of work".
   3. Done. `FileCliConnectorTransport` writes the status to 
`{pid}-status.json.tmp` and moves it in place with `ATOMIC_MOVE`, and deletes 
the temporary file on stop. The re-read in `ToolRegistry.chaosSection` and its 
test are removed. `ProcessFinder` matches only `\d+-status\.json`, so it never 
sees the temporary file. New 
`FileCliConnectorTransportTest.theStatusIsMovedInPlaceAndGoesWithItsTemporaryFile`.
   4. Done: "a client that honours `destructiveHint` asks first", also on the 
chaos page.
   5. Done. With chaos off the group loads only `camel_runtime_chaos_list` and 
`camel_runtime_chaos_report`, and the fingerprint gets `|chaos off`, so a 
client that switches between an integration with chaos on and one with it off 
rebuilds its tool list.
   
   The `build (21, false)` failure is in camel-vertx-http, which this PR does 
not touch.
   
   Tests: camel-cli-connector `FileCliConnectorTransport*Test` and 
`LocalCliConnector*Test` 57/0, the camel-jbang-core AI, ask and dev server 
tests 106/0, and the camel-jbang-mcp chaos, runtime and `@McpSecured` tests 
24/0. Then 20 runs each in its own JVM, all passed: `RuntimeToolsChaosTest` 
(now without the re-read), `RuntimeToolsChaosSecurityTest`, 
`FileCliConnectorTransportTest`, `JbangDevMcpServerTest`, `ToolRegistryTest`, 
`ToolGroupsTest`, `ToolConfirmsTest`.
   
   _Claude Code on behalf of allthingssecurity_
   


-- 
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]

Reply via email to