Skip to content

Commit fb21ea4

Browse files
committed
updated sidecar docs
1 parent d42bc3f commit fb21ea4

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

docs/authorityd-operations.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,42 @@ curl -X POST http://127.0.0.1:8787/v1/execute \
745745
| `http.fetch` | `{ type: "http_fetch", method, headers?, body? }` | `HttpFetch { status_code, headers, body, body_hash }` |
746746
| `env.read` | `{ type: "env_read", keys: ["VAR_NAME"] }` | `EnvRead { values: { "VAR_NAME": "..." } }` |
747747

748+
### Secret Injection
749+
750+
Policy rules can specify secrets to inject at execution time. The agent never sees raw credentials - the sidecar substitutes values from its environment:
751+
752+
**Headers for HTTP requests (`inject_headers`):**
753+
```json
754+
{
755+
"name": "api-with-auth",
756+
"effect": "allow",
757+
"principals": ["agent:*"],
758+
"actions": ["http.fetch"],
759+
"resources": ["https://api.github.com/*"],
760+
"inject_headers": {
761+
"Authorization": "Bearer ${GITHUB_TOKEN}"
762+
}
763+
}
764+
```
765+
766+
**Environment variables for CLI (`inject_env`):**
767+
```json
768+
{
769+
"name": "aws-cli",
770+
"effect": "allow",
771+
"principals": ["agent:ops"],
772+
"actions": ["cli.exec"],
773+
"resources": ["aws", "aws *"],
774+
"inject_env": {
775+
"AWS_ACCESS_KEY_ID": "${AWS_ACCESS_KEY_ID}",
776+
"AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}",
777+
"AWS_DEFAULT_REGION": "${AWS_REGION:-us-east-1}"
778+
}
779+
}
780+
```
781+
782+
Syntax: `${VAR_NAME}` for required vars, `${VAR_NAME:-default}` for optional with default.
783+
748784
### Security Guarantees
749785

750786
- **Mandate validation**: Mandate must exist and not be expired

docs/predicate-authority-user-manual.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,13 +534,59 @@ async with SidecarClient() as client:
534534
| `http.fetch` | `HttpFetchPayload { method, headers?, body? }` | `HttpFetchResult { status_code, headers, body, body_hash }` |
535535
| `env.read` | `EnvReadPayload { keys }` | `EnvReadResult { values }` |
536536

537+
### Secret Injection (Zero-Knowledge Credentials)
538+
539+
Policy rules can specify secrets to inject at execution time. The agent never sees raw credentials - the sidecar substitutes environment variable values:
540+
541+
**Headers for HTTP requests:**
542+
```json
543+
{
544+
"name": "github-api",
545+
"effect": "allow",
546+
"principals": ["agent:*"],
547+
"actions": ["http.fetch"],
548+
"resources": ["https://api.github.com/*"],
549+
"inject_headers": {
550+
"Authorization": "Bearer ${GITHUB_TOKEN}",
551+
"Accept": "application/vnd.github.v3+json"
552+
}
553+
}
554+
```
555+
556+
**Environment variables for CLI:**
557+
```json
558+
{
559+
"name": "aws-cli",
560+
"effect": "allow",
561+
"principals": ["agent:ops"],
562+
"actions": ["cli.exec"],
563+
"resources": ["aws", "aws *"],
564+
"inject_env": {
565+
"AWS_ACCESS_KEY_ID": "${AWS_ACCESS_KEY_ID}",
566+
"AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}",
567+
"AWS_DEFAULT_REGION": "${AWS_REGION:-us-east-1}"
568+
}
569+
}
570+
```
571+
572+
**Syntax:**
573+
- `${VAR_NAME}` - Substitute with environment variable (error if not set)
574+
- `${VAR_NAME:-default}` - Use default value if variable not set
575+
576+
**Security benefits:**
577+
- Agents never see or handle raw secrets
578+
- Policy controls which secrets are injected where
579+
- Even compromised agents cannot exfiltrate credentials
580+
- Works with existing agents without code changes
581+
537582
### Security Guarantees
538583

539584
- Mandate must exist and not be expired
540585
- Requested action/resource must match mandate
541586
- All executions logged to proof ledger with evidence hashes
542587
- `fs.delete` with `recursive: true` requires explicit policy allowlist
543588
- `env.read` only returns values for explicitly authorized keys
589+
- Secret injection values are redacted from audit logs
544590

545591
---
546592

0 commit comments

Comments
 (0)