From 83eb60d1aade2349ca2dff4075b3c412d5026817 Mon Sep 17 00:00:00 2001 From: VZ Build Date: Tue, 14 Jul 2026 17:38:38 +0000 Subject: [PATCH] Fix LICK signing: no sort_keys, raw UTF-8 key encoding --- lick.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lick.py b/lick.py index d44a0d8..281d009 100644 --- a/lick.py +++ b/lick.py @@ -44,14 +44,9 @@ def _get_lick_key() -> bytes: if not key_raw: raise ValueError('LICK key not configured — set VECTOR_ZULU_LICK_KEY') - # Try base64 decode first (for keys that are base64-encoded in Key Vault) - # Fall back to raw bytes if not valid base64 - try: - decoded = base64.b64decode(key_raw, validate=True) - return decoded - except Exception: - # Raw string key — encode to bytes directly - return key_raw.encode('utf-8') + # Key is raw string — encode to bytes directly + # (NotMyCircu$_NotMyMonkey$ is raw UTF-8, not base64) + return key_raw.encode('utf-8') def canonicalize(payload: dict) -> str: @@ -59,7 +54,7 @@ def canonicalize(payload: dict) -> str: Canonical JSON serialization per LICK spec. compact JSON, no whitespace, separators=(',',':'), sort_keys=True """ - return json.dumps(payload, separators=(',', ':'), sort_keys=True) + return json.dumps(payload, separators=(',', ':')) def sign_canonical(payload: dict, timestamp: Optional[int] = None) -> str: