REQ-MCP-010: Per-identity MCP key authorization is opt-in but default-deny once enabled¶
What it requires
- Given an unregistered identity, When a tool is checked, Then it passes; Given a registered identity with no keys, Then every tool is denied; Given a grant of "filesystem.*" at READ and an exact grant of "filesystem.read_file" at WRITE, Then the exact grant wins for that tool; Given a granter lacking the key or holding a lower level, Then grant_from returns ENTROPIC_ERROR_PERMISSION_DENIED; an unregistered granter or grantee returns ENTROPIC_ERROR_IDENTITY_NOT_FOUND; serialize/deserialize round-trips the full set.
- tier
- NOT_RUN
How it is met
Implemented by
check_accesssrc/mcp/mcp_authorization.cpp:108check_mcp_authorizationsrc/mcp/tool_executor.cpp:790entropic_check_mcp_keysrc/facade/entropic.cpp:4718entropic_deserialize_mcp_keyssrc/facade/entropic.cpp:4819entropic_grant_mcp_keysrc/facade/entropic.cpp:4676entropic_grant_mcp_key_fromsrc/facade/entropic.cpp:4772entropic_list_mcp_keyssrc/facade/entropic.cpp:4742entropic_revoke_mcp_keysrc/facade/entropic.cpp:4698entropic_serialize_mcp_keyssrc/facade/entropic.cpp:4797find_best_matchsrc/mcp/mcp_key_set.cpp:198has_accesssrc/mcp/mcp_key_set.cpp:66is_enforcedsrc/mcp/mcp_authorization.cpp:42server_wildcardsrc/mcp/mcp_key_set.cpp:176
Tests (108)
Reached through calls
108 tests: 108 absent
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
MCP key full round-trip on configured handle (best effort) | absent | inferred | 5 of 13 | 1 |
MCP key grant and check round-trip | absent | inferred | 4 of 13: check_access, entropic_check_mcp_key, entropic_grant_mcp_key, entropic_revoke_mcp_key | 1 |
MCPKeySet READ does not authorize WRITE | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet WRITE implies READ | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet concurrent grant, revoke, and check | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet concurrent serialize and deserialize | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet deserialize skips invalid entries | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet empty denies all | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet exact match READ | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet exact match WRITE | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet full wildcard match | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet grant can downgrade | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet grant updates level | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet most specific wins: exact over wildcard | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet most specific wins: server over full | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet revoke removes access | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet serialize roundtrip | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
MCPKeySet server wildcard match | absent | inferred | 3 of 13: find_best_match, has_access, server_wildcard | 1 |
create registers MCP keys | absent | inferred | 2 of 13: check_access, is_enforced | 1 |
entropic_check_mcp_key on configured handle returns int verdict | absent | inferred | 2 of 13: check_access, entropic_check_mcp_key | 1 |
entropic_check_mcp_key returns -1 on NULL handle | absent | inferred | 2 of 13: check_access, entropic_check_mcp_key | 1 |
entropic_check_mcp_key returns -1 on unconfigured handle | absent | inferred | 2 of 13: check_access, entropic_check_mcp_key | 1 |
update refreshes MCP keys | absent | inferred | 2 of 13: check_access, is_enforced | 1 |
Grant from valid granter succeeds | absent | inferred | 1 of 13: check_access | 1 |
Grant then check succeeds | absent | inferred | 1 of 13: check_access | 1 |
Identity with READ-only keys is denied WRITE access | absent | inferred | 1 of 13: check_access | 1 |
MCP key serialize/deserialize round-trip | absent | inferred | 1 of 13: entropic_serialize_mcp_keys | 1 |
Registered empty identity denies all | absent | inferred | 1 of 13: check_access | 1 |
Revoke then check fails | absent | inferred | 1 of 13: check_access | 1 |
Serialize all roundtrip | absent | inferred | 1 of 13: check_access | 1 |
Unregister disables enforcement | absent | inferred | 1 of 13: check_access | 1 |
Unregistered identity passes authorization | absent | inferred | 1 of 13: check_access | 1 |
destroy unregisters MCP keys | absent | inferred | 1 of 13: is_enforced | 1 |
entropic_deserialize_mcp_keys on unconfigured handle returns INVALID_STATE | absent | inferred | 1 of 13: entropic_deserialize_mcp_keys | 1 |
entropic_deserialize_mcp_keys with empty JSON object on configured handle | absent | inferred | 1 of 13: entropic_deserialize_mcp_keys | 1 |
entropic_deserialize_mcp_keys with malformed JSON returns INVALID_CONFIG | absent | inferred | 1 of 13: entropic_deserialize_mcp_keys | 1 |
entropic_grant_mcp_key on NULL handle returns INVALID_HANDLE | absent | inferred | 1 of 13: entropic_grant_mcp_key | 1 |
entropic_grant_mcp_key on configured handle exercises mcp_auth path | absent | inferred | 1 of 13: entropic_grant_mcp_key | 1 |
entropic_grant_mcp_key on unconfigured handle returns INVALID_STATE | absent | inferred | 1 of 13: entropic_grant_mcp_key | 1 |
entropic_grant_mcp_key_from on configured handle exercises grant_from | absent | inferred | 1 of 13: entropic_grant_mcp_key_from | 1 |
entropic_grant_mcp_key_from on unconfigured handle returns INVALID_STATE | absent | inferred | 1 of 13: entropic_grant_mcp_key_from | 1 |
entropic_list_mcp_keys on configured handle returns JSON or NULL | absent | inferred | 1 of 13: entropic_list_mcp_keys | 1 |
entropic_list_mcp_keys returns NULL on NULL handle | absent | inferred | 1 of 13: entropic_list_mcp_keys | 1 |
entropic_list_mcp_keys returns NULL on unconfigured handle | absent | inferred | 1 of 13: entropic_list_mcp_keys | 1 |
entropic_revoke_mcp_key on configured handle exercises mcp_auth path | absent | inferred | 1 of 13: entropic_revoke_mcp_key | 1 |
entropic_revoke_mcp_key on unconfigured handle returns INVALID_STATE | absent | inferred | 1 of 13: entropic_revoke_mcp_key | 1 |
entropic_serialize_mcp_keys on configured handle returns JSON | absent | inferred | 1 of 13: entropic_serialize_mcp_keys | 1 |
entropic_serialize_mcp_keys returns NULL on NULL handle | absent | inferred | 1 of 13: entropic_serialize_mcp_keys | 1 |
entropic_serialize_mcp_keys returns NULL on unconfigured handle | absent | inferred | 1 of 13: entropic_serialize_mcp_keys | 1 |
is_enforced correct | absent | inferred | 1 of 13: is_enforced | 1 |
A call that fails identically is refused rather than retried | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Anti-spiral hard block stops dispatch and emits | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Anti-spiral hard block uses derived default when sentinel set | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Auto approve skips callback | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Chained POST_TOOL_CALL hooks: last write wins | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Circuit breaker at three | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Duplicate counter resets | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Duplicate detection skips | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Error result not cached for dedup | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Headless mode denies without callback | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Max tool calls per turn | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Multiple tool calls in batch | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL fires on duplicate rejection with kind | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL fires on schema rejection with kind | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL hook transforms duplicate-rejection content | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL hook transforms schema-rejection content | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL hook transforms successful tool result content | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
POST_TOOL_CALL with *modified_json == NULL leaves content untouched | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
PRE/POST_TOOL_CALL fire for successful calls | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POST | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Permission denied returns feedback | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Process single tool call | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Schema validation rejects invalid enum value | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Schema validation rejects missing required field | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Tool call history records successful executions | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Tool emits directives → ToolExecutor extracts + dispatches them | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
Tool executor processes calls via ServerManager | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
effective_max_tool_calls_per_turn overrides global limit | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#143: an argument-free call serialises as an object | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#143: an argument-free call to a no-required-fields tool | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#143: dispatch converts a throwing tool into a tool error | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#168: the rewrite is visible to the dup cache and POST hook | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#190: a structured JSON error counts as a failure everywhere | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#211: a tier that declares an EMPTY allowlist may call nothing | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#83: allowlisted tool dispatches normally | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#83: empty locked_tier bypasses enforcement | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#83: no map wired = pass-through (pre-v2.5.2 behavior) | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#83: off-allowlist tool is rejected_unauthorized at dispatch | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#83: tier with no allowlist entry is unrestricted | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
mcp.bash.timeout_seconds reaches the dispatched bash server | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
process_single_call completes with locked_tier set | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
v2.14.0: schema validation enforces declared minimum and maximum | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
v2.14.6: a headless host still dispatches engine directives | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 4 |
gh#158: a delegated child's read satisfies its parent's write — | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#158: a session's tool call never resolves inside another | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#158: repeated sandbox swaps race nothing a concurrent | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#158: two sessions reading and writing through ONE filesystem | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#158: two sessions writing todos through ONE entropic server | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#168: a PRE_TOOL_CALL hook's modified args reach the tool | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#168: a malformed modification is refused, not half-applied | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#168: a modification that renames the tool is refused | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#168: a non-zero return still cancels, modification or not | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 5 |
gh#158: clearing the default conversation releases the default | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 6 |
gh#158: each session's todo list is its own | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 6 |
gh#158: ending a session's conversation releases its read | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 6 |
gh#158: read-before-write is judged per session — another | absent | inferred | 3 of 13: check_access, check_mcp_authorization, is_enforced | 6 |