Ecosystem

OpenApe Grants

Human-in-the-loop permissions for agents.

OpenApe Grants

@openape/grants

The permission engine. Framework-agnostic.

Grant Lifecycle

Request β†’ Pending β†’ Approved/Denied β†’ (if approved) Active β†’ Used/Expired/Revoked

Grant Types

TypeBehavior
onceSingle use β€” consumed after first use
timedValid for a time window (TTL)
alwaysStanding permission β€” active until revoked

AuthZ-JWT

On approval, a signed AuthZ-JWT is issued:

{
  "sub": "agent@example.com",
  "aud": "target-system",
  "grant_type": "once",
  "permissions": ["deploy"],
  "cmd_hash": "sha256:a1b2c3...",
  "decided_by": "alice@example.com",
  "exp": 1234567890,
  "jti": "unique-grant-id"
}

Key security features:

  • aud binding β€” token only valid for the intended target
  • cmd_hash β€” binds to exact command (prevents substitution attacks)
  • decided_by β€” dual accountability (agent owner β‰  approver)
  • jti β€” replay protection
  • Expiry β€” all grants have a maximum lifetime

@openape/nuxt-grants

Drop-in Nuxt module for grant management. Designed to work alongside nuxt-auth-idp.

Auto-registered routes:

  • /api/grants β€” list and create grant requests
  • /api/grants/:id β€” get grant details
  • /api/grants/:id/approve β€” approve a grant
  • /api/grants/:id/deny β€” deny a grant
  • /api/grants/:id/revoke β€” revoke an active grant
  • /api/grants/:id/token β€” issue AuthZ-JWT for approved grant
  • /api/grants/verify β€” verify an AuthZ-JWT
  • /api/agent/enroll β€” register a new agent
  • /api/agent/challenge β€” request auth challenge
  • /api/agent/authenticate β€” authenticate with signed challenge

Pages (overridable):

  • /grants β€” grant dashboard
  • /grant-approval β€” approve/deny UI
  • /enroll β€” agent enrollment form

openape-sudo (apes)

A Rust binary for local privilege elevation via the grant system.

# Install
cargo build --release
sudo make install  # installs to /usr/local/bin/apes with setuid

# Enroll
sudo apes enroll --server https://id.example.com --agent-name my-server

# Use
apes --reason "Security update" -- apt-get upgrade

Security Model

  • Setuid binary β€” starts as root, immediately drops to invoking user's UID
  • Privileges re-elevated only after valid AuthZ-JWT with matching cmd_hash
  • Environment sanitized β€” LD_PRELOAD, PATH etc. reset before exec
  • Audit log β€” every execution logged as JSONL