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
Copy file name to clipboardExpand all lines: docs/reference/specifications/PSP-1 - Capability Model and Grammar.mdx
+89-5Lines changed: 89 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,14 +64,14 @@ Design goals:
64
64
- Secure by default: Holder-of-key (PoP) + channel binding; short TTLs for Presentations; pure, bounded builtins only.
65
65
- Receipt-ready: CEPs can emit Access PoARs with program projection/proof traces (see PSP-2).
66
66
67
-
Non-goals (out of scope for PSP-01):
67
+
Non-goals (out of scope for PSP-1):
68
68
69
69
- Enforcement placement/modes: CEP/BA placements (P/S/R) and mediate/derive/reveal semantics are specified in the CEP/BA spec.
70
70
- Lease lifecycle/rotation: Lease issuance and rotation policies are defined elsewhere; PSP-1 only requires Lease freshness to be verified when Grants touch non-native SoA (enforced by CEP per TAP).
71
71
- Receipt schemas: All receipt formats (PoAR/VOR/View) are specified in PSP-2.
72
72
- Transport/envelope and sigchain framing (JOSE/COSE/DSSE, canonical bytes): specified in PSP-3.
73
73
- Channel-binding mechanisms: Concrete binding profiles (e.g., TLS exporter, DPoP) are profiled elsewhere; PSP-1 only requires a verified binding.
74
-
- Global time/ordering: PSP-01 does not require a global clock or total order. Acceptance (TAP) specifies clock sources and tolerances.
74
+
- Global time/ordering: PSP-1 does not require a global clock or total order. Acceptance (TAP) specifies clock sources and tolerances.
75
75
- Secret issuance/derivation/aggregation crypto and interactive evaluation flows.
76
76
- No ZK/succinct delegation proofs in core; no signature aggregation (e.g., BLS).
77
77
- No recursion or negation-as-failure in the Program (monotone only).
@@ -443,7 +443,7 @@ A conforming Grant MUST satisfy all of the following.
443
443
- If any resource string in a declaration cannot be normalized under its scheme's rules, verification MUST deny.
444
444
- If program_bytes cannot be parsed into a valid CPL/0 Program per PSP-1 (e.g., type errors, prohibited terms), verification MUST deny.
445
445
7. Determinism and normalization invariants
446
-
-A CEP MUST evaluate using only `{program_bytes/program_id, bundled Declarations, builtins_id, channel_lattice_id when used, and the scheme comparator selected by scheme name}`. No other registry artifacts may change the decision at verification.
446
+
-The CEP MUST evaluate using only `{program_bytes/program_id, bundled Declarations, builtins_id, channel_lattice_id when used, and the scheme comparator selected by scheme name}`. No other registry artifacts may change the decision at verification.
447
447
- At verification time the CEP MUST normalize the environment resource using the same scheme comparator semantics as those used during declaration canonicalization; normalization failure MUST cause deny.
448
448
449
449
### Attenuation by Derivation (Grant → Derived Grant)
@@ -471,9 +471,9 @@ Informative note: The precise tightening rules for builtins (e.g., within_time i
471
471
- Presentations are ephemeral proofs that reference a Grant by its canonical digest (grant_ref). They carry PoP, channel binding, iat/exp, and ctx facts. Presentations are NOT recorded on sigchains.
472
472
- CEPs verify the Grant (signatures, revocation per PSP-3), verify custody and syntactic attenuation along any delegation chain under the pinned registries, then evaluate the leaf Program against CEP-provided environment facts and the Grant's bundled Declarations.
473
473
- On success, enforcement MAY proceed, and the CEP SHOULD emit an Access PoAR containing program_id, declaration CIDs, registry pins, and a minimal evaluation trace per PSP-2.
474
-
- CEPs MUST deny if grant_ref cannot be resolved to a valid Grant under PSP‑3 framing and signatures.
474
+
- CEPs MUST deny if grant_ref cannot be resolved to a valid Grant under PSP-3 framing and signatures.
The following illustrates only the Grant payload structure relevant to PSP-1. Envelope fields, signatures, canonical claim bytes, and multihash details are defined in PSP-3.
479
479
@@ -498,6 +498,90 @@ Implementers MUST NOT rely on this projection for wire encoding; the normative t
498
498
499
499
## Presentations
500
500
501
+
A Presentation is an ephemeral, on-path proof by the Subject (S) that it possesses a specific Grant and is exercising it now, on this live channel, in this runtime context. Presentations are NOT written to sigchains. They reference a Grant by its canonical digest (grant_ref, per PSP-3), are proof-of-possession (PoP) bound to the holder's key, and are cryptographically bound to the live session via a channel-binding profile. PSP-1 defines what a CEP must verify and evaluate; PSP-3 defines the on-wire framing and field mappings.
502
+
503
+
### Purpose and Role
504
+
505
+
- Ephemeral proof: Demonstrates holder-of-key (PoP) and binds use to the current session.
506
+
- Grant reference: Points to the leaf Grant (grant_ref per PSP-3) that carries the Program and bundled Declarations.
507
+
- Runtime facts: Conveys ctx and timing (iat/exp) the CEP uses to evaluate the Program's literals (e.g., ctx_eq, ttl_ok, within_time).
508
+
509
+
### Structure (Informative Projection)
510
+
511
+
Note: The names below are non-normative conceptual labels used by PSP-1. The normative on-wire field names and encodings are defined in PSP-3.
512
+
513
+
- presenter: DID of the holder (Subject).
514
+
- grant_ref: canonical digest of the leaf Grant (per PSP-3).
515
+
- iat: Int (NumericDate seconds) - mint time.
516
+
- exp: Int (NumericDate seconds) - expiry; exp - iat SHOULD be short; MAY be bounded by Program via ttl_ok.
517
+
- jti: nonce (unique) for replay resistance.
518
+
- channel_binding: `{ profile: Str, value: BytesOrB64 }` - binding to the live session (e.g., TLS exporter, DPoP).
519
+
- ctx: `Map<Str, Term>` — runtime context; MUST include at least the k/v required by the Program's ctx_eq literals.
520
+
- chain (delegation material; TAP-governed; one is REQUIRED):
521
+
- grants: OPTIONAL embedded Grant bodies (leaf→root) for offline verification (RECOMMENDED for air-gapped CEPs), or
522
+
- grant_refs (+ resolvers): OPTIONAL parent digests and resolvers to fetch/verify custody; TAP MAY forbid network fetches.
523
+
524
+
### Normative Requirements
525
+
526
+
- Proof-of-possession and channel binding
527
+
- The Presentation MUST be signed by the presenter (PoP). The CEP MUST verify PoP.
528
+
- The Presentation MUST be bound to the live session per the declared channel_binding profile. The CEP MUST verify that the binding matches the live session and deny on mismatch.
529
+
- Lifetime and timing
530
+
- The CEP MUST reject if the Presentation is expired (now ≥ exp) or used too early (now < iat), subject to TAP clock discipline.
531
+
- If the Program contains ttl_ok or within_time literals, the CEP MUST enforce them using iat/now/exp as appropriate.
532
+
- If the Grant envelope carries a validity window (not_before/not_after) per PSP-3, the CEP MUST enforce it and, where both apply, MUST enforce the intersection with the Presentation's lifetime.
533
+
- If the Program does not constrain Presentation lifetime via ttl_ok, TAP MAY impose a default maximum Presentation TTL.
534
+
- Context
535
+
- ctx MUST be a superset of the required ctx_eq(k, v) literals in the Program. Missing keys or unequal values MUST cause deny.
536
+
- Grant reference and custody
537
+
- grant_ref MUST resolve to a valid leaf Grant under PSP-3 framing and signatures; failure MUST cause deny.
538
+
- If delegation is present, the Presentation MUST carry (or allow resolution of) sufficient delegation material to verify:
- PSP-1 does not mandate exact Presentation field names or encodings; those appear in PSP-3. The CEP's obligations here are limited to PoP verification, channel binding verification, custody/attenuation verification, and Program evaluation under the pinned semantics and bundled declarations.
583
+
- Per-use narrowing is achieved by the Program's literals (e.g., ctx_eq, ttl_ok) evaluated against Presentation-supplied ctx and iat/exp. A future TAP-gated profile MAY introduce presentation overlays with strict attenuation and receipt requirements.
0 commit comments