openwpm / OpenWPM

A web privacy measurement framework
https://openwpm.readthedocs.io
Other
1.33k stars 313 forks source link

Consider aligning column names with WebExtension documentation #868

Open englehardt opened 3 years ago

englehardt commented 3 years ago

Following the WebExtension instrumentation upgrade we decided to prefer OpenWPM's previous column names as opposed to changing our column names to align with the names of the WebExtension APIs we're monitoring. This leads to us "converting" the representation internally from WebExtension event --> OpenWPM schema (e.g., as we do for cookies). We should consider aligning with the WebExtension API whenever possible since it will allow us to simply link to the MDN documentation for the relevant WebExtension API.

While I've felt this pain a few times, what sparked it most recently was a user asking how the expiry cookies table column relates to the expires and max-age set-cookie headers. They incorrectly (but understandably) assumed that expiry was simply the expires set-cookie header. Had we used expirationDate naming exposed by WebExtension Cookies API this confusion would have been less likely and added one less layer of indirection. I tracked this down myself to figure out how expirationDate is populated within Firefox. I'll save the steps here so we can add a pointer to the documentation:

englehardt commented 3 years ago

@vringar wdyt?

vringar commented 3 years ago

I'm in favour of aligning with the official and publicly documented schema instead of the Firefox internal one. We should make sure that we are aligned with these names by just using the types provided by the WebExtension typescript bindings and not defining our own anywhere.