|
Entropic 2.3.8
Local-first agentic inference engine
|
Per-identity MCP authorization with runtime grant/revoke. More...
#include <entropic/mcp/mcp_authorization.h>
Public Member Functions | |
| void | register_identity (const std::string &identity_name) |
| Register an empty key set for an identity. | |
| bool | is_enforced (const std::string &identity_name) const |
| Check if an identity has authorization enforcement enabled. | |
| entropic_error_t | grant (const std::string &identity_name, const std::string &pattern, MCPAccessLevel level) |
| Grant a tool key to an identity. | |
| entropic_error_t | revoke (const std::string &identity_name, const std::string &pattern) |
| Revoke a tool key from an identity. | |
| bool | check_access (const std::string &identity_name, const std::string &tool_name, MCPAccessLevel required_level) const |
| Check if a tool call is authorized for an identity. | |
| entropic_error_t | grant_from (const std::string &granter_name, const std::string &grantee_name, const std::string &pattern, MCPAccessLevel level) |
| One identity grants a key to another identity. | |
| std::vector< MCPKey > | list_keys (const std::string &identity_name) const |
| List all keys for an identity. | |
| std::string | serialize_all () const |
| Serialize all identity key sets to JSON. | |
| bool | deserialize_all (const std::string &json) |
| Deserialize all identity key sets from JSON. | |
| void | unregister_identity (const std::string &identity_name) |
| Remove an identity's key set (disables enforcement). | |
Per-identity MCP authorization with runtime grant/revoke.
Definition at line 41 of file mcp_authorization.h.
| bool entropic::MCPAuthorizationManager::check_access | ( | const std::string & | identity_name, |
| const std::string & | tool_name, | ||
| MCPAccessLevel | required_level | ||
| ) | const |
Check if a tool call is authorized for an identity.
| identity_name | Caller identity. |
| tool_name | Fully-qualified tool name. |
| required_level | Minimum access level needed. |
| identity_name | Caller identity. |
| tool_name | Fully-qualified tool name. |
| required_level | Minimum access level. |
Definition at line 94 of file mcp_authorization.cpp.
| bool entropic::MCPAuthorizationManager::deserialize_all | ( | const std::string & | json | ) |
Deserialize all identity key sets from JSON.
| json | JSON object string. |
| json | JSON object string. |
Definition at line 187 of file mcp_authorization.cpp.
| entropic_error_t entropic::MCPAuthorizationManager::grant | ( | const std::string & | identity_name, |
| const std::string & | pattern, | ||
| MCPAccessLevel | level | ||
| ) |
Grant a tool key to an identity.
| identity_name | Target identity. |
| pattern | Tool pattern string. |
| level | Access level to grant. |
| identity_name | Target identity. |
| pattern | Tool pattern. |
| level | Access level. |
Definition at line 52 of file mcp_authorization.cpp.
| entropic_error_t entropic::MCPAuthorizationManager::grant_from | ( | const std::string & | granter_name, |
| const std::string & | grantee_name, | ||
| const std::string & | pattern, | ||
| MCPAccessLevel | level | ||
| ) |
One identity grants a key to another identity.
One identity grants a key to another.
| granter_name | Identity performing the grant. |
| grantee_name | Identity receiving the key. |
| pattern | Tool pattern to grant. |
| level | Access level to grant. |
| granter_name | Granting identity. |
| grantee_name | Receiving identity. |
| pattern | Tool pattern. |
| level | Access level. |
Definition at line 123 of file mcp_authorization.cpp.
| bool entropic::MCPAuthorizationManager::is_enforced | ( | const std::string & | identity_name | ) | const |
Check if an identity has authorization enforcement enabled.
Check if an identity has enforcement enabled.
| identity_name | Identity/tier name. |
| identity_name | Identity/tier name. |
Definition at line 37 of file mcp_authorization.cpp.
| std::vector< MCPKey > entropic::MCPAuthorizationManager::list_keys | ( | const std::string & | identity_name | ) | const |
List all keys for an identity.
| identity_name | Identity to query. |
| identity_name | Identity to query. |
Definition at line 154 of file mcp_authorization.cpp.
| void entropic::MCPAuthorizationManager::register_identity | ( | const std::string & | identity_name | ) |
Register an empty key set for an identity.
| identity_name | Identity/tier name. |
After registration, the identity has ZERO authorized tools.
| identity_name | Identity/tier name. |
Definition at line 23 of file mcp_authorization.cpp.
| entropic_error_t entropic::MCPAuthorizationManager::revoke | ( | const std::string & | identity_name, |
| const std::string & | pattern | ||
| ) |
Revoke a tool key from an identity.
| identity_name | Target identity. |
| pattern | Tool pattern string. |
| identity_name | Target identity. |
| pattern | Tool pattern. |
Definition at line 73 of file mcp_authorization.cpp.
| std::string entropic::MCPAuthorizationManager::serialize_all | ( | ) | const |
Serialize all identity key sets to JSON.
Definition at line 170 of file mcp_authorization.cpp.
| void entropic::MCPAuthorizationManager::unregister_identity | ( | const std::string & | identity_name | ) |
Remove an identity's key set (disables enforcement).
Remove an identity's key set.
| identity_name | Identity to unregister. |
| identity_name | Identity to unregister. |
Definition at line 215 of file mcp_authorization.cpp.