APPROVAL_REQUIRED, Dmint persists one PENDING record and halts. A human reviews the exact request, approves or rejects it, and — if approved — gives the protected host a signed assertion for the retry.engine.retry(...) (or MCP retries with an assertion argument) and Core verifies and consumes that assertion.APPROVAL_REQUIRED │ ▼ PENDING ── reject ──► REJECTED │ approve │ ▼ APPROVED ── download/issue assertion ──► host retry │ │ │ verify + consume │ │ │ ▼ │ CONSUMED └── policy changed / expired ──► POLICY_INVALIDATED / EXPIRED
A cannot be used for arguments B; a consumed assertion cannot be replayed.dmint.dashboard.CoreClient and Core public APIs; it never issues SQL directly.dmint dashboard \ --db-path ./approvals.sqlite3 \ --approver-id alice@example.com \ --authority-issuer dmint-authority \ --port 8080
dmint dashboard \ --database-url "postgresql://user:pass@localhost:5432/dmint" \ --deployment-epoch production \ --approver-id alice@example.com \ --authority-issuer dmint-authority
127.0.0.1:8080;~/.config/dmint/signing.key (override with --key-file or DMINT_KEY_FILE);dmint-dashboard (this example sets dmint-authority so the host verifier can use the issuer printed by dmint init-keys);dmint/dashboard/v1.--allow-public-bind is explicit, and it still requires authentication. Prefer loopback behind a reverse proxy.export DMINT_DASHBOARD_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')" dmint dashboard --db-path ./approvals.sqlite3 # Or: dmint dashboard --db-path ./approvals.sqlite3 --token-file /etc/dmint/dashboard.token
0600. If no token is configured, the dashboard generates a one-time token and prints it in the startup banner. The dashboard also enforces host/origin checks, CSRF tokens, session timeouts, and login rate limiting.| Source | Meaning |
| self-asserted | The label was typed into the login form. It is an audit label, not proof of identity. |
| trusted_proxy | The label came from a configured trusted reverse-proxy header. |
| shared-token | API access with the shared bearer token; no individual human was authenticated. |
DMINT_DASHBOARD_IDENTITY_HEADER without enabling trusted-proxy mode is rejected at startup rather than silently ignored. For example:export DMINT_DASHBOARD_TRUSTED_PROXY=1 export DMINT_DASHBOARD_IDENTITY_HEADER=X-Auth-User dmint dashboard \ --db-path ./approvals.sqlite3 \ --trusted-proxy
X-Auth-User header and set it from the authenticated session. If the header is configured and missing at login, the dashboard fails the login with 401 and does not create a session. It never falls back to the form value in trusted-proxy mode. If the header disappears from an existing session, approval, rejection, and assertion-download requests fail with 401 instead of being attributed to an unauthenticated label.http://127.0.0.1:8080 and sign in.PENDING → APPROVED.GET /approvals/{approval_id}/assertion
APPROVED record, and returns it as:Content-Type: application/octet-stream Content-Disposition: attachment; filename="{approval_id}.assertion.json" Cache-Control: no-store
PENDING record returns 409 (assertion_not_available).approve_pending() is discarded. The download endpoint re-issues a fresh assertion for the same approved record, which avoids exposing a credential in the redirect response.dmint pending --db-path ./approvals.sqlite3
APPROVAL ID TOOL/ACTION RESOURCE/TARGET PRINCIPAL REQUESTED ---------------- --------------------- --------------- ---------------- --------- apr_... ledger.transfer_funds (none) finance-agent-01 2m ago
--database-url / DMINT_DATABASE_URL for PostgreSQL, and --deployment-epoch when the store uses a non-default epoch.dmint approve apr_... \ --db-path ./approvals.sqlite3 \ --policy ./policy.json \ --approver-id alice@example.com \ --authority-issuer dmint-authority \ --reason "Verified ticket #1204" \ --output-assertion ./approval.json
✓ Approved 'apr_...' (ledger.transfer_funds) successfully. Reason: Verified ticket #1204
--policy makes the CLI re-verify the current policy file and fail closed if it no longer allows the request. If omitted, the CLI first uses the store’s authoritative policy, then a local policy.json if present. approve automatically persists the signed Ed25519 assertion inside the approval store so local hosts (Dmint.local(), dmint-mcp, and dmint hook run) can consume it automatically on retry. Pass --output-assertion ./approval.json if you also want to export the signed assertion file to a separate host.dmint reject apr_... \ --db-path ./approvals.sqlite3 \ --reason "SQL targets an unapproved table"
from pathlib import Path # Option A: Automatic store lookup (when sharing the same SQLite/Postgres store): result = engine.retry(transfer_funds, "acc_100", 500.0) # Option B: Explicit assertion bytes (from --output-assertion or dashboard download): result = engine.retry( transfer_funds, "acc_100", 500.0, approval_credential=Path("./approval.json").read_bytes(), )
engine.retry verifies the signature and binding, re-evaluates the current policy, atomically consumes the approval, and then executes the function once.{ "method": "tools/call", "params": { "name": "update_database", "arguments": { "record_id": 42, "action": "archive", "_dmint_approval": "<assertion-json-string-or-object>" } } }
dmint_approval and approval_credential are also accepted. The gateway removes the reserved key before forwarding clean arguments downstream.DMT_APPROVAL_DEPLOYMENT_INVALID). Configure this on the engine/store, CLI, dashboard, and MCP gateway consistently.| Situation | Result |
Approval for $250, retry for $251 | DMT_APPROVAL_REQUEST_MISMATCH; no execution |
| Assertion replayed after consumption | DMT_APPROVAL_CONSUMED; no execution |
| Policy digest/version changed after approval | DMT_APPROVAL_POLICY_INVALID; no execution |
| Record expired | DMT_APPROVAL_EXPIRED; create a new request |
| Wrong issuer/public key | DMT_APPROVAL_ISSUER_INVALID or DMT_APPROVAL_SIGNATURE_INVALID |
| Trusted proxy identity header missing | Login fails closed; no session |
| Download requested for a non-approved record | 409; no assertion |