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
{{ message }}
Repository navigation
Commit 4f913a8
Browse filesBrowse the repository at this point in the historyBrowse files
Max
committed
docs(nip-fi): close discovery and conformance gaps
Co-authored-by: Max <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@buzz.block.builderlab.xyz>
Signed-off-by: Max <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@buzz.block.builderlab.xyz>
Copy file name to clipboardExpand all lines: docs/nips/NIP-FI-CONF.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,8 +132,9 @@ that drifts and the whole subject of this section is that unguarded restatements
132
132
rot. `policy_denied` and `dependency_unreadable` are core's conditions expressed
133
133
only in prose — a bare policy denial and `FI-INV-14` fail-closed — and core is
134
134
not required to name them symbolically; they are the only two core rows so
135
-
exempted. The remaining rows name conditions the profiles define in prose. None
136
-
is a wire value, and a deployment MAY use different private reason codes
135
+
exempted. The remaining rows name conditions in the owning profiles' literal
136
+
private-denial-condition tables. None is a wire value, and a deployment MAY use
137
+
different private reason codes
137
138
internally as long as every enumerated condition has a fixture.
138
139
139
140
Every row whose public class is `authorization_denied` is in the private-state
@@ -172,14 +173,24 @@ The suite MUST check, mechanically at the claimed head
172
173
`authorization_unavailable`; and
173
174
3. the set of symbols named by core-attributed rows equals core's symbolic
174
175
denial set together with the allowlist, exactly, and the allowlist is
175
-
disjoint from core's symbolic denial set.
176
+
disjoint from core's symbolic denial set; and
177
+
4. for each claimed profile that owns a literal private-denial-condition table,
178
+
the set of `(identifier, public class)` pairs in that table equals the set of
179
+
pairs in rows attributed to that profile here, exactly. A row with multiple
180
+
profile owners contributes its pair to each owner named in that cell.
176
181
177
182
Every check above MUST be run against the unmutated document and be green before
178
183
any mutant is scored. A check that is red on a conforming document detects
179
184
nothing: it cannot be observed to flip, so every mutant reads as caught. Two of
180
185
these checks shipped red for exactly that reason.
181
186
182
-
Check 3 keeps the allowlist honest in both directions. Its equality half catches
187
+
Checks 3 and 4 keep copied enumerations honest in both directions. Check 4
188
+
catches a profile condition renamed, added, removed, reclassified, or attributed
189
+
to the wrong owner without the matching fixture-table change. It is run for each
190
+
claimed owning profile. Rows for an unclaimed profile remain `not-applicable`.
191
+
192
+
Check 3 keeps the core allowlist honest in both directions. Its equality half
193
+
catches
183
194
a core-attributed row core never emits. Its disjointness half is what makes
184
195
promotion visible: if a later core turns `policy_denied` or
185
196
`dependency_unreadable` into a named symbol, every other check still passes —
@@ -415,7 +426,7 @@ They close no item in this gate.
415
426
| ID | Required outcome |
416
427
|---|---|
417
428
|`FI-CONF-CLAIM-COMPLETE`| A report missing an applicable oracle, duplicating one, carrying a result from another claim tuple, or claiming a status other than `pass`/`not-applicable` is rejected. |
418
-
|`FI-CONF-DENIAL-FIXTURES`| Every enumerated private condition has a fixture; anonymity-set responses compare byte-identical; the distinguishing negative control fails. |
429
+
|`FI-CONF-DENIAL-FIXTURES`| Every enumerated private condition has a fixture; core and each claimed profile pass exact identifier/class/owner enumeration agreement; anonymity-set responses compare byte-identical; the distinguishing negative control fails. |
419
430
|`FI-CONF-MUTATION`| Every listed oracle has a singly-applied, attributed, reachability-witnessed mutant killed by that entry's own oracle; survivors are recorded, not waived. |
420
431
|`FI-CONF-INTEROP-EXIT`| Two independent implementations produce, from the documents alone, valid requests equal over the request compared object and per-class denials equal over the denial compared object, and accept each other's output. |
The fixture JWT represents a separately minted `nip-fi+jwt` assertion and is opaque
252
252
test input; its deliberately synthetic signature is not an assertion-validation
253
253
vector. Implementations MUST reproduce each field, complete pre-MAC input,
254
-
diagnostic input digest, raw MAC, and wire MAC exactly.
254
+
diagnostic input digest, raw MAC, and wire MAC exactly
255
+
(`FI-TRACE-EDGE-VECTORS`).
255
256
256
257
### Vector 1: HTTP / NIP-98 / non-empty payload
257
258
@@ -343,14 +344,20 @@ Every implementation MUST run these normative negative cases:
343
344
344
345
## Discovery and conformance
345
346
346
-
A relay that completely implements the stock profile MAY list
347
-
`trusted-proxy-hmac-v2` in NIP-11's NIP-FI transport discovery. It MUST NOT advertise
348
-
private adapters, keys, domains, field names, or code contracts. Claiming FI-EDGE
347
+
A relay that completely implements the stock profile MAY add exactly
348
+
`"edge_transports": ["trusted-proxy-hmac-v2"]` inside the top-level NIP-11
349
+
`federated_identity` object. `edge_transports` is an array of unique ASCII string
350
+
profile identifiers in ascending bytewise order; this document assigns only the
351
+
single value shown. A relay that does not completely implement the stock profile
352
+
MUST omit the member. It MUST NOT advertise private adapters, keys, domains, field
353
+
names, or code contracts. No request may select behavior from this discovery
354
+
member; server-owned configuration selects the edge profile. Claiming FI-EDGE
349
355
requires every configured edge profile to pass the applicable core conformance suite
350
356
and these profile traces:
351
357
352
358
| Trace | Required oracle |
353
359
|---|---|
360
+
|`FI-TRACE-EDGE-VECTORS`| Reproduce all three normative vectors field-for-field, including each complete pre-MAC input, diagnostic input digest, raw MAC, and wire MAC; reproduce all five timestamp serialization rows; every listed serialization and negative-matrix case produces its required denial or configuration failure. |
354
361
|`FI-TRACE-PROXY-SPOOF`| Direct ingress, unsigned/header-only identity, unauthenticated caller, or invalid provenance denies without fallback. |
355
362
|`FI-TRACE-PROXY-REPLAY`| Two HMAC-v2 final admissions using one nonce commit at most one; preparation consumes neither. A private adapter proves its declared replay semantics. |
356
363
|`FI-TRACE-PROXY-CROSS-REQUEST`| Each protected component mutation denies. HMAC-v2 covers assertion, domain, method, authority, path/query, complete body, proof transport, and peer. |
0 commit comments