Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/assets/samples/agent-card-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "AI-powered code review assistant that analyzes pull requests for bugs, security issues, and style improvements",
"url": "https://codereview.example.com",
"version": "2.1.0",
"protocolVersion": "0.2.1",
"documentationUrl": "https://docs.codereview.example.com",
"provider": {
"organization": "DevTools Inc",
Expand Down
1 change: 1 addition & 0 deletions docs/assets/samples/agent-card.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "A helpful AI assistant built with CapiscIO",
"url": "https://my-agent.example.com",
"version": "1.0.0",
"protocolVersion": "0.2.1",
"provider": {
"organization": "My Company",
"url": "https://mycompany.com"
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/complete-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Every A2A agent needs an `agent-card.json` that describes its capabilities:
"description": "A helpful assistant that can answer questions",
"url": "https://my-agent.example.com",
"version": "1.0.0",
"protocolVersion": "{{ protocol_version }}",
"provider": {
"organization": "My Company",
"url": "https://example.com"
Expand Down
4 changes: 3 additions & 1 deletion docs/getting-started/secure/1-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ The token contains:

```json
{
"iss": "did:capiscio:agent:my-agent",
"iat": 1701432000,
"exp": 1701432060,
"bh": "sha256-hash-of-body"
}
```

!!! note "Production vs Dev Mode"
In production with registered badges, the token also includes `"iss"` (the agent's DID). In dev mode, only `iat`, `exp`, and `bh` are present.

---

## What You'll Learn
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/secure/2-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def handle_message(request: Request):
# 3. Verify the signature
try:
claims = guard.verify_inbound(badge_token, body=body)
print(f"✅ Verified request from: {claims.get('iss')}")
print(f"✅ Verified request from: {claims.get('iss', 'dev-mode agent')}")
except Exception as e:
raise HTTPException(status_code=401, detail=f"Signature verification failed: {e}")

Expand Down
11 changes: 8 additions & 3 deletions docs/getting-started/secure/3-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ your-project/

Decoded claims:
{
"iss": "local-dev-agent",
"iat": 1701432000,
"exp": 1701432060,
"bh": "sha256:a1b2c3d4e5f6..."
}
```

!!! note
In dev mode, claims contain `iat`, `exp`, and `bh`. The `iss` claim (agent DID) is added when using registered badges in production.

### Use the Signature in HTTP

=== "Code"
Expand Down Expand Up @@ -112,7 +114,7 @@ your-project/

try:
claims = guard.verify_inbound(jws=badge, body=body)
print(f"✓ Valid request from: {claims['iss']}")
print(f"✓ Valid request")
print(f" Issued at: {claims['iat']}")
print(f" Expires: {claims['exp']}")
except VerificationError as e:
Expand All @@ -122,7 +124,7 @@ your-project/
=== "Valid Request"

```
✓ Valid request from: partner-agent
✓ Valid request
Issued at: 1701432000
Expires: 1701432060
```
Expand Down Expand Up @@ -216,6 +218,9 @@ When you call `verify_inbound()`, SimpleGuard checks:
| **Not Expired** | `exp` > now | `Token expired` |
| **Not Future** | `iat` <= now | `Token not yet valid` |

!!! warning "Dev Mode Trust"
In `dev_mode=True`, the trust store is permissive — all valid Ed25519 signatures are accepted. The **Trust** check above only rejects untrusted keys when you have a configured trust store (i.e., keys in `capiscio_keys/trusted/`) or when using the `CapiscioMiddleware`. See [Step 4: Test Enforcement](4-test.md) for an example that demonstrates trust rejection via the middleware.

---

## Managing the Trust Store
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/validate/2-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The CapiscIO CLI is available for Node.js and Python. Choose your preferred plat

Expected output:
```
capiscio/{{ capiscio_version }} (darwin-arm64)
capiscio version {{ capiscio_version }} (commit: <hash>)
```

=== "pip (Python)"
Expand All @@ -42,7 +42,7 @@ The CapiscIO CLI is available for Node.js and Python. Choose your preferred plat

Expected output:
```
capiscio/{{ capiscio_version }} (darwin-arm64)
capiscio version {{ capiscio_version }} (commit: <hash>)
```

=== "Go (Direct)"
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/validate/3-validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ First, grab our sample agent card:
"description": "A helpful AI assistant",
"url": "https://my-agent.example.com",
"version": "1.0.0",
"protocolVersion": "{{ protocol_version }}",
"capabilities": {
"streaming": true,
"pushNotifications": false
Expand Down
Loading