FlowKit icon indicating copy to clipboard operation
FlowKit copied to clipboard

unique_visitor_counts not sufficiently redacted

Open jc-harrison opened this issue 3 years ago • 0 comments

The exposed form of unique_visitor_counts does not use RedactedUniqueVisitorCounts, because the two sub-queries it receives as parameters (unique_subscriber_counts and active_at_reference_location_counts) are already redacted.

https://github.com/Flowminder/FlowKit/blob/a20a34c960cf36920da1f73a189d9a2e004056c3/flowmachine/flowmachine/core/server/query_schemas/unique_visitor_counts.py#L42

However, the difference between these counts can still require further redaction (e.g. 50 - 45 < 15).

RedactedUniqueVisitorCounts redacts both sub-aggregates and the final result, so we should be using this. However, RedactedUniqueVisitorCounts expects as input an unredacted query with unredacted sub-queries, so we should make sure it can also handle the case where the sub-queries are already redacted (as is the case for the server-deserialised queries) without introducing unnecessary levels of nested redaction.

jc-harrison avatar Jun 27 '22 10:06 jc-harrison