fix: improve API key security, add connection banner, and bump to v0.3.0

This commit is contained in:
anoracleofra-code
2026-03-08 19:52:07 -06:00
parent e7521088a0
commit 0c7dc37d83
252 changed files with 1470 additions and 558 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -14,7 +14,7 @@ import os
logger = logging.getLogger(__name__)
AIS_WS_URL = "wss://stream.aisstream.io/v0/stream"
API_KEY = os.environ.get("AIS_API_KEY", "75cc39af03c9cc23c90e8a7b3c3bc2b2a507c5fb")
API_KEY = os.environ.get("AIS_API_KEY", "")
# AIS vessel type code classification
# See: https://coast.noaa.gov/data/marinecadastre/ais/VesselTypeCodes2018.pdf
+2 -2
View File
@@ -145,12 +145,12 @@ def get_api_keys():
"has_key": api["env_key"] is not None,
"env_key": api["env_key"],
"value_obfuscated": None,
"value_plain": None,
"is_set": False,
}
if api["env_key"]:
raw = os.environ.get(api["env_key"], "")
entry["value_obfuscated"] = _obfuscate(raw)
entry["value_plain"] = raw # Sent only when reveal is requested
entry["is_set"] = bool(raw)
result.append(entry)
return result