justinmclean opened a new pull request, #4608: URL: https://github.com/apache/iggy/pull/4608
## Which issue does this PR address? Relates to #4589 ## Rationale A read-only MCP server could not keep an agent's place on a stream. Storing or deleting a consumer offset, and polling with `auto_commit` or `strategy = "next"`, needed `update` or `delete`, which also allow changes to streams, topics, users and permissions. The broker only asks for poll permission on offsets, and the MCP server always uses its own consumer. ## What changed? `store_consumer_offset`, `delete_consumer_offset` and auto-committing `poll_messages` required the `update` or `delete` MCP permission. They now need only `read`, matching the broker's rule (`Permissioner::store_consumer_offset` and `delete_consumer_offset` both check poll permission). The README permissions table and the `poll_messages` tool description are updated, and the README now warns not to give `iggy.consumer` the same name as an application's consumer, since `read` alone can move its offsets. `should_reject_mutating_tools_with_read_only_permissions` no longer expects these calls to be rejected, and now checks that store, delete, auto-commit and `next` work with read-only permissions. ## Local Execution - Passed: `cargo fmt --all -- --check`, `cargo clippy -p iggy-mcp -p integration --tests -- -D warnings`, and the MCP integration tests (`cargo test -p integration --test mod mcp::`). - Pre-commit hooks ran ## AI Usage 1. Claude (Claude Code). 2. Made the permission, README and test changes hubcio asked for in #4589. 3. Checked the broker's offset permission rules in `core/metadata/src/permissioner/permissioner_rules/consumer_offsets.rs`, and ran the checks listed above. 4. Yes. -- 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]
