Implement obfuscation

This commit is contained in:
2022-08-26 20:44:39 +01:00
parent 5c12f651c8
commit ae25e1980e
4 changed files with 60 additions and 4 deletions

View File

@@ -24,6 +24,18 @@ ENCRYPTION_KEY = b""
HASHING = True
HASHING_KEY = "xxx"
# Obfuscation
OBFUSCATION = True
# Fields obfuscate based on separators
OBFUSCATE_FIELDS_SEP = ["date", "time"]
# Fields to obfuscate based on length
OBFUSCATE_FIELDS = ["ts"]
OBFUSCATE_KEEP_RATIO = 0.9
# DON'T obfuscate the last X fields of values separates by dashes
OBFUSCATE_DASH_NUM = 2
# DON'T obfuscate the last X fields of values separates by colons
OBFUSCATE_COLON_NUM = 1
# Common to encryption and hashing
WHITELIST_FIELDS = [
"ts",