Add API to verify that a ping is being submitted over OHTTP
Categories
(Data Platform and Tools :: Glean: SDK, defect)
Tracking
(Not tracked)
People
(Reporter: bas.schouten, Unassigned)
References
Details
Currently a simple change to the manifest file of an OHTTP ping, (the removal of two lines) can cause a metric to be submitted through normal telemetry without tripping any more safety mechanism. Given the extremely bad consequences that could come from this it feels like it would be good to have additional points of failure, one obvious thing I believe we can do is add a runtime check on the ping submission so that the code sending the ping can have an assertion that will trips if something goes wrong with the manifest.
Something along the lines of:
if (!mozilla::glean_pings::PageloadDomain.isSubmittedOverOHTTP()) {
return false;
}
Comment 1•5 months ago
|
||
As communicated before any precise API should not be a blocker for re-landing the already implemented ping.
That ping should get test coverage and probably manual QA.
We admit that currently it's not as straight-forward to test, but it is possible.
IMO the check as mentioned doesn't add much. It's merely re-expressing that the parser worked and set a flag. That can be tested, if necessary, in tree using run_glean_parser.
We much rather go with bug 1976479: Add instrumentation that adds the capabilities attached to a ping to the payload.
That allows testing in-tree to check for it as well as makes that information accessible in the database.
Description
•