Consentry is a consent-integrity and authorization layer for AI agents operating through Slack.
Traditional approval systems record that a user clicked Approve. Consentry goes further by cryptographically binding approval to the exact action contract. Before execution, the requested action is reconstructed, canonicalized, hashed, and compared against the approved contract. If anything has changed, execution is denied.
This allows organizations to safely authorize high-impact AI agent actions without relying on transferable approval clicks.
As AI agents become capable of performing privileged actions, organizations increasingly rely on human approval before execution.
However, a simple approval is not sufficient.
Between approval and execution, an agent, integration, compromised middleware, or software defect could alter:
- Destination
- Parameters
- Content
- Resource
- Tool
- Execution context
Traditional approval systems generally validate only that an approval exists.
They do not verify that the executed action is identical to the one that was approved.
Consentry addresses this problem by converting approval into an immutable authorization contract.
One approval. One exact action. One time.
Each approval is bound to:
- Workspace
- Requester
- Approver
- Agent identity
- Tool
- Action
- Resource
- Destination
- Parameters
- Content digest
- Policy version
- Expiration time
- Unique token identifier
Execution is permitted only when the reconstructed request exactly matches the approved contract.
- Slack-native approval workflow
- Deterministic canonical JSON serialization (RFC 8785)
- SHA-256 payload fingerprinting
- Signed consent tokens
- One-time authorization tokens
- Token expiration
- Token revocation
- Replay protection
- Payload substitution detection
- Fail-closed authorization
- Tamper-evident audit logging
- SQLite persistence
- FastAPI API
- Public MCP server
- Slack Identity Authentication
- Security-focused dashboard
AI Agent
│
▼
Consentry Request
│
▼
Canonical JSON
│
▼
SHA-256 Fingerprint
│
▼
Slack Approval Card
│
Human Approval
│
▼
Signed Consent Token
│
▼
Execution Verification
│
├── Exact Match
│ │
│ ▼
│ Execute
│
└── Any Difference
│
▼
Deny
Before executing any protected action, Consentry verifies:
- Token signature
- Token expiration
- Revocation status
- One-time use
- Canonical payload hash
- Workspace binding
- Requester binding
- Agent identity
- Tool
- Action
- Resource
- Destination
- Parameters
- Content digest
- Policy version
Execution is denied if any verification fails.
Consentry provides:
- Approval-to-action binding
- Deterministic payload verification
- Cryptographically signed authorization
- Replay prevention
- Revocation enforcement
- Expiration enforcement
- Tamper-evident auditing
- Fail-closed authorization
Consentry assumes the following components are trusted:
- Slack identity
- Consentry service
- Canonical serialization implementation
- Signing keys
- Database
- Final execution adapter
Consentry protects only actions executed through its authorization boundary.
Consentry does not protect against:
- Human approval of malicious requests
- Compromise of Consentry secrets
- Integrations that bypass Consentry
- Side effects executed outside the protected adapter
- Omitted fields that are intentionally excluded from the approval contract
The audit log is tamper-evident rather than immutable.
app/
blocks.py
canonical.py
config.py
db.py
main.py
mcp_server.py
public_mcp.py
service.py
slack_app.py
tests/
docs/
requirements.txt
README.md
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtCopy the example configuration:
Copy-Item .env.example .envPopulate the required Slack credentials and application secrets.
Start the local dashboard:
python -m uvicorn app.main:app --reload --port 8000Start the Slack Socket Mode worker:
python -m app.slack_appStart the public MCP endpoint:
python -m uvicorn app.public_mcp:app --host 127.0.0.1 --port 8001Expose the MCP endpoint through HTTPS (for example using ngrok) and configure the Slack app to use the public /mcp endpoint.
Consentry integrates with Slack using:
- Slack Block Kit
- Socket Mode
- Slack Identity Authentication
- MCP (Model Context Protocol)
Approval requests are presented as native Slack approval cards.
Run the automated tests:
pytestRun the security proof script:
python security_proof.pyThis project is provided for demonstration and research purposes. Review and adapt the implementation before deploying it in production environments.