Authoritative Gateway8-Stage Enforcement Pipeline

8-Stage Pipeline Architecture

Every tool invocation intercepted by SICTACK passes through an authoritative 8-stage verification pipeline in strict sequential order. If any stage denies permission or requires human escalation, execution short-circuits immediately.

Architecture Overview

The interception pipeline is implemented symmetrically in both the Python SDK (PolicyEngine) and the FastAPI backend (POST /api/v1/intercept). It decouples the authorization logic entirely from the agent's language model, ensuring deterministic, reproducible decisions.

Example Interception Request Payload
{
  "agent_id": "support-agent-alpha",
  "tool_name": "send_customer_email",
  "arguments": {
    "to": "client@enterprise.com",
    "subject": "Monthly Statement",
    "attachment": "statement-nov2026.pdf"
  },
  "sensitivity": 6,
  "resource_id": "reports/statement-nov2026.pdf",
  "recipient": "client@enterprise.com",
  "intent_id": "int-7f9a2b81",
  "trace_id": "tr-99824"
}

Execution Boundary Flow

Input
ToolCall Emitted
Payload captured
Boundary
8-Stage Evaluator
Strict zero-trust gates
Decision
Verdict Output
ALLOW / DENY / APPROVE
Audit
SHA-256 Ledger
Tamper-evident record
Stage 1

Tenant & Agent Identity Verification

Validates authentication credentials (machine-to-machine API key or operator JWT bearer token). Checks that the agent identity is registered within the authenticated organization and updates the agent's last_active_at heartbeat timestamp in PostgreSQL.

Stage 2

Intent Context Resolution & Immutability Verification

If an intent_id is provided, resolves the pre-authorized IntentContext. Verifies that the intent belongs to the active tenant, is marked ACTIVE, and has not exceeded its expiration_timestamp. If invalid, fails closed with INTENT_CONTEXT_NOT_FOUND.

Stage 3

Permission Allow / Deny Lists

Compares the required tool permission against explicit denial and allowance lists:

  • If the permission is in denied_permissions: instant DENY.
  • If the permission is in require_approval_permissions: generates REQUIRE_APPROVAL.
  • If allowed_permissions is configured and the permission is omitted: fails closed with DENY.
Stage 4

Sensitivity Ceiling Enforcement

Every tool and action carries a sensitivity score (1–10). If the tool sensitivity exceeds the policy max_sensitivity or the active intent's sensitivity_ceiling, the call is rejected with SENSITIVITY_TOO_HIGH.

Stage 5

Recipient & Exfiltration Boundaries

For tools that communicate externally (emails, webhooks, messages), verifies the recipient parameter against allowed_recipients glob patterns (e.g. *@trusted-company.com). Prevents unauthorized data exfiltration.

Stage 6

Resource Scope Glob Confinement

Validates target resource paths (filesystem files, S3 keys, database tables) against allowed_resources patterns (e.g. inbox/*, reports/*). Rejects directory traversal attempts (../../etc/shadow).

Stage 7

Atomic Human Approval Nonce Verification

If an approval_id is submitted, locks the approval row in PostgreSQL, checks status is APPROVED, checks consumed == False (preventing replay attacks), matches the canonical SHA-256 action_hash, verifies unexpired TTL, and marks consumed atomically.

Stage 8

Cryptographic SHA-256 Audit Trail Chaining

Appends an immutable audit event to the tenant's sequential hash chain with an atomic sequence_number, previous-entry hash linkage, and computed SHA-256 entry_hash before dispatching the response.

Short-Circuiting & Fail-Closed Guarantees

Fail-Closed Short-Circuit Evaluation

If an action fails at Stage 3 (explicit denial), subsequent stages (such as recipient verification or approval checks) are bypassed, and Stage 8 immediately records the denial event. The underlying tool is never executed, and no resources are consumed.