Pilot Auto-Trust
Automated trust management for Pilot Protocol with policy-based decision making.
Commands
List Pending Requests
pilotctl --json pending
Auto-Approve by Network
pilotctl --json pending | jq -r '.[] | select(.address | startswith("1:")) | .node_id' | \
xargs -I {} pilotctl --json approve {}
Auto-Approve by Hostname Pattern
pilotctl --json pending | jq -r '.[] | select(.hostname | test("^agent-prod-")) | .node_id' | \
xargs -I {} pilotctl --json approve {}
Batch Reject by Hostname Pattern
pilotctl --json pending | jq -r '.[] | select(.hostname | test("^untrusted-")) | .node_id' | \
xargs -I {} pilotctl --json reject {} "Untrusted source"
Workflow Example
#!/bin/bash
# Auto-approve production agents from a known network
PENDING=$(pilotctl --json pending)
# Approve if address is on network 1 (prod) AND hostname matches prod pattern
echo "$PENDING" | jq -r '.[] | select((.address | startswith("1:")) and (.hostname | test("^agent-prod-"))) | .node_id' | \
while read -r NODE_ID; do
pilotctl --json approve "$NODE_ID"
done
# Reject anything not on a known network (e.g. unrecognised remote address)
echo "$PENDING" | jq -r '.[] | select(.address | startswith("1:") | not) | .node_id' | \
while read -r NODE_ID; do
pilotctl --json reject "$NODE_ID" "Unknown network"
done
Dependencies
Requires pilot-protocol, pilotctl, and jq.