You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/authorityd-operations.md
+127-1Lines changed: 127 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -665,7 +665,133 @@ Expected startup output:
665
665
predicate-authorityd listening on http://127.0.0.1:8787 (mode=local_only)
666
666
```
667
667
668
-
## 3) Endpoint checks
668
+
## 3) API Endpoints
669
+
670
+
### Core Authorization
671
+
672
+
| Endpoint | Method | Description |
673
+
|----------|--------|-------------|
674
+
|`/v1/authorize`| POST | Core authorization check - returns mandate if allowed |
675
+
|`/v1/delegate`| POST | Delegate mandate to sub-agent |
676
+
|`/v1/execute`| POST | Execute operation via sidecar (zero-trust mode) |
677
+
678
+
### Operations
679
+
680
+
| Endpoint | Method | Description |
681
+
|----------|--------|-------------|
682
+
|`/health`| GET | Health check |
683
+
|`/status`| GET | Stats and status |
684
+
|`/metrics`| GET | Prometheus metrics |
685
+
|`/policy/reload`| POST | Hot-reload policy |
686
+
|`/ledger/flush-now`| POST | Trigger immediate audit flush |
687
+
|`/ledger/dead-letter`| GET | Inspect quarantined events |
688
+
|`/ledger/requeue`| POST | Requeue a dead-letter item |
689
+
690
+
---
691
+
692
+
## 3a) Execution Proxying (Zero-Trust Mode)
693
+
694
+
The `/v1/execute` endpoint enables **zero-trust execution** where the sidecar executes operations on behalf of agents. This prevents "confused deputy" attacks where an agent requests authorization for one resource but accesses another.
695
+
696
+
### Flow Comparison
697
+
698
+
```
699
+
Traditional (Cooperative): Zero-Trust (Execution Proxy):
The `/v1/execute` endpoint enables **zero-trust execution** where the sidecar executes operations on behalf of agents. This prevents "confused deputy" attacks where an agent requests authorization for one resource but accesses another.
476
+
477
+
### Why Zero-Trust?
478
+
479
+
In cooperative mode, the agent asks for permission and then executes the operation itself. A compromised agent could authorize `fs.read /safe/file` but actually read `/etc/passwd`. In zero-trust mode, the sidecar executes the operation, ensuring the authorized resource is what gets accessed.
480
+
481
+
### Using Execute Proxy
482
+
483
+
```python
484
+
from predicate_authority import SidecarClient, AuthorizeAndExecuteOptions
485
+
486
+
asyncwith SidecarClient() as client:
487
+
# Combined authorize + execute in one call
488
+
response =await client.authorize_and_execute(
489
+
AuthorizeAndExecuteOptions(
490
+
principal="agent:web",
491
+
action="fs.read",
492
+
resource="/src/index.ts"
493
+
)
494
+
)
495
+
print(response.result.content) # File content from sidecar
0 commit comments