Skip to content

Commit 151f932

Browse files
committed
updated user manual
1 parent e0ac3c4 commit 151f932

File tree

2 files changed

+79
-1
lines changed

2 files changed

+79
-1
lines changed

docs/authorityd-operations.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ OKTA OPTIONS (for identity-mode=okta):
119119
--okta-scope-claim <NAME> Claim for scopes [env: OKTA_SCOPE_CLAIM] [default: scope]
120120
--okta-role-claim <NAME> Claim for roles [env: OKTA_ROLE_CLAIM] [default: groups]
121121
122+
SECURITY HARDENING OPTIONS (Phase 5):
123+
--disable-ssrf-protection Disable built-in SSRF protection [env: PREDICATE_DISABLE_SSRF]
124+
--require-signed-policy Require Ed25519 signed policy files [env: PREDICATE_REQUIRE_SIGNED_POLICY]
125+
--policy-signing-key <HEX> Ed25519 public key for policy verification [env: PREDICATE_POLICY_SIGNING_KEY]
126+
--loop-guard-threshold <N> Consecutive failures before blocking (default: 5) [env: PREDICATE_LOOP_GUARD_THRESHOLD]
127+
--loop-guard-window-s <S> Time window for failure counting (default: 60) [env: PREDICATE_LOOP_GUARD_WINDOW_S]
128+
122129
COMMANDS:
123130
run Start the daemon (default)
124131
init-config Generate example config file
@@ -128,6 +135,77 @@ COMMANDS:
128135

129136
---
130137

138+
## Security Features (Phase 5)
139+
140+
The sidecar includes built-in security hardening features:
141+
142+
### SSRF Protection
143+
144+
Blocks requests to internal network resources, cloud metadata endpoints, and other sensitive targets:
145+
146+
- **Private IP Ranges**: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
147+
- **Link-local**: 169.254.0.0/16
148+
- **Localhost**: 127.0.0.0/8, localhost, ::1
149+
- **Cloud Metadata Endpoints**: AWS (169.254.169.254), GCP, Azure, Kubernetes
150+
- **Internal DNS**: *.internal, *.local, *.localhost, *.corp, *.lan
151+
152+
SSRF protection is **enabled by default**. To disable (not recommended):
153+
154+
```bash
155+
./predicate-authorityd --disable-ssrf-protection --policy-file policy.json run
156+
```
157+
158+
### Policy Signature Verification (Enterprise)
159+
160+
Require Ed25519-signed policy files to prevent local policy tampering:
161+
162+
```bash
163+
# Generate a keypair (one-time setup)
164+
# Private key stays on control plane, public key goes to sidecars
165+
166+
./predicate-authorityd \
167+
--require-signed-policy \
168+
--policy-signing-key "a1b2c3d4e5f6..." \
169+
--policy-file signed-policy.json \
170+
run
171+
```
172+
173+
Signed policy file format:
174+
```json
175+
{
176+
"policy": { "rules": [...] },
177+
"signature": "<base64-ed25519-signature>"
178+
}
179+
```
180+
181+
### Loop Guard (Retry Limiting)
182+
183+
Prevents runaway agents from infinitely retrying failed actions:
184+
185+
```bash
186+
./predicate-authorityd \
187+
--loop-guard-threshold 5 \
188+
--loop-guard-window-s 60 \
189+
--policy-file policy.json \
190+
run
191+
```
192+
193+
After 5 consecutive failures for the same (principal, action, resource) tuple within 60 seconds, further requests are blocked with `LOOP_GUARD_TRIGGERED`.
194+
195+
### Merkle Hash Chain (Audit Integrity)
196+
197+
The proof ledger uses SHA-256 hash chaining for tamper-evident audit trails. Verify chain integrity:
198+
199+
```bash
200+
# Get current chain head
201+
curl -s http://127.0.0.1:8787/ledger/chain-head | jq
202+
203+
# Verify chain integrity
204+
curl -s http://127.0.0.1:8787/ledger/verify | jq
205+
```
206+
207+
---
208+
131209
## 1) Sample `policy.json`
132210

133211
Create `examples/authorityd/policy.json`:

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PYTHONPATH=. python examples/outbound_http_guard_example.py
2222
Start daemon:
2323

2424
```bash
25-
PYTHONPATH=. predicate-authorityd \
25+
predicate-authorityd \
2626
--host 127.0.0.1 \
2727
--port 8787 \
2828
--mode local_only \

0 commit comments

Comments
 (0)