CAMEL-24218: Add Security-First execution layer to Camel JBang MCP Server - #25046
Closed
oscerd wants to merge 1 commit into
Closed
CAMEL-24218: Add Security-First execution layer to Camel JBang MCP Server#25046oscerd wants to merge 1 commit into
oscerd wants to merge 1 commit into
Conversation
…rver Adds access control, audit logging, and output sanitization for the MCP server's 63 tools via a CDI interceptor. New classes: - McpAccessLevel: enum (readonly/readwrite/admin) controlling tool visibility - McpSecured: CDI interceptor binding annotation - McpSecurityInterceptor: enforces access policy, logs audit trail, redacts secrets - McpSecurityConfig: Quarkus config properties for security settings - McpAuditLog: structured audit logging to 'camel.mcp.audit' category - OutputSanitizer: redacts passwords, tokens, AWS keys from tool output All 19 tool classes annotated with @McpSecured. Configuration via: - camel.mcp.security.access-level (readonly|readwrite|admin, default: admin) - camel.mcp.security.audit.enabled (default: false) - camel.mcp.security.redact-secrets (default: true) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Contributor
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 1 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 1). Skip-tests mode would test 1 modules (1 direct + 0 downstream), skip tests for 0 (generated code, meta-modules) Modules Scalpel would test (1)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Security-First execution layer to the Camel JBang MCP Server via a CDI interceptor, covering:
@Tool.Annotationshintscamel.mcp.auditcategoryJsonObjecttool responsesNew classes
McpAccessLevelMcpSecured@InterceptorBindingannotationMcpSecurityInterceptorMcpSecurityConfig@ConfigProperty)McpAuditLogOutputSanitizerConfiguration properties
camel.mcp.security.access-leveladminreadonly,readwrite, oradmincamel.mcp.security.audit.enabledfalsecamel.mcp.security.redact-secretstrueAll 19 tool classes annotated with
@McpSecured.Test plan
McpAccessLevelTest— parsing, tool-allow logic for all three levelsOutputSanitizerTest— JSON key redaction, bearer tokens, AWS keys, generic patterns, null safetyClaude Code on behalf of oscerd
🤖 Generated with Claude Code