From 4cd2e37ed34f4089b24fec9ea4fcade9a6ea4299 Mon Sep 17 00:00:00 2001 From: way zheng Date: Thu, 2 Oct 2025 13:59:12 -0700 Subject: [PATCH] TEST: Reproduce NoActiveKeyException issue - force refresh key to be null This simulates the exact Univision issue where keyset keys are unavailable. Expected behavior WITHOUT the fix: - Operator throws NoActiveKeyException continuously - APIs return 500 errors - Operator NEVER shuts down (stays in broken state forever) This branch is for demonstrating the problem before applying the shutdown handler fix. --- src/main/java/com/uid2/operator/model/KeyManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/uid2/operator/model/KeyManager.java b/src/main/java/com/uid2/operator/model/KeyManager.java index 19bae8d07..4ed5a61f6 100644 --- a/src/main/java/com/uid2/operator/model/KeyManager.java +++ b/src/main/java/com/uid2/operator/model/KeyManager.java @@ -117,7 +117,11 @@ public KeysetKey getRefreshKey() { } public KeysetKey getRefreshKey(Instant asOf) { - KeysetKey key = this.keysetKeyStore.getSnapshot().getActiveKey(Const.Data.RefreshKeysetId, asOf); + // TEMPORARY: Simulate keyset key unavailability to reproduce Univision issue + KeysetKey key = null; // Force key to be null to trigger NoActiveKeyException + + // Original line commented out: + // KeysetKey key = this.keysetKeyStore.getSnapshot().getActiveKey(Const.Data.RefreshKeysetId, asOf); if (key == null) { throw new NoActiveKeyException(String.format("Cannot get a refresh key with keyset ID %d.", Const.Data.RefreshKeysetId)); }