ramu11 opened a new pull request, #29902:
URL: https://github.com/apache/camel/pull/29902
## CAMEL-26360: Propagate MCP caller identity through the common server API
### Description
This change strengthens the common Camel MCP Server API to preserve caller
identity when an MCP tool is invoked.
It ensures that transport engines can pass the authenticated caller context
through `McpServerBridge` into the Camel Exchange, allowing Camel routes and
authorization policies to access the caller's security information
independently of the underlying MCP transport implementation.
### Changes
- Propagate the caller's principal object, principal name, and roles through
`McpToolCallContext`.
- Preserve the original principal object when transferring caller identity
to the Camel Exchange.
- Expose the caller identity through the corresponding Exchange properties.
- Add bridge-level test coverage to verify propagation of the principal
object, principal name, and roles.
### Testing
Executed successfully:
```bash
mvn -pl components/camel-ai/camel-mcp-server-api -am \
-Dtest=McpServerBridgeTest \
-Dsurefire.failIfNoSpecifiedTests=false \
test
```
**Result:** BUILD SUCCESS.
### Jira
CAMEL-26360 — camel-mcp-server: Spring Boot and Quarkus engines catch up
with the Camel Main engine.
### Scope
This PR covers the common Camel MCP Server API side. Framework-specific
transport integration is handled separately.
--
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]