ubuntu / ubuntu-report

Report hardware and other collected metrics like installer or upgrade information
GNU General Public License v3.0
68 stars 29 forks source link

Record metrics.ubuntu.com server response, possible deletion support #5

Closed rfinnie closed 5 years ago

rfinnie commented 6 years ago

The POST response from metrics.ubuntu.com is the following JSON format (unrelated headers omitted and JSON prettified):

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
   "submission" : {
      "timestamp" : "2018-04-13T20:36:01.990431+00:00",
      "id" : "78c54976-a364-436b-8d50-b5e9653efe16",
      "key" : "b0d9dd25-64ec-4214-b755-12e52b505448"
   }
}

This output should be saved along with the request. Additionally, the server supports deletion of the submission within a certain time period (currently 1 hour):

$ curl -X DELETE 'https://metrics.ubuntu.com/submission?id=78c54976-a364-436b-8d50-b5e9653efe16&key=b0d9dd25-64ec-4214-b755-12e52b505448'
Submission deleted

If this functionality were added as a UI option, it would be useful for people who wanted to opt out but accidentally submitted. The UI should probably DELETE the original submission, confirm a 200 response, remove the cache entries for the original submission/response, POST the new OptOut submission, and record the submission/response.

FYI, for testing, there is an "X-Save-Submission: no" header which can be sent with the POST. The server will respond with a real-looking id/key/timestamp, but will not actually record the submission. We're currently using this for E2E monitoring.

8none1 commented 6 years ago

Can you give a bit more information about this ID and key, how they are generated and how personal privacy is assured?

didrocks commented 5 years ago

I'm going to close that issue as no answer was given by the initial report for a long time.