|
|
|
@ -5,98 +5,64 @@ OPENSEARCH_TLS = True
|
|
|
|
|
OPENSEARCH_USERNAME = "admin"
|
|
|
|
|
OPENSEARCH_PASSWORD = ""
|
|
|
|
|
|
|
|
|
|
OPENSEARCH_INDEX_MAIN = "main"
|
|
|
|
|
OPENSEARCH_INDEX_META = "meta"
|
|
|
|
|
OPENSEARCH_INDEX_INT = "int"
|
|
|
|
|
OPENSEARCH_INDEX_MAIN = "pathogen-main"
|
|
|
|
|
OPENSEARCH_INDEX_META = "pathogen-meta"
|
|
|
|
|
OPENSEARCH_INDEX_INT = "pathogen-int"
|
|
|
|
|
|
|
|
|
|
OPENSEARCH_MAIN_SIZES = ["20", "50", "100", "200", "400", "800"]
|
|
|
|
|
OPENSEARCH_MAIN_SIZES_ANON = ["20", "50", "100"]
|
|
|
|
|
OPENSEARCH_MAIN_WILDCARD = True
|
|
|
|
|
OPENSEARCH_MAIN_WILDCARD_ANON = False
|
|
|
|
|
OPENSEARCH_MAIN_SOURCES = ["irc", "dis", "all"]
|
|
|
|
|
OPENSEARCH_MAIN_SOURCES = ["dis", "4ch", "all"]
|
|
|
|
|
OPENSEARCH_SOURCES_RESTRICTED = ["irc"]
|
|
|
|
|
|
|
|
|
|
# Manticore settings
|
|
|
|
|
MANTICORE_URL = "http://monolith-db-1:9308"
|
|
|
|
|
MANTICORE_INDEX_MAIN = "main"
|
|
|
|
|
MANTICORE_INDEX_META = "meta"
|
|
|
|
|
MANTICORE_INDEX_INT = "int"
|
|
|
|
|
|
|
|
|
|
MANTICORE_MAIN_SIZES = ["20", "50", "100", "200", "400", "800"]
|
|
|
|
|
MANTICORE_MAIN_SIZES_ANON = ["20", "50", "100"]
|
|
|
|
|
MANTICORE_MAIN_SOURCES = ["dis", "4ch", "all"]
|
|
|
|
|
MANTICORE_SOURCES_RESTRICTED = ["irc"]
|
|
|
|
|
|
|
|
|
|
DRILLDOWN_RESULTS_PER_PAGE = 15
|
|
|
|
|
DRILLDOWN_DEFAULT_PARAMS = {
|
|
|
|
|
"size": "20",
|
|
|
|
|
"index": "main",
|
|
|
|
|
"sorting": "desc",
|
|
|
|
|
"source": "4ch",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Encryption
|
|
|
|
|
ENCRYPTION = False
|
|
|
|
|
ENCRYPTION_KEY = b""
|
|
|
|
|
# ENCRYPTION = False
|
|
|
|
|
# ENCRYPTION_KEY = b""
|
|
|
|
|
|
|
|
|
|
# Hashing
|
|
|
|
|
HASHING = True
|
|
|
|
|
HASHING_KEY = "xxx"
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
SEARCH_FIELDS_DENY = ["ts", "date", "time"]
|
|
|
|
|
|
|
|
|
|
DELAY_RESULTS = True
|
|
|
|
|
# Delay results by this many days
|
|
|
|
|
DELAY_DURATION = 10
|
|
|
|
|
|
|
|
|
|
# Common to encryption and hashing
|
|
|
|
|
WHITELIST_FIELDS = [
|
|
|
|
|
"ts",
|
|
|
|
|
"date",
|
|
|
|
|
"time",
|
|
|
|
|
"sentiment",
|
|
|
|
|
"version_sentiment",
|
|
|
|
|
"tokens",
|
|
|
|
|
"num_chans",
|
|
|
|
|
"num_users",
|
|
|
|
|
"online",
|
|
|
|
|
"src",
|
|
|
|
|
"exemption",
|
|
|
|
|
"hidden",
|
|
|
|
|
"type",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Don't obfuscate these parameters, or lookup hashes in them
|
|
|
|
|
NO_OBFUSCATE_PARAMS = [
|
|
|
|
|
"query",
|
|
|
|
|
# "query_full",
|
|
|
|
|
"size",
|
|
|
|
|
"source",
|
|
|
|
|
"sorting",
|
|
|
|
|
"tags",
|
|
|
|
|
"index",
|
|
|
|
|
"dedup",
|
|
|
|
|
"check_sentiment",
|
|
|
|
|
"sentiment_method",
|
|
|
|
|
"dates",
|
|
|
|
|
"sort",
|
|
|
|
|
"page",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Don't allow tag search for these parameters
|
|
|
|
|
TAG_SEARCH_DENY = [
|
|
|
|
|
"query",
|
|
|
|
|
"query_full",
|
|
|
|
|
"size",
|
|
|
|
|
"source",
|
|
|
|
|
"sorting",
|
|
|
|
|
"tags",
|
|
|
|
|
"index",
|
|
|
|
|
"dedup",
|
|
|
|
|
"check_sentiment",
|
|
|
|
|
"sentiment_method",
|
|
|
|
|
"dates",
|
|
|
|
|
"sort",
|
|
|
|
|
"page",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# SEARCH_FIELDS_DENY = ["ts", "date", "time"]
|
|
|
|
|
|
|
|
|
|
# DELAY_RESULTS = True
|
|
|
|
|
# # Delay results by this many days
|
|
|
|
|
# DELAY_DURATION = 10
|
|
|
|
|
|
|
|
|
|
OPENSEARCH_BLACKLISTED = {}
|
|
|
|
|
|
|
|
|
|
# URLs
|
|
|
|
|
|
|
|
|
|
# URLs\
|
|
|
|
|
DOMAIN = "example.com"
|
|
|
|
|
URL = f"https://{DOMAIN}"
|
|
|
|
|
|
|
|
|
@ -121,8 +87,8 @@ SECRET_KEY = "a"
|
|
|
|
|
STRIPE_ADMIN_COUPON = ""
|
|
|
|
|
|
|
|
|
|
# Threshold
|
|
|
|
|
THRESHOLD_ENDPOINT = ""
|
|
|
|
|
THRESHOLD_API_KEY = "api_1"
|
|
|
|
|
THRESHOLD_ENDPOINT = "http://threshold-app-1:13869"
|
|
|
|
|
THRESHOLD_API_KEY = ""
|
|
|
|
|
THRESHOLD_API_TOKEN = ""
|
|
|
|
|
THRESHOLD_API_COUNTER = ""
|
|
|
|
|
|
|
|
|
@ -138,3 +104,12 @@ META_QUERY_SIZE = 10000
|
|
|
|
|
|
|
|
|
|
DEBUG = True
|
|
|
|
|
PROFILER = False
|
|
|
|
|
|
|
|
|
|
if DEBUG:
|
|
|
|
|
import socket # only if you haven't already imported this
|
|
|
|
|
|
|
|
|
|
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
|
|
|
|
INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + [
|
|
|
|
|
"127.0.0.1",
|
|
|
|
|
"10.0.2.2",
|
|
|
|
|
]
|
|
|
|
|