The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
144 lines
14 KiB
XML
144 lines
14 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1712" viewBox="0 0 1200 1712" role="img">
|
|
<title>terminal evidence</title>
|
|
<desc>Terminal-style rendering generated from retained command output. Sensitive-looking values are redacted in the visual asset.</desc>
|
|
<rect x="1" y="1" width="1198" height="1710" rx="14" fill="#0d1117" stroke="#30363d"/>
|
|
<rect x="1" y="1" width="1198" height="44" rx="14" fill="#161b22"/>
|
|
<rect x="1" y="30" width="1198" height="14" fill="#161b22"/>
|
|
<circle cx="24" cy="22" r="6" fill="#ff5f57"/>
|
|
<circle cx="44" cy="22" r="6" fill="#febc2e"/>
|
|
<circle cx="64" cy="22" r="6" fill="#28c840"/>
|
|
<text x="92" y="27" fill="#8b949e" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace">terminal evidence</text>
|
|
<text x="24" y="68" fill="#c9d1d9" font-size="15" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">$ set -e
|
|
set -o pipefail
|
|
D=$(mktemp -d); trap 'rm -rf "$D"' EXIT
|
|
C=/shared/codebase/clean-architecture-backend-template
|
|
</tspan><tspan x="24" dy="22">N=$C/src/adapter/outbound/notification
|
|
CACHE=/root/.gradle/caches/modules-2/files-2.1
|
|
java -version 2>&1 | head -1
|
|
cp=""</tspan><tspan x="24" dy="22">
|
|
while IFS= read -r line; do
|
|
coord=${line%%=*}; confs=${line#*=}
|
|
case ",$confs," in *",runtimeClasspath,"*) ;; *) co</tspan><tspan x="24" dy="22">ntinue ;; esac
|
|
g=${coord%%:*}; rest=${coord#*:}; n=${rest%%:*}; v=${rest##*:}
|
|
jar=$(find "$CACHE/$g/$n/$v" -name '*.</tspan><tspan x="24" dy="22">jar' ! -name '*sources*' ! -name '*javadoc*' 2>/dev/null | head -1)
|
|
[ -n "$jar" ] && cp="$cp:$jar"
|
|
done < <(grep -E '^</tspan><tspan x="24" dy="22">[a-zA-Z0-9._-]+:[^=]+=' "$N/gradle.lockfile")
|
|
CP=$(find "$N/build/libs" "$C/src/application-core/build/libs" -name '*+21</tspan><tspan x="24" dy="22">234e38cdb9.jar' | tr '\n' ':')${cp#:}
|
|
cat > "$D/RetryAfterProbe.java" <<'JAVA'
|
|
import dev.caskeleton.adapter.outbound.no</tspan><tspan x="24" dy="22">tification.platform.provider.ProviderResults;
|
|
import dev.caskeleton.adapter.outbound.notification.platform.provider.apns</tspan><tspan x="24" dy="22">.ApnsFailureClassifier;
|
|
import dev.caskeleton.adapter.outbound.notification.platform.provider.fcm.FcmFailureClassifier;
|
|
</tspan><tspan x="24" dy="22">import dev.caskeleton.adapter.outbound.notification.platform.provider.http.NotificationHttpResponse;
|
|
import dev.caskelet</tspan><tspan x="24" dy="22">on.adapter.outbound.notification.platform.provider.ses.SesFailureClassifier;
|
|
import dev.caskeleton.adapter.outbound.noti</tspan><tspan x="24" dy="22">fication.platform.provider.twilio.TwilioFailureClassifier;
|
|
import dev.caskeleton.adapter.outbound.notification.platform.</tspan><tspan x="24" dy="22">provider.webpush.WebPushFailureClassifier;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.</tspan><tspan x="24" dy="22">Method;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.time.Duration;
|
|
import java.util.List;
|
|
import java.util.Map</tspan><tspan x="24" dy="22">;
|
|
import java.util.Optional;
|
|
import java.util.function.Function;
|
|
|
|
/** 같은 Retry-After 헤더를 파서 넷과 분류기 다섯에 넣</tspan><tspan x="24" dy="22">고 무엇이 나오는지 잰다. */
|
|
public final class RetryAfterProbe {
|
|
|
|
private static final String[] HEADERS = {"30", "-30"</tspan><tspan x="24" dy="22">, "0", "Wed, 21 Oct 2026 07:28:00 GMT"};
|
|
|
|
private static NotificationHttpResponse throttled(String header) {
|
|
retur</tspan><tspan x="24" dy="22">n new NotificationHttpResponse(
|
|
429, Map.of("retry-after", List.of(header)), "{}".getBytes(StandardCharsets.UTF_</tspan><tspan x="24" dy="22">8));
|
|
}
|
|
|
|
private static String outcome(java.util.concurrent.Callable<Object> call) {
|
|
try {
|
|
Object value = c</tspan><tspan x="24" dy="22">all.call();
|
|
if (value instanceof Optional<?> parsed) {
|
|
return parsed.map(Object::toString).orElse("빈 값")</tspan><tspan x="24" dy="22">;
|
|
}
|
|
return String.valueOf(value);
|
|
} catch (Exception thrown) {
|
|
Throwable failure = thrown instance</tspan><tspan x="24" dy="22">of InvocationTargetException wrapped ? wrapped.getCause() : thrown;
|
|
return failure.getClass().getSimpleName() + ":</tspan><tspan x="24" dy="22"> " + failure.getMessage();
|
|
}
|
|
}
|
|
|
|
private static Method webhookParser() throws Exception {
|
|
Class<?> adapter = </tspan><tspan x="24" dy="22">Class.forName("dev.caskeleton.adapter.outbound.notification.platform"
|
|
+ ".provider.webhook.WebhookNotificationPr</tspan><tspan x="24" dy="22">oviderAdapter");
|
|
Method parser = adapter.getDeclaredMethod("retryAfter", NotificationHttpResponse.class);
|
|
parser</tspan><tspan x="24" dy="22">.setAccessible(true);
|
|
return parser;
|
|
}
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
Method web</tspan><tspan x="24" dy="22">hook = webhookParser();
|
|
FcmFailureClassifier fcm = new FcmFailureClassifier();
|
|
|
|
System.out.println();
|
|
System</tspan><tspan x="24" dy="22">.out.println("[알림 리프의 파서 셋에 같은 헤더를 넣는다]");
|
|
for (String header : HEADERS) {
|
|
System.out.println</tspan><tspan x="24" dy="22">(" retry-after: " + header);
|
|
System.out.println(" ProviderResults.retryAfter " + outcome(() ->
|
|
</tspan><tspan x="24" dy="22">ProviderResults.retryAfter(Optional.of(header))));
|
|
System.out.println(" FcmFailureClassifier.retryAfter " + out</tspan><tspan x="24" dy="22">come(() ->
|
|
fcm.retryAfter(Optional.of(header))));
|
|
System.out.println(" Webhook 어댑터의 것 </tspan><tspan x="24" dy="22"> " + outcome(() ->
|
|
webhook.invoke(null, throttled(header))));
|
|
}
|
|
System.out.println();
|
|
|
|
System.out</tspan><tspan x="24" dy="22">.println("[헤더가 -30 인 429 응답을 분류기 넷에 넣는다]");
|
|
NotificationHttpResponse negative = throttled("-30");
|
|
</tspan><tspan x="24" dy="22"> record Case(String name, Function<NotificationHttpResponse, Object> run) {}
|
|
List<Case> cases = List.of(
|
|
new</tspan><tspan x="24" dy="22"> Case("SesFailureClassifier", r -> new SesFailureClassifier().classify(r)),
|
|
new Case("TwilioFailureClassifier", </tspan><tspan x="24" dy="22">r -> new TwilioFailureClassifier().classify(r)),
|
|
new Case("WebPushFailureClassifier", r -> new WebPushFailureCla</tspan><tspan x="24" dy="22">ssifier().classify(r)),
|
|
new Case("ApnsFailureClassifier", r -> new ApnsFailureClassifier().classify(r)));
|
|
fo</tspan><tspan x="24" dy="22">r (Case one : cases) {
|
|
String result = outcome(() -> one.run().apply(negative));
|
|
System.out.println(" " + o</tspan><tspan x="24" dy="22">ne.name());
|
|
System.out.println(" " + (result.length() > 118 ? result.substring(0, 118) + " …" : result));
|
|
</tspan><tspan x="24" dy="22">}
|
|
}
|
|
}
|
|
JAVA
|
|
javac -encoding UTF-8 -cp "$CP" -d "$D" "$D/RetryAfterProbe.java"
|
|
java -Dstdout.encoding=UTF-8 -cp "$CP:$D"</tspan><tspan x="24" dy="22"> RetryAfterProbe
|
|
</tspan></text>
|
|
<text x="24" y="970" fill="#8b949e" font-size="13" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">cwd: /shared/codebase/clean-architecture-backend-template/src</tspan></text>
|
|
<text x="24" y="992" fill="#8b949e" font-size="13" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">time: 2026-09-02T16:28:48+00:00 · exit 0</tspan></text>
|
|
<line x1="24" y1="1006" x2="1176" y2="1006" stroke="#30363d"/>
|
|
<text x="24" y="1046" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">openjdk version "21.0.12" 2026-07-21</tspan></text>
|
|
<text x="24" y="1068" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
|
|
<text x="24" y="1090" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">[알림 리프의 파서 셋에 같은 헤더를 넣는다]</tspan></text>
|
|
<text x="24" y="1112" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> retry-after: 30</tspan></text>
|
|
<text x="24" y="1134" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderResults.retryAfter PT30S</tspan></text>
|
|
<text x="24" y="1156" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> FcmFailureClassifier.retryAfter PT30S</tspan></text>
|
|
<text x="24" y="1178" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Webhook 어댑터의 것 PT30S</tspan></text>
|
|
<text x="24" y="1200" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> retry-after: -30</tspan></text>
|
|
<text x="24" y="1222" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderResults.retryAfter PT-30S</tspan></text>
|
|
<text x="24" y="1244" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> FcmFailureClassifier.retryAfter PT-30S</tspan></text>
|
|
<text x="24" y="1266" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Webhook 어댑터의 것 빈 값</tspan></text>
|
|
<text x="24" y="1288" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> retry-after: 0</tspan></text>
|
|
<text x="24" y="1310" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderResults.retryAfter PT0S</tspan></text>
|
|
<text x="24" y="1332" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> FcmFailureClassifier.retryAfter PT0S</tspan></text>
|
|
<text x="24" y="1354" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Webhook 어댑터의 것 빈 값</tspan></text>
|
|
<text x="24" y="1376" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> retry-after: Wed, 21 Oct 2026 07:28:00 GMT</tspan></text>
|
|
<text x="24" y="1398" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderResults.retryAfter 빈 값</tspan></text>
|
|
<text x="24" y="1420" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> FcmFailureClassifier.retryAfter 빈 값</tspan></text>
|
|
<text x="24" y="1442" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Webhook 어댑터의 것 빈 값</tspan></text>
|
|
<text x="24" y="1464" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
|
|
<text x="24" y="1486" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">[헤더가 -30 인 429 응답을 분류기 넷에 넣는다]</tspan></text>
|
|
<text x="24" y="1508" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> SesFailureClassifier</tspan></text>
|
|
<text x="24" y="1530" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> IllegalArgumentException: retryAfter</tspan></text>
|
|
<text x="24" y="1552" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> TwilioFailureClassifier</tspan></text>
|
|
<text x="24" y="1574" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> IllegalArgumentException: retryAfter</tspan></text>
|
|
<text x="24" y="1596" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> WebPushFailureClassifier</tspan></text>
|
|
<text x="24" y="1618" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> IllegalArgumentException: retryAfter</tspan></text>
|
|
<text x="24" y="1640" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ApnsFailureClassifier</tspan></text>
|
|
<text x="24" y="1662" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderFailure[code=PROVIDER_THROTTLED, category=THROTTLED, retryable=true, retryAfter=Optional.empty, nativeCode=Opt …</tspan></text>
|
|
</svg>
|