Repository navigation
docker pull philterd/philter-diffuse:0.1.0Philter Diffuse is early-access software, so its command-line interface and output format may change before 1.0.0. See the documentation.
Initial release.
Differential privacy
- PII counts are released with the Discrete Laplace mechanism from OpenDP, with noise set by
--scale. Counts are 64-bit, and negative results are clamped to 0. --pii-typesdeclares the types to release. The output has exactly those rows whether or not the source holds each type, so the rows do not reveal which types the data holds. Types not listed are left out, with a warning on standard error that gives how many.- Each release spends
n / scaleepsilon forndeclared types, because one document can add to every count at once. - The bound applies to one document. A person who appears in many documents is protected less, in proportion.
--thresholdmasks a privatized count below the given value asNone.
Reading counts
--philter-urlreads the PII counts Philter records throughGET /api/pii-counts(Philter 4.0 or later), every page, filtered by--context,--from, and--to. The API key is read from thePHILTER_API_KEYenvironment variable and is never printed. Certificates are verified,--philter-ca-certadds a trusted certificate, and redirects are not followed. If Philter reports that recording is off, the run stops without output or charge.--inputreads a JSON object of PII types and whole counts of 0 or more. Any other value stops the run.--mongo-uricounts the documents holding each declared field. With--aggregatesit reads Philter'spii_count_aggregatescollection; that path is deprecated in favor of--philter-urland will be removed.- A run names exactly one source, and a flag that does not apply to that source is refused.
Privacy budget
- Spent epsilon is tracked per source against
--budget-ceiling, in MongoDB'sprivacy_metadatacollection for MongoDB sources and otherwise in a budget file. The file is~/.philter-diffuse/privacy_budget.jsonunless--budget-fileorPHILTER_DIFFUSE_BUDGET_FILEnames another. - JSON input is tracked under its
--sourcename, so a renamed or copied file keeps its budget. - The budget is charged before noise is sampled, as one step with the ceiling check, so concurrent runs cannot each spend the same balance. On Windows, concurrent runs against one budget file are not serialized.
- A release that would pass the ceiling exits with code
1, writes no output, leaves any existing--outputfile unchanged, and spends no budget.
Output
- Privatized counts are written to the CSV named by
--output. - An audit report on standard output gives the epsilon spent, a qualitative strength, and the private counts. It never prints raw counts.
Docker
- A
Dockerfilethat runs as an unprivileged user (UID 1000), works in/data, and keeps the budget there. Mount/dataso the budget outlives the container.