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-379: Delegated IPNS HTTP API #379

Merged
merged 4 commits into from
Jun 15, 2023
Merged

IPIP-379: Delegated IPNS HTTP API #379

merged 4 commits into from
Jun 15, 2023

Conversation

masih
Copy link
Member

@masih masih commented Feb 15, 2023

Propose HTTP APIs for delegated naming system that enables offloading of naming system to other processes or servers.

Relates to:

Fixes #343

@masih masih marked this pull request as ready for review February 15, 2023 22:37
@masih masih requested a review from a team as a code owner February 15, 2023 22:37
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.

Thank you for submitting this @masih 🙏

Dropped quick feedback around JSON and Signatures, and including canonical serialization protobuf format as mandatory part of spec (need to support canonical serialization because entire ecosystem expects that).

We could also have JSON as default for quick eyeballing, don't feel strongly about it nor find much utility: it feels like a distraction/security UX/DX footgun but lmk if you had some specific use cases that depend on introducing this additional JSON serialization format

routing/DELEGATED_NAMING_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_NAMING_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_NAMING_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_NAMING_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_NAMING_HTTP.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-naming-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-naming-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-naming-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-naming-http-api.md Outdated Show resolved Hide resolved
@lidel lidel changed the title IPIP-379 Delegated Naming HTTP API IPIP-379 Delegated Naming (IPNS) HTTP API Feb 17, 2023
@lidel lidel changed the title IPIP-379 Delegated Naming (IPNS) HTTP API IPIP-379 Delegated Naming (IPNS GET&PUT) HTTP API Feb 17, 2023
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.

@masih apologies for slow turnaround on this one, wanted to give it a propser thought when i have more time, but it never happened :(

To move things forward, I gave it another pass.

I am ok with making JSON as human-readable as you want – we already made that call in existing /routing/v1/providers, but we can't compromise on signature.

My proposal is to reuse signature and Record Verification steps from the IPNS spec and avoid inventing new things to keep the number of things IPNS implementer needs to do at minimum – details inline.

IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
routing/DELEGATED_IPNS_HTTP.md Outdated Show resolved Hide resolved
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.

@masih i'd like to pick this up and move forward. Are you ok with changes suggested above?

Especially my concerns around signatures in JSON (#379 (comment)) which lack useful spec or use case (who will be using JSON?). Perhaps we could remove JSON from this IPIP for now, and add it in future IPIP, if anyone has use case / need for it?

FYSA me and @hacdias plan to support IPNS GET and PUT in Kubo if cid.contact intents to support it.

IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
IPIP/0379-delegated-ipns-http-api.md Outdated Show resolved Hide resolved
@masih
Copy link
Member Author

masih commented May 18, 2023

@lidel please go ahead we can iterate on remaining issues in separate IPIPs thanks 🙏

@lidel
Copy link
Member

lidel commented May 18, 2023

Ok! We will circle back to this when @hacdias is back next week and we will make it limited to application/vnd.ipfs.ipns-record + have reference implementation in boxo and kubo. Having end users publish IPNS records to both DHT and IPNI by default is our priority.

TODOs:

  • rebase so it shows up on specs.ipfs.tech
  • remove JSON representation, keep application/vnd.ipfs.ipns-record for now, reference IANA registration
  • replace links to specs.ipfs.tech with proper :ref and :cite
  • boxo implementation
  • kubo GETs: uses boxo and resolves IPNS via default IPNI in addition to DHT and optional pubsub
  • kubo PUTs: publishes records to IPNI

@hacdias
Copy link
Member

hacdias commented May 25, 2023

@lidel I rebased the PR and made the following updates:

  • Merged the IPNS routing API with the HTTP Routing V1 specification.
  • Removed the JSON representation as you mentioned.
  • Removed unnecessary Headers.
  • Replaced the links with :ref and :cite.

@hacdias hacdias force-pushed the masih/dlg_routing_ipns branch 2 times, most recently from d9819e1 to 8d73d72 Compare May 29, 2023 10:46
@hacdias hacdias force-pushed the masih/dlg_routing_ipns branch 2 times, most recently from 8ff9b91 to 8394e23 Compare May 30, 2023 14:26
@lidel lidel changed the title IPIP-379 Delegated Naming (IPNS GET&PUT) HTTP API IPIP-379 Delegated IPNS HTTP API May 30, 2023
@lidel lidel changed the title IPIP-379 Delegated IPNS HTTP API IPIP-379: Delegated IPNS HTTP API May 30, 2023
Propose HTTP APIs for delegated naming system that enables offloading of
naming system to other processes or servers.

Relates to:

- #377

Fixes #343
- suggestions from code review
- removes application/json from ipip-379
- removes custom headers from ipip-379
- cleans duplicated errors
- punctuation and others
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.

Applied final editorial tweaks, this looks ready from my end.
Moving to "ready for final review" stage.

Added to the agenda of IPFS Implementers WG call on 2023-06-01 but don't expect issues, since we've reduced the scope to the bare minimum:

@hacdias
Copy link
Member

hacdias commented Jun 5, 2023

I opened a Boxo implementation PR here: ipfs/boxo#333

@lidel
Copy link
Member

lidel commented Jun 15, 2023

No concerns raised during final ratification during IPFS-Implementers-Sync-2023-06-15, ratified, merging.

Thank you @masih and @hacdias for making this happen!

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.

IPIP: Delegated IPNS over HTTP
4 participants