|
Entropic 2.3.8
Local-first agentic inference engine
|
Permission manager for MCP tool access control. More...
#include <entropic/mcp/permission_manager.h>
Public Member Functions | |
| PermissionManager (std::vector< std::string > allow_patterns={}, std::vector< std::string > deny_patterns={}) | |
| Construct with initial allow/deny lists. | |
| bool | is_denied (const std::string &tool_name, const std::string &pattern) const |
| Check if a tool call is explicitly denied. | |
| bool | is_allowed (const std::string &tool_name, const std::string &pattern) const |
| Check if a tool call is explicitly allowed (skip prompting). | |
| void | add_permission (const std::string &pattern, bool allow) |
| Add a permission pattern at runtime. | |
Permission manager for MCP tool access control.
Default-deny model. Deny list takes precedence over allow list. Only returns false for is_denied() if a deny pattern explicitly matches. Unknown tools are not denied — the engine handles prompting for tools not in either list.
Definition at line 34 of file permission_manager.h.
| entropic::PermissionManager::PermissionManager | ( | std::vector< std::string > | allow_patterns = {}, |
| std::vector< std::string > | deny_patterns = {} |
||
| ) |
Construct with initial allow/deny lists.
| allow_patterns | Allow list patterns. |
| deny_patterns | Deny list patterns. |
| allow_patterns | Allow list patterns. |
| deny_patterns | Deny list patterns. |
Definition at line 24 of file permission_manager.cpp.
| void entropic::PermissionManager::add_permission | ( | const std::string & | pattern, |
| bool | allow | ||
| ) |
Add a permission pattern at runtime.
| pattern | Permission pattern string. |
| allow | true for allow list, false for deny list. |
| pattern | Permission pattern string. |
| allow | true for allow list, false for deny list. |
Definition at line 79 of file permission_manager.cpp.
| bool entropic::PermissionManager::is_allowed | ( | const std::string & | tool_name, |
| const std::string & | pattern | ||
| ) | const |
Check if a tool call is explicitly allowed (skip prompting).
Check if a tool call is explicitly allowed.
| tool_name | Fully-qualified tool name. |
| pattern | Tool pattern with args. |
| tool_name | Fully-qualified tool name. |
| pattern | Tool pattern with args. |
Definition at line 59 of file permission_manager.cpp.
| bool entropic::PermissionManager::is_denied | ( | const std::string & | tool_name, |
| const std::string & | pattern | ||
| ) | const |
Check if a tool call is explicitly denied.
| tool_name | Fully-qualified tool name (e.g., "filesystem.read_file"). |
| pattern | Tool pattern with args (e.g., "filesystem.read_file:/path"). |
| tool_name | Fully-qualified tool name. |
| pattern | Tool pattern with args. |
Definition at line 38 of file permission_manager.cpp.