Skip to content

Commit 6920e86

Browse files
authored
Merge pull request #160 from MatrixAI/feature-cap-01-mental-hurdles
PSP-1 Capability Model and Grammar - and associated structure
2 parents 12821a9 + aa45668 commit 6920e86

File tree

10 files changed

+2564
-11
lines changed

10 files changed

+2564
-11
lines changed

docs/reference/specifications/PSP-1 - Capability Model and Grammar.mdx

Lines changed: 2002 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import DocCardList from '@theme/DocCardList';
2+
3+
# How-To Guides
4+
5+
<DocCardList />
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
# Clarifying Mental Models
2+
3+
You may be using Polykey to solve a practical problem, like managing secrets in
4+
a CI/CD pipeline. But beneath that toolset lies a fundamental shift in how to
5+
think about security and trust.
6+
7+
This shift is from a **Fortress Mentality** to a **Verifiable Ledger
8+
Mentality**. The old world is about prevention: building walls to stop bad
9+
things from happening. Our world is about proof: creating an indisputable,
10+
portable, and settlement-grade record of what actually happened.
11+
12+
Because this approach creates a new category of infrastructure: **Receipt
13+
Rails**, it's easy to miscast. You might ask: Is this just better logging? A
14+
private blockchain? Another IAM tool? The answer is no.
15+
16+
This page is the bridge from the 'how' to the 'why'. It is a reference for both
17+
the engineer wondering why we mint 'receipts' instead of logs, and the architect
18+
evaluating the entire system. Use it to clear the common hurdles and understand
19+
how we turn operational events into verifiable, economic assets.
20+
21+
## The Universal Hurdle: Prevention → Provability
22+
23+
The single most important shift to understand is moving from a **Fortress
24+
Mentality** to a **Verifiable Ledger Mentality**. This isn't an upgrade; it's a
25+
change in the fundamental physics of how you manage risk and create value.
26+
27+
- **The Fortress Mentality (The old world):** This worldview is about
28+
_prevention_. It asks, "How do I build walls to prevent bad things from
29+
happening?" Risk is managed by trying to achieve a perfect, static state of
30+
control. Its primary artifacts are firewalls, access policies, and siloed
31+
logs. In this model, security is an internal cost center.
32+
- **The Verifiable Ledger Mentality (the new world):** This worldview is about
33+
**proof**. It assumes events—both good and bad—are inevitable and asks, "How
34+
do I create an indisputable, portable, and settlement-grade record of what
35+
actually happened?" Risk is managed by making the system transparent,
36+
auditable, and capable of rapid, fair settlement. In this model, security
37+
becomes an external revenue enabler.
38+
39+
This explains why we are obsessed with **Receipts**. A log entry is a passive
40+
liability you store in case something goes wrong. A cryptographic receipt, like
41+
a Proof-of-Action Receipt (PoAR), is an active **asset**. It is a
42+
self-contained, verifiable, and portable piece of evidence designed to be
43+
shared, insured, and settled upon. With this shift, your systems can stop being
44+
a cost center for storing logs and start being a value creator that mints
45+
tradable proof.
46+
47+
## Name the Category: Receipt Rails, Not Better Logging
48+
49+
Because the "Verifiable Ledger Mentality" is new, people will try to fit it into
50+
old categories. The deepest challenge is that we are creating a new category:
51+
**"Settlement-grade operational evidence,"** delivered via **Receipt Rails.**
52+
53+
If you mis-categorize the system, its value is obscured. Here are the most
54+
common misfits:
55+
56+
- **"It's just better logging."** No. A log is a liability—data to be stored and
57+
searched reactively. A receipt is an asset—a cryptographic instrument designed
58+
to be proactively shared and settled. It has a defined lifecycle, value, and
59+
is understood by multiple parties.
60+
- **"It's blockchain for enterprise."** No. This is not about consensus or a
61+
single global ledger. Receipts are generated at the edge, off-chain, and
62+
stored in per-identity ledgers (Sigchains). It is designed for performance and
63+
privacy, using optional hash-anchoring only when public timestamping is
64+
required.
65+
- **"It's another IAM/audit tool."** No. It's the infrastructure that makes your
66+
IAM and audit systems interoperable and their outputs valuable. It doesn't
67+
replace your identity provider; it gives it a way to issue portable
68+
**Capabilities**. It doesn't replace your audit framework; it feeds it with
69+
verifiable proof that dramatically lowers your cost of compliance.
70+
71+
The core product of this new category is the **Verifiable Outcome Receipt
72+
(VOR)** and its supporting artifacts. Think of it not as a tool you install, but
73+
as a utility you connect to—a set of rails for moving verifiable truth between
74+
organizations.
75+
76+
## Governance People Trust: The ATN, TAP, and RAM
77+
78+
Centralized systems feel safe because they offer a single "throat to choke." A
79+
federated network can feel amorphous and risky. This is why our model is not
80+
just a protocol; it's a governed ecosystem.
81+
82+
The core hurdle is overcoming the fear that decentralization means chaos. Our
83+
answer is the **Accredited Trust Network (ATN)**, a framework that creates
84+
resilience and accountability through three key instruments:
85+
86+
- **The ATN (Accredited Trust Network):** This isn't a free-for-all. It's a
87+
well-governed federation of participants who agree to operate by a shared set
88+
of rules. Think of it like the network of banks that agree to honor Visa
89+
transactions—they don't have a single central operator, but they have a shared
90+
standard that makes the whole system work.
91+
- **The TAP (Threat & Acceptance Profile):** This is the **rulebook**. For any
92+
given use case (like DevOps or energy grid management), the TAP defines what
93+
constitutes a valid, secure, and acceptable receipt. It's the technical and
94+
operational standard that participants in that wedge agree to.
95+
- **The RAM (Receipt Acceptance Memo):** This is the **social contract**. A RAM
96+
is a signed memo from a key Verifier (an insurer, auditor, or regulator)
97+
stating, "We will accept any receipt that conforms to TAP-01 as binding
98+
evidence for settling claims or satisfying compliance."
99+
100+
This model fundamentally changes the conversation. The question is no longer,
101+
"Do I trust Polykey?" The question becomes, "Does this receipt conform to the
102+
TAP that my insurer has already signed off on in a RAM?" It replaces vendor
103+
trust with verifiable, contractual acceptance.
104+
105+
## Dual‑Plane Reality: Capabilities Govern Tokens
106+
107+
A common technical hurdle is the tension between cryptographic purity and
108+
real-world practicality. Our architecture is explicitly dual-plane. We don't
109+
fight this dualism; we govern it.
110+
111+
- **The Control Plane (The Authority Fabric):** This is the elegant, "vitamin"
112+
part of our system. It is **asymmetric and identity-bound.** It operates on
113+
**Capabilities**, granular, signed grants of authority that are presented with
114+
proof-of-possession. This is where identity, attenuation, and revocation live.
115+
- **The Data Plane (The Secret Store):** This is the pragmatic, "painkiller"
116+
part of our system. It acknowledges that the world still runs on **symmetric,
117+
secret-bound authority** (bearer tokens, API keys). The Polykey Vault is
118+
designed to be best-in-class cold storage for these secrets.
119+
120+
The magic is how the control plane governs the data plane. An actor presents an
121+
identity-bound **Capability** to a **Capability Enforcement Point (CEP)**. The
122+
CEP verifies the capability and _then_ safely interacts with the secret-bound
123+
world on the actor's behalf. It does this in one of three modes:
124+
125+
1. **Mediate:** The CEP holds the secret and makes the API call for you. No
126+
secret is ever exposed.
127+
2. **Derive:** The CEP uses its master secret to create a short-lived,
128+
narrowly-scoped token for you.
129+
3. **Reveal:** In rare, break-glass scenarios, the CEP can reveal the raw
130+
secret, but this action creates an urgent, high-priority receipt for
131+
immediate audit.
132+
133+
This architecture allows you to get the security, audit, and portability
134+
benefits of an identity-bound system while still safely interacting with every
135+
secret-bound tool in your existing DevOps workflow.
136+
137+
## Compliance vs. Composability: "Who Says This Counts?"
138+
139+
A cryptographically perfect system is commercially useless if no one accepts its
140+
outputs. The most critical hurdle is answering the skeptic who asks, "This is
141+
all great theory, but who actually _says_ your receipts are valid? Does my
142+
auditor, my insurer, or my lawyer care?"
143+
144+
Our system is designed to bridge the gap between what is technically possible
145+
(**composability**) and what is commercially required (**compliance**). The
146+
answer to "Who says this counts?" is never "Trust the math." It is, "The people
147+
you already pay for compliance and risk transfer say it counts."
148+
149+
This is achieved through our go-to-market strategy, which is centered on the
150+
**Receipt Acceptance Memo (RAM)**:
151+
152+
- **The Wedge Strategy:** We don't try to boil the ocean. We focus on a
153+
specific, high-value "wedge," like satisfying a particular SOC 2 control for
154+
DevOps workflows.
155+
- **Acceptance Diplomacy:** We work with the key verifiers in that wedge—the
156+
auditors, the insurers—to co-author a **Threat & Acceptance Profile (TAP)**
157+
that defines exactly what a valid receipt needs to contain to serve as
158+
evidence for that control.
159+
- **The RAM Flips the Market:** The final step is getting that verifier to sign
160+
a RAM. This memo makes acceptance explicit. It says, "We, the auditor, will
161+
accept any receipt conforming to this TAP as sufficient evidence for this
162+
control."
163+
164+
This approach fundamentally helps your organization. Instead of pushing a new,
165+
unproven technology to a compliance department, the system arrives with
166+
pre-approved acceptance from their own auditors. One RAM in one wedge creates
167+
the beachhead that proves the economic and legal value of the entire system for
168+
everyone involved.
169+
170+
You may be using Polykey to solve a practical problem, like managing secrets in
171+
a CI/CD pipeline. But beneath that toolset lies a fundamental shift in how to
172+
think about security and trust.
173+
174+
This shift is from a Fortress Mentality to a Verifiable Ledger Mentality. The
175+
old world is about prevention: building walls to stop bad things from happening.
176+
This model is about proof: creating an indisputable, portable, and
177+
settlement-grade record of what actually happened.
178+
179+
Because this approach creates a new category of infrastructure: Receipt Rails.
180+
It's easy to miscast it. You might ask: Is this just better logging? A private
181+
blockchain? Another IAM tool? The answer is no.
182+
183+
This page is the bridge from the 'how' to the 'why'. It is a reference for both
184+
the engineer wondering why we mint 'receipts' instead of logs, and the architect
185+
evaluating the entire system. Use it to clear the common hurdles and understand
186+
how we turn operational events into verifiable, economic assets.
187+
188+
## Value by Role: Show Me, Don’t Tell Me
189+
190+
The grand narrative is powerful, but you will likely adopt this system because
191+
it solves an immediate, painful problem. The key is to translate the abstract
192+
benefits of provability into concrete value for each stakeholder in your
193+
organization.
194+
195+
- **For Developers & DevOps: The "Friction vs. Reward" Hurdle** **Their
196+
Default:** _"This sounds complicated. A JWT and a log entry is faster."_ **The
197+
Value:** The immediate entry point is the **Polykey Vault**. It solves the
198+
practical, painful problem of secret management more securely and efficiently
199+
than ad-hoc workflows. This provides the "painkiller" first; the powerful
200+
benefits of verifiable receipts become a seamless byproduct of solving a
201+
problem you already have.
202+
- **For CISOs & Compliance: The "Checklist vs. Reality" Hurdle** **Their
203+
Default:** _"This isn't on my SOC 2 checklist. My auditor has never heard of a
204+
VOR."_ **The Value:** The **Receipt Acceptance Memo (RAM)** is the answer for
205+
your compliance teams. It bridges the gap between this advanced system and
206+
legacy frameworks by providing pre-negotiated, signed approval from auditors,
207+
stating that these receipts are an acceptable form of evidence.
208+
- **For Insurers & Auditors: The "Actuarial vs. Evidentiary" Hurdle** **Their
209+
Default:** _"Our models are based on statistical losses. We don't know how to
210+
price a cryptographic receipt."_ **The Value:** For the verifiers in your
211+
ecosystem, the value is a measurable reduction in their single biggest cost:
212+
dispute resolution and fraud investigation. Receipts provide a stronger,
213+
cheaper, and faster way to verify what happened, directly impacting their loss
214+
adjustment expenses.
215+
- **For Legal & Finance: The "Admissibility vs. Settlement" Hurdle** **Their
216+
Default:** _"How does this map to traditional evidence rules and contract
217+
enforcement?"_ **The Value:** A simple analogy is powerful for your legal
218+
teams. A cryptographic receipt is like a notarized document, but the "notary"
219+
is mathematics. It provides a cryptographically assured chain of custody that
220+
is stronger, and therefore more admissible, than many traditional methods.
221+
222+
## Privacy Without Surveillance
223+
224+
A system that creates a verifiable record of every important action can be
225+
misconstrued as a surveillance tool. This is a fundamental misreading of the
226+
architecture, which is designed for **proof with privacy**. The goal is to give
227+
you, the data owner, granular control over who sees what, when, and why.
228+
229+
- **"This centralizes all our logs."** No. The system is federated by design.
230+
Receipts are written to **per-identity ledgers (Sigchains)**, not a single,
231+
monolithic database. There is no central aggregator with a god's-eye view.
232+
Data is replicated selectively based on rules you help define in the TAP.
233+
- **"This is going to leak PII."** No. The protocol is designed to separate
234+
claims from evidence. Receipts can make verifiable claims (e.g., "this user is
235+
over 21") without revealing the underlying PII (their date of birth). Evidence
236+
can be encrypted, redacted, and selectively disclosed using **ViewReceipts**,
237+
ensuring a verifier only gets the minimum information necessary.
238+
239+
The governing principle is simple: the system is built to prove facts, not to
240+
expose your data.
241+
242+
## FAQ: The Usual Misframings
243+
244+
- **“This is just blockchain.”** No. It is an edge-native, off-chain system.
245+
Receipts are generated and stored on per-identity ledgers without requiring a
246+
distributed consensus mechanism. It is built for performance and privacy, with
247+
optional hash anchors to a public chain only for specific timestamping use
248+
cases.
249+
- **“This replaces our IAM.”** No. It makes your existing IAM/OPA systems
250+
interoperable and their outputs far more valuable. It consumes the identity
251+
from your provider to issue portable **Capabilities** that can cross trust
252+
boundaries, and then it generates the **Receipts** that prove how that
253+
identity was used.
254+
- **“This is too complex for our critical OT/industrial systems.”** This isn't
255+
about replacing deterministic PLC logic. It's about adding a "receipt printer"
256+
to it. It provides a simple, reliable way to prove that a critical action
257+
(like a demand response event) actually happened, so you or your partners can
258+
get paid or satisfy compliance faster and with less dispute.

docs/theory/receipt-rails-operational-flow.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,17 @@ sequenceDiagram
137137
alt Principal-side CEP (placement=P, bridging=true) [PS-BA]
138138
Note over P: If P and R are the same trust boundary<br>this is effectively native (colocated)<br>bridging=false, PoAR still on P's sigchain
139139
S ->> P: Present capability (Presentation)
140+
Note over P: Σ = verify(Presentation, Grant, Bind, channel, ttl,<br>attenuation?, lease?, allowed-surface?)
140141
break Verification fails at P
141142
Note over P: Deny path<br>Mint DenyReceipt with reason code<br>(binding_mismatch, lease_stale, surface_violation, rate_limit)
142143
Note over P: Write DenyReceipt on P's sigchain
143144
P ->> S: Deliver DenyReceipt
144145
end
145146
alt Mediate at P
146-
Note over P: Verify Presentation + Bind + fresh LeaseRef<br>Record requestDigest vs Allowed-Surface
147147
P ->> R: ToA API call
148148
R -->> P: Result
149149
P -->> S: Result (if requester expects data)
150150
else Derive at P
151-
Note over P: Verify Presentation + Bind + fresh LeaseRef
152151
P ->> S: Short-scope token (session-bound)
153152
S ->> R: ToA API call (using token)
154153
R -->> S: Result
@@ -163,19 +162,20 @@ sequenceDiagram
163162
164163
else Resource-side CEP (placement=R, bridging=false) [native]
165164
S ->> R: Present capability (Presentation)
165+
Note over R: Σ = verify(Presentation, Grant, Bind, channel, ttl,<br>attenuation?)
166166
break Verification fails at R
167167
Note over R: Deny path<br>Mint DenyReceipt with reason code<br>(binding_mismatch, lease_stale, surface_violation, rate_limit)
168168
Note over R: Write DenyReceipt on R's sigchain
169169
R ->> S: Deliver DenyReceipt
170170
end
171-
Note over R: Enforce at Resource CEP
172171
R -->> S: Result (if requester expects data)
173172
Note over R: Write Access PoAR on R's sigchain
174173
R ->> S: Deliver PoAR
175174
176175
else Subject-side CEP (placement=S, bridging=false) [SSA wallet/session]
177176
Note over S: S does not hold long-lived upstream lease.
178177
S ->> S: Present capability (internal Presentation)
178+
Note over S: Σ = verify(Presentation, Grant, Bind, channel, ttl,<br>attenuation?)
179179
break Verification fails at S
180180
Note over S: Deny path<br>Mint DenyReceipt with reason code<br>(binding_mismatch, lease_stale, surface_violation, rate_limit)
181181
Note over S: Write DenyReceipt on S's sigchain
@@ -189,6 +189,7 @@ sequenceDiagram
189189
190190
else Subject-side CEP (placement=S, bridging=true) [SS-BA, rare]
191191
S ->> S: Present capability (internal Presentation)
192+
Note over S: Σ = verify(Presentation, Grant, Bind, channel, ttl,<br>attenuation?, lease?, allowed-surface? for mediate)
192193
break Verification fails at S
193194
Note over S: Deny path<br>Mint DenyReceipt with reason code<br>(binding_mismatch, lease_stale, surface_violation, rate_limit)
194195
Note over S: Write DenyReceipt on S's sigchain

docusaurus.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import type { UserThemeConfig } from '@docusaurus/theme-common';
77
import { themes as prismThemes } from 'prism-react-renderer';
88
import autoprefixer from 'autoprefixer';
99
import tailwindcss from 'tailwindcss';
10+
import remarkMath from 'remark-math';
11+
import rehypeKatex from 'rehype-katex';
1012

1113
const lightCodeTheme = prismThemes.github;
1214
const darkCodeTheme = prismThemes.dracula;
@@ -59,6 +61,10 @@ const pluginDocs: [string, PluginDocsOptions] = [
5961
sidebarPath: './sidebars.ts',
6062
include: ['**/*.md', '**/*.mdx'],
6163
exclude: ['**/_*.{js,jsx,ts,tsx,md,mdx}', '**/_*/**', '**/.**'],
64+
showLastUpdateAuthor: true,
65+
showLastUpdateTime: true,
66+
remarkPlugins: [remarkMath],
67+
rehypePlugins: [rehypeKatex],
6268
},
6369
];
6470

@@ -250,6 +256,15 @@ const config: Config = {
250256
plugins: [pluginSVGR, pluginDocs, pluginTheme, pluginGTag, pluginTailwind],
251257
themes: ['@docusaurus/theme-mermaid'],
252258
themeConfig,
259+
stylesheets: [
260+
{
261+
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
262+
type: 'text/css',
263+
integrity:
264+
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
265+
crossorigin: 'anonymous',
266+
},
267+
],
253268
};
254269

255270
export default config;

flake.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)