A simple data minimization microservice wrapped around go-minimizer.
The data minimization service receives a JSON payload indicating the data, the type of data, and the level of
minimization to apply. These are written to the /data
endpoint. The treated data is then returned directly as
result output.
The type
here refers to the matching data type in go-minimizer, such as name, email, etc. and is always a named
string. level
similarly matches the go-minimizer
minimization levels as a string representation. There are a number
of exceptions to the required inputs based on the minimization level:
- If
anonymize
is specified, theinput
data may be omitted. - If
tokenize
is specified, theinput
andtype
can be omitted. - If
mask
is specified, input is required, buttype
can be omitted. A mask pattern may also be specified viapattern
.
Input schema:
{
"input": <input data>,
"type": "string",
"level": "fine" | "coarse" | "anonymize" | "tokenize" | "mask",
"pattern": <optional mask pattern>
}
Output schema:
{
"result": <output data>
}
Consumers of the JSON response must treat the result as a dynamic data type if they wish to use it generically, as the data type backing the result will vary depending on the type of input data and the minimizer applied. As there is no way to extract data from the service without entering something first, the caller should always know which data type it is working with.
A simplistic web interface is also included, accessible from the top-level index page.
Please file feature requests and bugs at the issue tracker.
Licensed under the terms of the Apache 2.0 license, the full version of which can be found in the LICENSE file included in the distribution.