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
fix(policy): #10 v3 — align all session TTLs to 30 days per wiki/session-token.md
User directive: keep 30-day TTL consistently across the project (shortening
agent sessions is a possible future defense-in-depth tweak, but for now
uniform with master per the canonical policy in wiki/session-token.md).
Reverts the split-by-client-type threat-model row from v2 — now 30 days
applies to both master and sandbox/agent cases, matching the wiki
declaration.
Code alignment (mock server):
- handlers/session.rs: introduce DEFAULT_SESSION_TTL_SECONDS const
(30 days); replace 3 × 86400u64 + 1 × 3600u64 magic numbers.
- test_client.rs: 3 × 86400/3600 → 2_592_000 (30 days).
Doc alignment:
- wiki/session-token.md:244 — mock default 86400s → 2_592_000s (30 days).
- docs/spec/1-step-analysis.md:124 — master auth token "15 min – 24 h"
→ 30-day canonical policy.
- docs/spec/1-step-analysis.md:784 — master session TTL same.
- docs/spec/1-step-analysis.md:787 — agent session TTL "4h default, up
to 24h" → 30 days (same as master).
- wiki/data-classification.md:214 — threat-model row restored to single
~30-day TTL claim.
51 tests across cli + mock-server crates all pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|**Master auth token**|Short (15 min – 24 h, configurable via `AuthOptions.expires_at`) | OS keychain| Plain file or env var (JWT string, not a private key) | Management commands: `agentkeys init`, `store`, `usage`, `teardown`, `approve`. Never used by running agents. |
124
+
|**Master auth token**|30 days (canonical AgentKeys policy per `wiki/session-token.md`; `AuthOptions.expires_at` can shorten per-session) | OS keychain | Plain file or env var (JWT string, not a private key) | Management commands: `agentkeys init`, `store`, `usage`, `teardown`, `approve`. Never used by running agents. |
125
125
|**Agent auth token**| Long (hours to days) | Sandbox filesystem (`~/.agentkeys/session`, 0600) | Same (JWT string in file, 0600) | MCP Credential Server authentication. Scoped to specific credentials for a specific agent. |
126
126
127
127
@@ -781,10 +781,10 @@ This section explicitly reconciles any points where earlier rounds of this sub-i
781
781
|**Canonical account name (Round 6)**|**x402 wallet address (EVM), minted in Heima TEE on account creation. Same primary key for master and each child.**|
782
782
|**Billing model (Round 6)**|**Each account's wallet holds its own USDC. Master funds children. Empty wallet = agent stops. No on-chain spend-limit code needed — the balance IS the limit.**|
| Recovery | New sandbox runs `agentkeys pair` → master runs `agentkeys approve <pair-code>` (mints new session for same wallet address). *(Original design used `agentkeys attach agent-A` with direct HTTP push — superseded by rendezvous model.)*|
|**Chain data exfiltration** (read all on-chain state) | All plaintext: addresses, identity hashes, scopes, audit events, pair metadata. Credential ciphertext (unreadable without shielding key). | Any private key. Any plaintext credential. Session tokens (not on chain). Original identity info (only hash). | Information disclosure only. No ability to decrypt credentials or impersonate users. |
214
-
|**Client device compromise** (laptop/sandbox) | Session token (bearer credential). Possibly plaintext credential in memory if timed during a read operation. | Any TEE key. Other users' data. Credential ciphertext. | Impersonate this user until the bearer expires or is revoked (~6s). TTL depends on WHICH client was compromised: master CLI bearer ~30 days; sandbox daemon agent/child sessions are short-lived (1–24h; 4h default). If credential was in memory, one credential for one service exposed. |
214
+
|**Client device compromise** (laptop/sandbox) | Session token (bearer credential). Possibly plaintext credential in memory if timed during a read operation. | Any TEE key. Other users' data. Credential ciphertext. | Impersonate this user until session token expires (~30 days) or is revoked (~6s). If credential was in memory, one credential for one service exposed. |
215
215
|**Session token theft**| Impersonate the user for the token's remaining TTL. Scoped by the token's `sub` (one user) + on-chain scope (specific services). | TEE keys. Other users' sessions. Ability to forge new tokens. Ability to sign extrinsics (TEE signs, not the client). | Bounded by TTL + scope. Revocable via on-chain revocation list (~6s). |
216
216
|**TEE compromise** (enclave breach, side-channel, insider) | All sealed keys (shielding, RSA, wallet/MSK). Can decrypt ALL credential blobs. Can forge session tokens. Can sign extrinsics as any user. | Chain history (already written, immutable). Can't rewrite past audit events. |**Total.** All users, all credentials, all operations. Recovery: rotate shielding key, re-encrypt all credentials, rotate MSK, re-issue all session tokens. The on-chain audit trail survives — forensic investigation of what happened during the breach is possible from chain data. |
217
217
|**Paymaster compromise** (treasury drained) | Can stop paying for audit extrinsic submission. Existing credentials and sessions unaffected. | Any key. Any credential. Any ability to impersonate. | Audit events stop appearing on chain. Credential reads still work (TEE serves from chain state). Degraded mode: reads work, audit is paused. |
0 commit comments