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
CAP-01 defines the portable, verifiable capability model used by Polykey to express delegated authority. It specifies the structure and semantics of Grants (capability tokens) and Presentations (ephemeral proofs of capability), including verbs, resource addressing, binding constraints, attenuation, and revocation. CAP-01 ensures capabilities are composable, attenuable (never broadened), and safely enforceable at CEPs (Capability Enforcement Points), producing settlement-grade receipts (RSC-01).
23
+
CAP-01 defines the portable, verifiable capability model used by Polykey to
24
+
express delegated authority. It specifies the structure and semantics of Grants
25
+
(capability tokens) and Presentations (ephemeral proofs of capability),
26
+
including verbs, resource addressing, binding constraints, attenuation, and
27
+
revocation. CAP-01 ensures capabilities are composable, attenuable (never
28
+
broadened), and safely enforceable at CEPs (Capability Enforcement Points),
29
+
producing settlement-grade receipts (RSC-01).
18
30
19
31
## Terminology
20
32
21
33
- Principal (P): Originator of authority; issues a Grant to a Subject.
22
34
- Subject (S): Holder that exercises the capability by creating a Presentation.
23
35
- Resource (R): Target of the action; may host a native CEP (CEP(R)).
24
-
- CEP: Capability Enforcement Point at P/S/R that verifies Presentations and enforces capabilities (writes the Access PoAR).
36
+
- CEP: Capability Enforcement Point at P/S/R that verifies Presentations and
37
+
enforces capabilities (writes the Access PoAR).
25
38
- Grant (G): A signed, portable capability issued by P to S.
26
-
- Presentation (Π): An ephemeral, proof-of-possession token created by S that references a Grant with context and channel binding. Not stored on-chain.
27
-
- Bind: Binding constraints inside a Grant that restrict its use (audience, purpose, time, context, etc.).
28
-
- Attenuation: Narrowing a capability when delegating; derived Grants must be a subset of their parent capability.
29
-
- Verification (Σ): The verification handshake at the enforcing CEP. `Σ = verify(Π, G, Bind, Channel, TTL, Attenuation?, Lease?)`
30
-
- Lease: The upstream authority relationship to a non-native SoA; referenced via leaseRef in PoAR (RSC-01).
39
+
- Presentation (Π): An ephemeral, proof-of-possession token created by S that
40
+
references a Grant with context and channel binding. Not stored on-chain.
41
+
- Bind: Binding constraints inside a Grant that restrict its use (audience,
42
+
purpose, time, context, etc.).
43
+
- Attenuation: Narrowing a capability when delegating; derived Grants must be a
44
+
subset of their parent capability.
45
+
- Verification (Σ): The verification handshake at the enforcing CEP.
Subset rule (for attenuation, Section 6): child.bind MUST be a subset (narrower or equal) of parent.bind on every dimension (audience, purpose scope, time, ttl, etc.).
163
+
Subset rule (for attenuation, Section 6): child.bind MUST be a subset (narrower
164
+
or equal) of parent.bind on every dimension (audience, purpose scope, time, ttl,
165
+
etc.).
134
166
135
167
```json
136
168
"bind": {
@@ -144,43 +176,57 @@ Subset rule (for attenuation, Section 6): child.bind MUST be a subset (narrower
144
176
145
177
## Attenuation and Delegation
146
178
147
-
A capability MAY be delegated by S to S2 by issuing a derived Grant on the delegator's sigchain, provided:
179
+
A capability MAY be delegated by S to S2 by issuing a derived Grant on the
180
+
delegator's sigchain, provided:
148
181
149
182
- The derived Grant's action/resource are identical or narrower (subset).
150
-
- The derived Grant's bind is a subset of the parent Grant's bind on all dimensions.
183
+
- The derived Grant's bind is a subset of the parent Grant's bind on all
184
+
dimensions.
151
185
- The chain of custody (P → S → S2) is provable via sigchains.
152
-
- No broadening: delegation MUST NOT increase the set of allowed enforcers, time, scope, or resource coverage.
186
+
- No broadening: delegation MUST NOT increase the set of allowed enforcers,
187
+
time, scope, or resource coverage.
153
188
154
189
Normative subset checks (examples):
155
190
156
191
-`time_window.child` ⊆ `time_window.parent`
157
192
-`audience.child` ⊆ `audience.parent`
158
193
-`ttl.child` ≤ `ttl.parent`
159
194
-`resource.child` narrower (e.g., specific door vs building-wide)
160
-
-`purpose.child` equals or narrower (e.g., same artifact hash or a stricter descriptor)
195
+
-`purpose.child` equals or narrower (e.g., same artifact hash or a stricter
196
+
descriptor)
161
197
162
-
CEPs SHOULD verify chain attenuation if presented with a chain (Grant_ref may include a chain; otherwise, single-hop P→S is verified).
198
+
CEPs SHOULD verify chain attenuation if presented with a chain (Grant_ref may
199
+
include a chain; otherwise, single-hop P→S is verified).
163
200
164
201
## Presentation
165
202
166
-
A Presentation is an ephemeral proof by S that it holds a Grant and is using it now, in this context, on this channel. Presentations are NOT written to sigchains.
203
+
A Presentation is an ephemeral proof by S that it holds a Grant and is using it
204
+
now, in this context, on this channel. Presentations are NOT written to
205
+
sigchains.
167
206
168
207
Required fields:
208
+
169
209
- grant_ref: hash of Grant (or terminal of a chain)
170
210
- holder: DID of S
171
211
- pop_sig: signature by S’s private key over the presentation payload
172
-
- channelBinding: exporter-derived key for the live TLS/mTLS session (or equivalent)
212
+
- channelBinding: exporter-derived key for the live TLS/mTLS session (or
213
+
equivalent)
173
214
- ctx: runtime context (subset of bind.context)
174
215
- ttl: small (e.g., 120s)
175
216
- nonce: unique value to prevent replay
176
217
177
218
Normative rules:
178
-
- Presentations MUST be bound to holder’s key (PoP) and to the transport/session (channelBinding).
219
+
220
+
- Presentations MUST be bound to holder’s key (PoP) and to the transport/session
221
+
(channelBinding).
179
222
- Presentation ttl MUST be enforced by CEPs.
180
-
- Presentations MUST include binding to Grant_ref and context; CEPs MUST check bind subset.
181
-
- CEPs MUST reject Presentations beyond Grant expiry or outside bind.time_window.
223
+
- Presentations MUST include binding to Grant_ref and context; CEPs MUST check
224
+
bind subset.
225
+
- CEPs MUST reject Presentations beyond Grant expiry or outside
226
+
bind.time_window.
182
227
183
228
Minimal JSON skeleton (often conveyed as a signed JWT/DSSE):
229
+
184
230
```
185
231
{
186
232
"type": "presentation",
@@ -197,42 +243,56 @@ Minimal JSON skeleton (often conveyed as a signed JWT/DSSE):
197
243
## 8. Revocation and rotation
198
244
199
245
### 8.1 Revocation
200
-
A Grant MAY be revoked by its issuer with a signed revocation claim on P’s sigchain:
246
+
247
+
A Grant MAY be revoked by its issuer with a signed revocation claim on P’s
248
+
sigchain:
249
+
201
250
- type: "revoke", target: grant_id/hash(G), reason(optional), time, sig
202
251
- CEPs MUST check for revocation before enforcing.
203
-
- ViewReceipts SHOULD include knowledge of revocation state at time of action (via bind_snapshot + revocation check in PoAR).
252
+
- ViewReceipts SHOULD include knowledge of revocation state at time of action
253
+
(via bind_snapshot + revocation check in PoAR).
204
254
205
255
### 8.2 Rotation
206
-
For secret-bound flows (PS-BA/SS-BA), upstream leases and secrets MUST be rotated per TAP policy. PoAR includes leaseRef (freshness proof). Rotation receipts may be recorded per SIGCHAIN-01 (optional).
256
+
257
+
For secret-bound flows (PS-BA/SS-BA), upstream leases and secrets MUST be
258
+
rotated per TAP policy. PoAR includes leaseRef (freshness proof). Rotation
259
+
receipts may be recorded per SIGCHAIN-01 (optional).
207
260
208
261
## 9. CEP enforcement (normative algorithm)
209
262
210
263
Given a Presentation p from S and an asserted Grant G:
211
-
1) Verify issuer signature of G (P’s sigchain), subject DID, action/resource.
212
-
2) Check expiry and revocation of G.
213
-
3) Verify Presentation:
264
+
265
+
1. Verify issuer signature of G (P’s sigchain), subject DID, action/resource.
266
+
2. Check expiry and revocation of G.
267
+
3. Verify Presentation:
214
268
- pop_sig by holder S
215
269
- channelBinding matches live session (mTLS/DPoP)
216
270
- ttl within bind.ttl and current time within bind.time_window
217
271
- ctx consistent and bind subset satisfied
218
-
4) If Grant is a derived chain: verify attenuation (child bind/resource/action ⊆ parent).
219
-
5) If enforcement passes, enforce per placement/mode and write PoAR:
220
-
- Include bind_snapshot (canonical copy of bind at enforcement), cepRef, exposureMode, time_source, requestDigest (if mediate).
272
+
4. If Grant is a derived chain: verify attenuation (child bind/resource/action ⊆
273
+
parent).
274
+
5. If enforcement passes, enforce per placement/mode and write PoAR:
275
+
- Include bind_snapshot (canonical copy of bind at enforcement), cepRef,
0 commit comments