Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPIP-351: IPNS Signed Records Response Format on HTTP Gateways #351

Merged
merged 5 commits into from
May 9, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Nov 29, 2022

Closes #320.

Checklist

@hacdias hacdias changed the title IPIP-XXX: IPNS Signed Records Response Format on HTTP Gateways IPIP-351: IPNS Signed Records Response Format on HTTP Gateways Nov 29, 2022
@hacdias hacdias marked this pull request as ready for review December 8, 2022 11:59
@hacdias hacdias requested review from lidel and a team as code owners December 8, 2022 11:59
@hacdias
Copy link
Member Author

hacdias commented Dec 8, 2022

It's ready for review! Implementation too.

IPIP/0351-gateway-ipns-record-response-format.md Outdated Show resolved Hide resolved
IPIP/0351-gateway-ipns-record-response-format.md Outdated Show resolved Hide resolved

## Detailed design

The solution is to allow the Gateway to provide an IPNS signed record by
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Gateway be capitalized as it is here? (It's lowercase in other places on this doc)

IPIP/0351-gateway-ipns-record-response-format.md Outdated Show resolved Hide resolved
http-gateways/TRUSTLESS_GATEWAY.md Outdated Show resolved Hide resolved
@hacdias
Copy link
Member Author

hacdias commented Feb 14, 2023

@lidel I just rebased and cleaned up this PR.

@@ -188,6 +188,7 @@ For example:
- [application/vnd.ipld.dag-cbor](https://www.iana.org/assignments/media-types/application/vnd.ipld.dag-cbor) – requests [IPLD Data Model](https://ipld.io/docs/data-model/) representation serialized into [DAG-CBOR format](https://ipld.io/docs/codecs/known/dag-cbor/). If the requested CID already has `dag-cbor` (0x71) codec, data is validated as DAG-CBOR before being returned as-is. Invalid DAG-CBON produces HTTP Error 500.
- [application/json](https://www.iana.org/assignments/media-types/application/json) – same as `application/vnd.ipld.dag-json`, unless the CID's codec already is `json` (0x0200). Then, the raw JSON block can be returned as-is without any conversion.
- [application/cbor](https://www.iana.org/assignments/media-types/application/cbor) – same as `application/vnd.ipld.dag-cbor`, unless the CID's codec already is `cbor` (0x51). Then, the raw CBOR block can be returned as-is without any conversion.
- [application/vnd.ipfs.ipns-record](https://www.iana.org/assignments/media-types/application/vnd.ipfs.ipns-record) – requests a verifiable [IPNS Record](../ipns/IPNS.md#ipns-record) to be returned. Produces 400 Bad Request if the content is not under the IPNS namespace, or contains a path.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 need to register before merging

@hacdias
Copy link
Member Author

hacdias commented Mar 30, 2023

@lidel I've rebased the PR. Only thing missing is IANA registration.

We'll need another rebase if #385 gets merged first though.

@aschmahmann
Copy link
Contributor

From @lidel: Will try to take care of IANA things this week and either way can merge by the end of the week (5/12/23)

@hacdias hacdias force-pushed the ipns-records-gateway branch 3 times, most recently from c2a4779 to b36ccf1 Compare May 9, 2023 15:04
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This IPIP got ratified before Kubo 0.19, but we had no time to finalize editorials.

Pushed final tweaks, and references to text fixtures/asserts implementers could follow.

Merging. IANA submission will be tracked in ipfs/in-web-browsers#209

@hacdias hacdias merged commit b3ab660 into main May 9, 2023
@hacdias hacdias deleted the ipns-records-gateway branch May 9, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ratified
Archived in project
Development

Successfully merging this pull request may close these issues.

Gateway: response type for fetching signed IPNS records
4 participants