This service provides entity masking capabilities for Bloom filter based PPRL.
To run an ephemeral container, use the line below.
docker run --rm -p 8080:8080 -d mds4ul/pprl-mask:latest
You can also compile this project by hand and run the standalone executable JAR.
Dependencies are stored in target/libs and are referenced in the JAR manifest file.
mvn clean package
cd target
java -jar pprl-mask-service-1.0-SNAPSHOT.jar
import json
import requests
r = requests.post("http://localhost:8080", json={
"masking": {
"tokenSize": 2,
"hashValues": 5,
"hashFunction": "HMAC-SHA256",
"key": "s3cr3t",
"seed": 123,
"hashStrategy": "randomHash",
"filterType": "CLKRBF",
"hardeners": [
{
"name": "balance"
},
{
"name": "permute",
"seed": 456
},
{
"name": "xorFold"
}
]
},
"entities": [
{
"id": "001",
"firstName": "maximilian",
"lastName": "jugl",
"birthDate": "19980629"
},
{
"id": "002",
"firstName": "lars",
"lastName": "hempel",
"birthDate": "19960212"
}
],
"attributes": [
{
"name": "firstName",
"weight": 2,
"averageTokenCount": 11
},
{
"name": "lastName",
"weight": 2,
"averageTokenCount": 5
},
{
"name": "birthDate",
"weight": 1.5,
"averageTokenCount": 9
}
]
})
print(json.dumps(r.json(), indent=2))
# {
# "entities": [
# {
# "id": "001",
# "value": "UunAZyUznBpz0_3_FtYk4w4AqXRRBMOMTPbNDwg="
# },
# {
# "id": "002",
# "value": "JPSTdVKH3VKBPTUeuB9fjxzJZWs72CL9x9mZQw=="
# }
# ]
# }
MIT.
Content type
Image
Digest
sha256:1b1a159c9…
Size
41.7 MB
Last updated
over 3 years ago
docker pull mds4ul/pprl-mask