Skip to content

Commit 4f913a8

Browse files
author
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>
1 parent 17d455a commit 4f913a8

5 files changed

Lines changed: 64 additions & 16 deletions

File tree

‎docs/nips/NIP-FI-CONF.md‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ that drifts and the whole subject of this section is that unguarded restatements
132132
rot. `policy_denied` and `dependency_unreadable` are core's conditions expressed
133133
only in prose — a bare policy denial and `FI-INV-14` fail-closed — and core is
134134
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
137138
internally as long as every enumerated condition has a fixture.
138139

139140
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
172173
`authorization_unavailable`; and
173174
3. the set of symbols named by core-attributed rows equals core's symbolic
174175
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.
176181

177182
Every check above MUST be run against the unmutated document and be green before
178183
any mutant is scored. A check that is red on a conforming document detects
179184
nothing: it cannot be observed to flip, so every mutant reads as caught. Two of
180185
these checks shipped red for exactly that reason.
181186

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
183194
a core-attributed row core never emits. Its disjointness half is what makes
184195
promotion visible: if a later core turns `policy_denied` or
185196
`dependency_unreadable` into a named symbol, every other check still passes —
@@ -415,7 +426,7 @@ They close no item in this gate.
415426
| ID | Required outcome |
416427
|---|---|
417428
| `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. |
419430
| `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. |
420431
| `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. |
421432

‎docs/nips/NIP-FI-DELEG.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ A delegated request carries fresh request-appropriate Nostr proof and no
5858
`Nostr-Federated-Identity` or profile provenance field. Mixed direct and
5959
delegated evidence denies rather than selecting a path. [FI-DELEG-PATH-SEPARATION]
6060

61+
## Private denial conditions
62+
63+
This profile defines exactly this private condition identifier and owning public
64+
class for NIP-FI-CONF enumeration agreement:
65+
66+
| Private condition identifier | Public class |
67+
|---|---|
68+
| `delegation_not_current` | `authorization_denied` |
69+
70+
The identifier is a fixture name, not a wire value. Adding, removing, renaming,
71+
or reclassifying it requires the same change in NIP-FI-CONF's denial-fixture
72+
table.
73+
6174
## Preparation
6275

6376
Preparation resolves the exact server-owned domain, target context, operation,

‎docs/nips/NIP-FI-EDGE.md‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ assertion_digest_hex = 6103b52a52730bc065d65673247603a63c9810488c90d0ada3d8d227e
251251
The fixture JWT represents a separately minted `nip-fi+jwt` assertion and is opaque
252252
test input; its deliberately synthetic signature is not an assertion-validation
253253
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`).
255256

256257
### Vector 1: HTTP / NIP-98 / non-empty payload
257258

@@ -343,14 +344,20 @@ Every implementation MUST run these normative negative cases:
343344

344345
## Discovery and conformance
345346

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
349355
requires every configured edge profile to pass the applicable core conformance suite
350356
and these profile traces:
351357

352358
| Trace | Required oracle |
353359
|---|---|
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. |
354361
| `FI-TRACE-PROXY-SPOOF` | Direct ingress, unsigned/header-only identity, unauthenticated caller, or invalid provenance denies without fallback. |
355362
| `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. |
356363
| `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. |

‎docs/nips/NIP-FI-LIFECYCLE.md‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ binding version. There is at most one pending lineage per identity.
5454
`binding_not_after` bounds the grant represented by **one binding**; it is not a
5555
bound on the identity. Rotation continues the same grant: the replacement binding
5656
preserves the carried bound, and only expiry authority changes it. Retirement,
57-
revocation, disablement, re-enablement, provisioning, and ordinary enrollment
58-
establish a *new* grant that carries no prior bound — so retirement of a bound
59-
pair followed by ordinary enrollment under `attested-key` or `tofu` policy yields
60-
an unbounded binding, and that is conformant. A deadline that must survive the end
57+
revocation, and disablement end the existing grant. Re-enablement, provisioning,
58+
and ordinary enrollment establish a *new* grant that carries no prior bound — so
59+
retirement of a bound pair followed by ordinary enrollment under `attested-key`
60+
or `tofu` policy yields an unbounded binding, and that is conformant. A deadline that must survive the end
6161
of a grant — an identity-scoped access bound — belongs in the capability
6262
projection of authoritative local-policy state, which core already requires for
6363
any projection whose removal must close authority within a declared bound and
@@ -84,6 +84,21 @@ absent `binding_not_after` has no administrative expiry. Assertion `exp`,
8484
`iat`, refresh, or maximum age never creates, renews, extends, or clears it.
8585
Time passage alone creates no tombstone, lineage, or history.
8686

87+
## Private denial conditions
88+
89+
This profile defines exactly these private condition identifiers and owning
90+
public classes for NIP-FI-CONF enumeration agreement:
91+
92+
| Private condition identifier | Public class |
93+
|---|---|
94+
| `identity_disabled` | `authorization_denied` |
95+
| `explicit_replacement_required` | `authorization_denied` |
96+
| `binding_expired` | `authorization_denied` |
97+
98+
The identifiers are fixture names, not wire values. Adding, removing, renaming,
99+
or reclassifying one requires the same change in NIP-FI-CONF's denial-fixture
100+
table.
101+
87102
## Common transition contract
88103

89104
Each transition below requires privileged authority distinct from an ordinary

‎docs/nips/NIP-FI.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,11 @@ A relay SHOULD advertise core support in NIP-11 as:
498498
}
499499
```
500500

501-
For `current-status`, the final value is a tested positive integer. Discovery
502-
never states enrollment mode or TOFU posture and never exposes issuer URLs,
503-
audiences, claim names, tenant IDs, or deployment-local identifiers. For a fixed
501+
NIP-FI-EDGE owns the optional `edge_transports` member and its exact type,
502+
placement, and value semantics. For `current-status`, the final value is a tested
503+
positive integer. Discovery never states enrollment mode or TOFU posture and
504+
never exposes issuer URLs, audiences, claim names, tenant IDs, or
505+
deployment-local identifiers. For a fixed
504506
set of claimed profiles, the complete public discovery output is byte-identical
505507
for every enrollment policy, including `attested-key`, private `tofu`, and any
506508
companion profile mode: no field, flag, value, omission, ordering, or object shape

0 commit comments

Comments
 (0)