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

core/corehttp!: remove /api/v0 from gateway port #10352

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Feb 27, 2024

Removes /api/v0 from the gateway port. Closes #10312.

We can merge this before the final 0.27 release. I will have to cherry-pick anyways.

@hacdias hacdias changed the title Remove api on gateway core/corehttp: remove /api/v0 from gateway port Feb 27, 2024
@hacdias hacdias self-assigned this Feb 27, 2024
@hacdias hacdias changed the title core/corehttp: remove /api/v0 from gateway port core/corehttp˜: remove /api/v0 from gateway port Feb 27, 2024
@hacdias hacdias changed the title core/corehttp˜: remove /api/v0 from gateway port core/corehttp!: remove /api/v0 from gateway port Feb 27, 2024
@hacdias hacdias mentioned this pull request Feb 27, 2024
11 tasks
@hacdias hacdias marked this pull request as ready for review February 27, 2024 14:01
@hacdias hacdias requested review from lidel and a team as code owners February 27, 2024 14:01
@hacdias hacdias force-pushed the remove-api-on-gateway branch 2 times, most recently from f2bf366 to 3e20448 Compare March 4, 2024 12: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 cleaning this up. Long time due.
Removing Kubo RPC from Gateway port should reduce confusion in the long run.

Comment on lines +15 to +24
#### Gateway: `/api/v0` is removed

The legacy subset of the Kubo RPC that was available via the Gateway port and was deprecated is now completely removed. You can read more in <https://github.com/ipfs/kubo/issues/10312>.

If you have a legacy software that relies on this behavior, and want to expose parts of `/api/v0` next to `/ipfs`, use reverse-proxy in front of Kubo to mount both Gateway and RPC on the same port. NOTE: exposing RPC to the internet comes with security risk: make sure to specify access control via [API.Authorizations](https://github.com/ipfs/kubo/blob/master/docs/config.md#apiauthorizations).
Copy link
Member

Choose a reason for hiding this comment

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

👌

@@ -50,7 +50,7 @@ test_expect_success "docker image runs" '
'

test_expect_success "docker container gateway is up" '
pollEndpoint -host=/ip4/127.0.0.1/tcp/8080 -http-url http://localhost:8080/api/v0/version -v -tries 30 -tout 1s
Copy link
Member

@lidel lidel Mar 4, 2024

Choose a reason for hiding this comment

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

💭 I suspect /api/v0/version is used as healthcheck by various monitoring tools.
Mind updating waterworks-infra in preparation for this removal?

/api/v0/version seems to be used in a few places, including pingdom:

https://github.com/search?q=repo%3Aipshipyard%2Fwaterworks-infra+api%2Fv0%2Fversion&type=code

Maybe @ns4plabs knows other places.

Copy link
Member Author

Choose a reason for hiding this comment

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

"/object/links",
"/object/stat",
"/refs",
"/resolve",
Copy link
Member

Choose a reason for hiding this comment

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

💭 if someone needs replacement for /api/v0/resolve we could tell them to use x-ipfs-roots:

$ curl https://ipfs.io/ipns/en.wikipedia-on-ipfs.org/favicon.ico -X HEAD -is | grep -i ipfs-roots
x-ipfs-roots: bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze,bafkreicl5473u3g5c2l34n5oh5trtpft56ep6mbqv57affzgkfppcitfl4

@hacdias hacdias enabled auto-merge (squash) March 5, 2024 08:02
@hacdias hacdias merged commit e22f47a into master Mar 5, 2024
14 checks passed
@hacdias hacdias deleted the remove-api-on-gateway branch March 5, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

Deprecate and remove /api/v0 under the gateway port
2 participants