ooni / backend

Everything related to OONI backend infrastructure: ooni/api, ooni/pipeline, ooni/sysadmin, collector, bouncers and test-helpers
BSD 3-Clause "New" or "Revised" License
51 stars 29 forks source link

measurement_start_time time bounding #373

Open FedericoCeratto opened 4 years ago

FedericoCeratto commented 4 years ago

Probes are known to set incorrect timestamps that can put a measurement days in the past or the future. We can implement time bounding as:

t0: the probe calls probe services to get a report_id
tm: the probe timestamps a measurement using its local clock
t1: the probe calls probe services to submit the msmt

We can bound tm when processing the msmt so that t0 < bounded_tm < t1

In https://github.com/ooni/pipeline/issues/48 OOID was supposed to be used to implement half of the boundary.

For msmts run without contacting the PS, only the second half of the boundary can be implemented.

FedericoCeratto commented 4 years ago

Alternatives:

  1. get a trusted time source at the beginning of a report and do not use the local clock
  2. get a trusted time source at the beginning of a report and refuse to run if the local clock is out of sync
  3. bound the timestamp in the pipeline only if the distance between t1 and t0 is small, otherwise flag it as failure