From ea33620fb2cd6ce92783c271a33056d45a1de29b Mon Sep 17 00:00:00 2001 From: cybermaggedon Date: Thu, 26 Mar 2026 16:58:30 +0000 Subject: [PATCH] Fix missing auth header in verify_system_status (#724) Fix missing auth header in verify_system_status processor check The check_processors function received the token parameter but did not include it in the Authorization header when calling the metrics endpoint, causing 401 errors when gateway auth is enabled. --- trustgraph-cli/trustgraph/cli/verify_system_status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trustgraph-cli/trustgraph/cli/verify_system_status.py b/trustgraph-cli/trustgraph/cli/verify_system_status.py index 8cebc83f..5fea1bb0 100644 --- a/trustgraph-cli/trustgraph/cli/verify_system_status.py +++ b/trustgraph-cli/trustgraph/cli/verify_system_status.py @@ -178,7 +178,11 @@ def check_processors(url: str, min_processors: int, timeout: int, token: Optiona url += '/' metrics_url = f"{url}api/metrics/query?query=processor_info" - resp = requests.get(metrics_url, timeout=timeout) + headers = {} + if token: + headers["Authorization"] = f"Bearer {token}" + + resp = requests.get(metrics_url, timeout=timeout, headers=headers) if resp.status_code == 200: data = resp.json() processor_count = len(data.get("data", {}).get("result", []))