Skip to content

Commit b36ccf1

Browse files
lidelhacdias
authored andcommitted
ipip-0351: final editorial fixes
1 parent 5bda58f commit b36ccf1

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/ipips/ipip-0351.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ editors:
66
- name: Henrique Dias
77
github: hacdias
88
url: https://hacdias.com/
9+
- name: Marcin Rataj
10+
github: lidel
11+
url: https://lidel.org/
912
relatedIssues:
1013
- https://github.com/ipfs/specs/issues/320
1114
- https://github.com/ipfs/specs/pull/351
@@ -33,15 +36,29 @@ under the `/ipns` namespace.
3336

3437
In this IPIP, we propose adding :cite[ipns-record] as a response
3538
format to the gateway under the `/ipns` namespace, allowing for trustless
36-
retrieval of IPNS records.
39+
retrieval of IPNS records over HTTP as [application/vnd.ipfs.ipns-record](https://www.iana.org/assignments/media-types/application/vnd.ipfs.ipns-record) content type (multicodec `0x0300`).
3740

3841
## Detailed design
3942

40-
The solution is to allow the Gateway to provide an IPNS signed record by
41-
requesting it using either the `Accept` HTTP header or the `format` URL query.
43+
- :cite[trustless-gateway] can now provide a signed IPNS record upon request for `/ipns/{ipns-name}` path.
44+
- To request the IPNS record, use one of the following methods:
45+
- Include the `Accept: application/vnd.ipfs.ipns-record` HTTP header in the request.
46+
- Include the `format=ipns-record` query parameter in the request URL.
47+
- The HTTP response containing the verifiable IPNS record will have the following format:
48+
- Header: `Content-Type: application/vnd.ipfs.ipns-record`
49+
- Body: :cite[ipns-record] serialized as the `IpnsEntry` protobuf.
4250

4351
## Test fixtures
4452

53+
This IPIP got ratified before
54+
[gateway-conformance](https://github.com/ipfs/gateway-conformance) existed.
55+
56+
57+
The [reference implementation in Kubo 0.19](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.19.md#signed-ipns-record-response-format)
58+
provides reusable [assertions](https://github.com/ipfs/kubo/blob/v0.19.2/test/sharness/t0124-gateway-ipns-record.sh).
59+
60+
:::issue
61+
Until vendor-agnostic fixtures are added to the conformance test suite ([tracking issue](https://github.com/ipfs/gateway-conformance/issues/3)),
4562
IPNS records for testing can be generated in Kubo by creating an IPNS record:
4663

4764
```bash
@@ -53,6 +70,7 @@ Published to k51Key: /ipfs/bafyHash
5370

5471
$ ipfs routing get /ipns/k51Key > key.pb
5572
```
73+
:::
5674

5775
## Design rationale
5876

0 commit comments

Comments
 (0)