LEVEL 4 · SYSTEMS

Tool Call Firewall

Build a deny-by-default policy evaluator with bounded arguments, role permissions, single-use approvals and a structured audit log. The artifact is a library gate; applications must place it before every real tool execution.

4 stages~8 hoursRustcore
Validate an unambiguous call envelopeEvaluate role and path policyConsume a request-bound approval onceRecord bounded audit evidence
YOU END UP WITH

An approval receipt proving exactly which operation was authorized and executed.

USEFUL FOR
  • An approval receipt proving exactly which operation was authorized and executed.
  • The native CLI requires a trusted role from the invoking application.
PROJECT OUTLINE

Tool Call Firewall in 4 stages

Authorize structured tool requests before they cross a side-effect boundary.

  1. Validate an unambiguous call envelope

    Parse a bounded four-field envelope using a pipe delimiter for this local exercise.

    starter · ~2 hours · Rust

    Byte budgetEnvelope fieldsControl gateCall identity
  2. Evaluate role and path policy

    Only reader and editor roles exist.

    core · ~2 hours · Rust

    Known rolePath componentsTool permissionDecision
  3. Consume a request-bound approval once

    An approval is bound to the complete call identity supplied by a trusted application and is consumed only for an approval-required decision.

    core · ~2 hours · Rust

    Decision gateMatch identityCheck unusedConsume once
  4. Record bounded audit evidence

    Format a stable tab-separated audit row after the policy decision.

    core · ~2 hours · Rust

    Unique callCapacity checkOmit argumentsRecord decision

Lessons this project uses

All projects · Course catalog · Source on GitHub