Skip to content

Commit 5c41c00

Browse files
docs(e2ee): add sequence diagrams, JSON schemas (manifest, capability), and PASETO payload example
1 parent ed0b181 commit 5c41c00

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"v": 4,
3+
"purpose": "public",
4+
"claims": {
5+
"sub": "device:9b1d2...",
6+
"scope": "object:get",
7+
"resource": "s3://brand-intel-eu/tenant123/objects/abc123",
8+
"exp": 1723939200,
9+
"iat": 1723935600,
10+
"nbf": 1723935600,
11+
"region": "eu",
12+
"tid": "d7b2f0f8-7e2a-4d31-8b4e-7e7c2f0b9d51"
13+
}
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://example.com/schemas/capability.schema.json",
4+
"title": "Capability Claims (PASETO v4.public payload)",
5+
"type": "object",
6+
"required": ["sub", "scope", "resource", "exp", "region", "tid"],
7+
"properties": {
8+
"sub": {"type": "string"},
9+
"scope": {"type": "string", "enum": ["object:get", "object:put", "room:read", "room:write", "membership:manage"]},
10+
"resource": {"type": "string"},
11+
"exp": {"type": "integer"},
12+
"iat": {"type": "integer"},
13+
"nbf": {"type": "integer"},
14+
"region": {"type": "string", "description": "enforced data residency region (controls bucket/prefix routing)"},
15+
"tid": {"type": "string"}
16+
}
17+
}

docs/schemas/manifest.schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://example.com/schemas/manifest.schema.json",
4+
"title": "E2EE File Manifest",
5+
"type": "object",
6+
"required": ["version", "algo", "chunk_size", "length", "blake3_file", "chunks", "sig"],
7+
"properties": {
8+
"version": {"type": "integer", "enum": [1]},
9+
"algo": {"type": "string", "const": "aes-256-gcm"},
10+
"chunk_size": {"type": "integer", "minimum": 262144, "maximum": 4194304},
11+
"length": {"type": "integer", "minimum": 0},
12+
"blake3_file": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
13+
"chunks": {
14+
"type": "array",
15+
"items": {
16+
"type": "object",
17+
"required": ["index", "offset", "size", "blake3"],
18+
"properties": {
19+
"index": {"type": "integer", "minimum": 0},
20+
"offset": {"type": "integer", "minimum": 0},
21+
"size": {"type": "integer", "minimum": 1},
22+
"blake3": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
23+
}
24+
}
25+
},
26+
"sig": {"type": "string", "description": "Ed25519 signature over canonicalized manifest without sig"}
27+
}
28+
}

0 commit comments

Comments
 (0)