Interface McpConsumerResolver
public interface McpConsumerResolver
Names the consumer behind an MCP request. The host supplies it: a Spring host reads
the authenticated principal its transport's context extractor recorded, a servlet
host reads the session user. The name it returns becomes the principal of every job
the served tool runs as (
Job.workflow(consumer, "mcp")), which is what the
tool's own auth and admission guardrails judge; the groups it returns are what the
host's McpAccessPolicy may grant by.
Null or a throw both mean unauthenticated. The serving layer fails closed on each: nothing is listed and no tool is called.
- Since:
- 0.1 (2026-09-02)
- Author:
- Andrey Santrosyan
-
Method Summary
Modifier and TypeMethodDescriptionresolve(io.modelcontextprotocol.common.McpTransportContext context)
-
Method Details
-
resolve
-