Skip to content

Add runtime policy, revocation, and audit correlation for generated tools #2543

@vaddisrinivas

Description

@vaddisrinivas

Summary

Add runtime policy enforcement for externally provided generated tools, including provider/capability revocation and audit correlation.

Background

OpenHuman has a generic policy middleware and approval/audit primitives. External generated tools need generic runtime enforcement so provider trust, capability status, risk, approvals, and execution audit can be checked on every call.

Acceptance criteria

  • Add config-backed runtime policy rules for generated tools by provider id, tool name/capability id, and risk level.
  • Policy supports allow, deny, and approval-required outcomes.
  • Provider or capability revocation takes effect before tool execution.
  • Policy decisions include structured denial/approval reasons suitable for diagnostics.
  • Tool execution audit can correlate provider id, capability id, risk, policy decision, approval id when present, and final execution outcome.
  • Default behavior remains backward-compatible for existing tools unless generated-tool runtime enforcement is enabled.
  • Add focused Rust tests for allow, deny, approval-required, revoked provider/capability, and audit correlation paths.

Non-goals

  • Do not add any runtime-specific bundle format.
  • Do not implement OS sandboxing.
  • Do not add frontend policy editors in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions