Page MenuHomeSoftware Heritage

tweak HTTP auth for first API public release
Closed, MigratedEdits Locked

Description

This is the last step needed to deploy T614.

Two different kinds of tweaks will be necessary:

  1. for the available endpoints: drop HTTP auth completely
  2. for the upcoming endpoints: replace HTTP auth in favor of returning HTTP status code "501 Not Implemented"

Point (2) above is not only appropriate in general for our use case. But it is also very convenient, as some of the opened endpoints already return URLs pointing to upcoming endpoints. Returning 501 allows us to leave the URLs around, and at the same time inform users that they will be opened up in the future.

Event Timeline

zack moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
zack renamed this task from disable HTTP auth for the API endpoints that allow browsing our graph to tweak HTTP auth for first API public release.Feb 1 2017, 9:16 AM
zack raised the priority of this task from Low to Normal.
zack updated the task description. (Show Details)
olasd changed the task status from Open to Work in Progress.Feb 1 2017, 4:25 PM
olasd added a subscriber: olasd.

I have now swapped HTTP authentication to be a blacklist of closed endpoints instead of a whitelist of open endpoints.

I would like to revisit making upcoming endpoints completely unavailable, as this makes testing them (on the prod website) annoying. Ideally, we would allow "manual" authentication: if the authentication header is present, pass through, else, return an error code (such as 405 Method Not Allowed, which looks like the RESTy thing to do). Unfortunately, I don't think apache lets us do that.

Upon discussion, we agreed to just leave open the relevant upcoming endpoints. As they're upcoming people should not assume their interface is stable; they just happen to be there and their presence allow to follow links from the result of other endpoints (e.g., /content/).

zack claimed this task.