mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-15 21:45:10 +00:00
feat(remote): verify server-CDM vault keys on the client and report bad pairs
The licence response lists KIDs a server vault supplied, the client proves them with the decode check, and a bad pair goes to the new session keys/bad route so the server flags its own row. Client vault keys go first over --remote, and the dashboard health warns when no SQLite vault can store flags.
This commit is contained in:
@@ -351,6 +351,19 @@ async def test_health_vault_probe_tolerates_api_vault_rejecting_the_probe(aiohtt
|
||||
assert checks["vault:t"]["status"] == "ok", checks["vault:t"]
|
||||
|
||||
|
||||
def test_health_warns_without_a_sqlite_vault_to_store_flags(monkeypatch) -> None:
|
||||
from unshackle.core.api.handlers import run_health_checks
|
||||
|
||||
monkeypatch.setattr(config, "proxy_providers", {})
|
||||
monkeypatch.setattr(
|
||||
config, "key_vaults", [{"type": "API", "name": "shared", "uri": "http://127.0.0.1:9", "token": "t"}]
|
||||
)
|
||||
assert {c["id"]: c for c in run_health_checks()}["bad_keys"]["status"] == "warn"
|
||||
|
||||
monkeypatch.setattr(config, "key_vaults", [])
|
||||
assert {c["id"]: c for c in run_health_checks()}["bad_keys"]["status"] == "ok"
|
||||
|
||||
|
||||
def test_health_proxy_probe_reports_a_provider_that_fails_to_build(monkeypatch) -> None:
|
||||
from unshackle.core.api.handlers import run_health_checks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user