Skip to content

Commit f2c4ce7

Browse files
browcodex
andcommitted
docs(nip-pl): keep canonical gateway profile
Signed-off-by: Tom Brow <[email protected]> Co-authored-by: Codex <[email protected]> Ai-assisted: true
1 parent bbc6cf3 commit f2c4ce7

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎docs/nips/NIP-PL.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ A pubkey-only client cannot create, replace, or revoke a lease. If a platform en
258258

259259
Implementations MUST NOT interpret this section as NIP-26 delegation. A future specification may define a narrowly scoped installation authorization for unattended endpoint rotation, but such a capability is neither required nor implied here.
260260

261-
## APNs Gateway Profile (Buzz, normative)
261+
## Public APNs Gateway Profile (Buzz, normative)
262262

263-
This section registers a last-hop profile served at a deployment-configured HTTPS origin. It is an optional profile of NIP-PL, but every requirement in this section is normative for implementations that use it. The configured origin has no credentials, port, path, query, or fragment. The gateway is stateful: it retains installation authority, encrypted APNs-token custody, relay delegations, replay reservations, and endpoint quotas. The relay remains the executor and retains lease acceptance, matching, tenant authorization, endpoint uniqueness, coalescing, durable jobs/retries, and lease-generation invalidation.
263+
This section registers the public last-hop profile served at `https://push.buzz.xyz`. It is an optional profile of NIP-PL, but every requirement in this section is normative for implementations that use it. The gateway is stateful: it retains installation authority, encrypted APNs-token custody, relay delegations, replay reservations, and endpoint quotas. The relay remains the executor and retains lease acceptance, matching, tenant authorization, endpoint uniqueness, coalescing, durable jobs/retries, and lease-generation invalidation.
264264

265265
### Registered values and lease mapping
266266

267267
The registered `app_profile` value is `buzz-ios-dogfood`. It identifies the
268268
closed Buzz dogfood application identity, not an APNs transport environment.
269-
The configured gateway owns its exact App Attest application identifier, APNs
269+
The canonical gateway owns its exact App Attest application identifier, APNs
270270
topic, certificate-backed connection pool, and APNs environment. Enrollment
271271
succeeds only when App Attest cryptographically verifies the configured
272272
application identifier. The gateway MUST NOT accept an APNs topic from a client. The APNs token
@@ -289,7 +289,7 @@ Every App Attest operation signs a **transcript**, not the received request byte
289289
<domain> + "\\n" + <compact ordered JSON object>
290290
```
291291

292-
The JSON object has no insignificant whitespace and members appear in the exact order shown below. Strings use JSON escaping for quotation mark, reverse solidus, and U+0000..U+001F; all authority-bearing strings admitted by this profile are ASCII. UUID strings are canonical lowercase-hyphenated. Integers use shortest decimal notation. The `audience` value is the configured gateway origin plus the fixed route shown below. It is part of the signed object and prevents cross-origin and cross-route use. For enrollment, these exact transcript bytes are the App Attest `clientData` supplied to attestation verification. For every assertion route, `clientDataHash = SHA-256(transcript bytes)` is verified by App Attest. The separately stored challenge must equal the request `challenge`, is single-use, expires after 300 seconds, and is consumed only after successful cryptographic verification. Assertion `signCount` MUST strictly increase atomically for the installation.
292+
The JSON object has no insignificant whitespace and members appear in the exact order shown below. Strings use JSON escaping for quotation mark, reverse solidus, and U+0000..U+001F; all authority-bearing strings admitted by this profile are ASCII. UUID strings are canonical lowercase-hyphenated. Integers use shortest decimal notation. The fixed `audience` value is part of the signed object and prevents cross-route use. For enrollment, these exact transcript bytes are the App Attest `clientData` supplied to attestation verification. For every assertion route, `clientDataHash = SHA-256(transcript bytes)` is verified by App Attest. The separately stored challenge must equal the request `challenge`, is single-use, expires after 300 seconds, and is consumed only after successful cryptographic verification. Assertion `signCount` MUST strictly increase atomically for the installation.
293293

294294
### Challenge
295295

@@ -318,7 +318,7 @@ Request members, in any request order:
318318
`expires_at` MUST satisfy `now < expires_at <= now + configured_max_installation_lifetime`; the selected profile MUST be enabled. The exact transcript is domain `buzz.push.enroll.v1` followed by this ordered object:
319319

320320
```json
321-
{"v":1,"audience":"<gateway-origin>/v1/installations","challenge_id":"<uuid>","challenge":"<challenge>","key_id":"<standard-base64>","app_profile":"<registered-profile>","endpoint":"<lowercase-hex>","endpoint_epoch":1,"expires_at":<unix-seconds>}
321+
{"v":1,"audience":"https://push.buzz.xyz/v1/installations","challenge_id":"<uuid>","challenge":"<challenge>","key_id":"<standard-base64>","app_profile":"<registered-profile>","endpoint":"<lowercase-hex>","endpoint_epoch":1,"expires_at":<unix-seconds>}
322322
```
323323

324324
The gateway verifies Apple's attestation chain, configured application identifier, production AAGUID, key identifier, and transcript. Apple documents no APNs-token-to-App-Attest-key binding; token provenance at enrollment is an explicit bootstrap assumption. It then stores only encrypted token custody plus its fingerprint. Success `201`:
@@ -342,7 +342,7 @@ Invalid attestation is `401 invalid_attestation`; a consumed/expired challenge o
342342
`not_before <= now + 300`, `not_before < expires_at`, and `expires_at <= now + configured_max_grant_lifetime`. The endpoint epoch MUST equal the current installation epoch. For each `(installation_handle, relay_pubkey)`, generation MUST strictly increase. A successful delegation atomically extends the authenticated installation lifetime through at least the delegation's `expires_at`, allowing renewal without duplicate token enrollment. Transcript domain `buzz.push.delegate.v1`; ordered object:
343343

344344
```json
345-
{"v":1,"audience":"<gateway-origin>/v1/delegations","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"generation":<integer>,"relay_pubkey":"<hex>","not_before":<integer>,"expires_at":<integer>}
345+
{"v":1,"audience":"https://push.buzz.xyz/v1/delegations","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"generation":<integer>,"relay_pubkey":"<hex>","not_before":<integer>,"expires_at":<integer>}
346346
```
347347

348348
Success `201`: `{"endpoint_grant":"<opaque-capability>"}`. The sealed grant contains no APNs token. Grant-key rotation MUST retain decrypt-only predecessor keys through the maximum lifetime of grants they issued.
@@ -358,7 +358,7 @@ Success `201`: `{"endpoint_grant":"<opaque-capability>"}`. The sealed grant cont
358358
`new_endpoint_epoch` MUST equal `endpoint_epoch + 1` without overflow. Transcript domain `buzz.push.rotate-endpoint.v1`; ordered object:
359359

360360
```json
361-
{"v":1,"audience":"<gateway-origin>/v1/installations/endpoint","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"new_endpoint_epoch":<integer>,"endpoint":"<lowercase-hex>"}
361+
{"v":1,"audience":"https://push.buzz.xyz/v1/installations/endpoint","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"new_endpoint_epoch":<integer>,"endpoint":"<lowercase-hex>"}
362362
```
363363

364364
A successful atomic rotation invalidates every grant sealed to the old epoch and returns `200 {"status":"rotated"}`.
@@ -374,7 +374,7 @@ A successful atomic rotation invalidates every grant sealed to the old epoch and
374374
Transcript domain `buzz.push.revoke-delegation.v1`; ordered object:
375375

376376
```json
377-
{"v":1,"audience":"<gateway-origin>/v1/delegations/revoke","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","relay_pubkey":"<hex>","generation":<integer>}
377+
{"v":1,"audience":"https://push.buzz.xyz/v1/delegations/revoke","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","relay_pubkey":"<hex>","generation":<integer>}
378378
```
379379

380380
The generation identifies the current delegation generation. Success is `200 {"status":"revoked"}`.
@@ -388,14 +388,14 @@ The generation identifies the current delegation generation. Success is `200 {"s
388388
`new_endpoint_epoch` MUST equal `endpoint_epoch + 1` without overflow. Transcript domain `buzz.push.revoke-installation.v1`; ordered object:
389389

390390
```json
391-
{"v":1,"audience":"<gateway-origin>/v1/installations/revoke","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"new_endpoint_epoch":<integer>}
391+
{"v":1,"audience":"https://push.buzz.xyz/v1/installations/revoke","challenge_id":"<uuid>","challenge":"<challenge>","installation_handle":"<uuid>","endpoint_epoch":<integer>,"new_endpoint_epoch":<integer>}
392392
```
393393

394394
Success is `200 {"status":"revoked"}`. The revocation atomically invalidates the installation and every delegation.
395395

396396
### Relay delivery
397397

398-
`POST /v1/deliveries/apns` has the exact externally configured URL `<gateway-origin>/v1/deliveries/apns`. Request:
398+
`POST /v1/deliveries/apns` has the exact externally configured URL `https://push.buzz.xyz/v1/deliveries/apns`. Request:
399399

400400
```json
401401
{"v":1,"endpoint_grant":"<opaque-capability>","request_id":"<uuid>","expires_at":<unix-seconds>}
@@ -449,4 +449,4 @@ Zombie leases (e.g. `#h` after leaving a channel) are neutralized by match-time
449449
- NIP-11 `supported_extensions`: contains `"nip-pl"` pre-numbering; descriptor object `push` as specified in Executor Discovery
450450
- Classes: `silent`, `default`, `time_sensitive`, `urgent`
451451
- `h_grammar` values: `"uuid-v4-lowercase"` (initial entry; origins may register additional grammars with this NIP)
452-
- APNs gateway profile: deployment-configured HTTPS origin; app profile `buzz-ios-dogfood`; wire version `1`
452+
- Public APNs gateway profile: base URL `https://push.buzz.xyz`; app profile `buzz-ios-dogfood`; wire version `1`

0 commit comments

Comments
 (0)