sec: enforce admin authorization across all management endpoints and randomize session secret
This commit is contained in:
@@ -109,7 +109,9 @@ def run_tests():
|
||||
print(f"[OK] Client enrolled successfully. Certificates stored in {cert_dir}")
|
||||
|
||||
# 2c. Verify client shows in /api/clients
|
||||
clients_req = urllib.request.Request(f"http://{HERMES_HOST}:{HERMES_PORT}/api/clients")
|
||||
auth_tok = server_conf.get("auth_token") or client_conf.get("auth_token")
|
||||
client_headers = {"Authorization": f"Bearer {auth_tok}"} if auth_tok else {}
|
||||
clients_req = urllib.request.Request(f"http://{HERMES_HOST}:{HERMES_PORT}/api/clients", headers=client_headers)
|
||||
with urllib.request.urlopen(clients_req, timeout=5) as resp:
|
||||
clients_data = json.loads(resp.read().decode("utf-8"))
|
||||
assert clients_data["active_seats"] >= 1
|
||||
|
||||
Reference in New Issue
Block a user