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>
148 lines
14 KiB
XML
148 lines
14 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1734" viewBox="0 0 1200 1734" 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="1732" 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
|
|
D=$(mktemp -d); trap 'rm -rf "$D"' EXIT
|
|
JAR=/shared/codebase/clean-architecture-backend-template/src/adapter/ou</tspan><tspan x="24" dy="22">tbound/cache-redis/build/libs/cache-redis-0.0.1+21234e38cdb9.jar
|
|
cat > "$D/PubSubBoundProbe.java" <<'JAVA'
|
|
import dev.ca</tspan><tspan x="24" dy="22">skeleton.adapter.outbound.cache.redis.sdk.api.codec.RedisCodec;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.a</tspan><tspan x="24" dy="22">pi.key.QualifiedRedisKey;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.key.RedisKeyName;
|
|
import dev.caskel</tspan><tspan x="24" dy="22">eton.adapter.outbound.cache.redis.sdk.api.key.RedisKeyRenderer;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.a</tspan><tspan x="24" dy="22">pi.key.RedisKeyRules;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.key.RedisNamespace;
|
|
import dev.caskelet</tspan><tspan x="24" dy="22">on.adapter.outbound.cache.redis.sdk.api.key.RedisSlotTag;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.ope</tspan><tspan x="24" dy="22">rations.PubSubChannel;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.operations.PubSubPattern;
|
|
import dev.c</tspan><tspan x="24" dy="22">askeleton.adapter.outbound.cache.redis.sdk.api.operations.ShardedPubSubChannel;
|
|
import java.nio.charset.StandardCharsets</tspan><tspan x="24" dy="22">;
|
|
|
|
public final class PubSubBoundProbe {
|
|
|
|
private static String token(int n) {
|
|
return "a".repeat(n - 1) + "z";
|
|
}</tspan><tspan x="24" dy="22">
|
|
|
|
private static int bytes(String s) {
|
|
return s.getBytes(StandardCharsets.UTF_8).length;
|
|
}
|
|
|
|
private static fin</tspan><tspan x="24" dy="22">al RedisCodec<String> CODEC =
|
|
new RedisCodec<>() {
|
|
public String id() { return "probe-utf8"; }
|
|
pub</tspan><tspan x="24" dy="22">lic byte[] encode(String v) { return v.getBytes(StandardCharsets.UTF_8); }
|
|
public String decode(byte[] b) { retu</tspan><tspan x="24" dy="22">rn new String(b, StandardCharsets.UTF_8); }
|
|
};
|
|
|
|
public static void main(String[] args) {
|
|
RedisNamespace ns =</tspan><tspan x="24" dy="22"> new RedisNamespace(token(64), token(64), token(64));
|
|
RedisKeyName name = new RedisKeyName(token(64), token(128));
|
|
|
|
</tspan><tspan x="24" dy="22"> System.out.println("MAX_KEY_BYTES = " + RedisKeyRules.MAX_KEY_BYTES);
|
|
System.out.println();
|
|
System.out.print</tspan><tspan x="24" dy="22">ln("[구성 요소의 상한] 토큰 64, 식별자 128, 슬롯 태그 128");
|
|
System.out.println(" namespace.prefix() 길이 : " + byt</tspan><tspan x="24" dy="22">es(ns.prefix()));
|
|
System.out.println();
|
|
|
|
System.out.println("[채널] 구성 요소를 최대로 채운 렌더");
|
|
String c</tspan><tspan x="24" dy="22">h = new PubSubChannel<>(ns, name, CODEC).render();
|
|
String sh = new ShardedPubSubChannel<>(ns, name, CODEC).render();</tspan><tspan x="24" dy="22">
|
|
System.out.printf(" PubSubChannel 렌더 %d 바이트 여유 %d%n",
|
|
bytes(ch), RedisKeyRules.MAX_KEY_BYTE</tspan><tspan x="24" dy="22">S - bytes(ch));
|
|
System.out.printf(" ShardedPubSubChannel 렌더 %d 바이트 여유 %d%n",
|
|
bytes(sh), RedisKeyRul</tspan><tspan x="24" dy="22">es.MAX_KEY_BYTES - bytes(sh));
|
|
System.out.println();
|
|
|
|
System.out.println("[키] 같은 규칙을 받은 조각들, 슬롯 태</tspan><tspan x="24" dy="22">그 하나가 더 붙는다");
|
|
RedisKeyRenderer renderer = new RedisKeyRenderer(RedisKeyRules.MAX_KEY_BYTES);
|
|
System.out</tspan><tspan x="24" dy="22">.println(" 태그 없음 -> 렌더 " + bytes(renderer.render(QualifiedRedisKey.of(ns, name))) + " 바이트");
|
|
QualifiedRedi</tspan><tspan x="24" dy="22">sKey tagged =
|
|
QualifiedRedisKey.tagged(ns, name, new RedisSlotTag(token(128)));
|
|
try {
|
|
System.out.print</tspan><tspan x="24" dy="22">ln(" 태그 있음 -> 렌더 " + bytes(renderer.render(tagged)) + " 바이트");
|
|
} catch (IllegalArgumentException e) {
|
|
</tspan><tspan x="24" dy="22"> System.out.println(" 태그 있음 -> " + e.getMessage());
|
|
}
|
|
System.out.println();
|
|
|
|
System.out.println("[기본</tspan><tspan x="24" dy="22"> 이름공간] 설정 기본값 local:sample-service:shared");
|
|
RedisNamespace def = new RedisNamespace("local", "sample-servi</tspan><tspan x="24" dy="22">ce", "shared");
|
|
System.out.println(" prefix 길이 : " + bytes(def.prefix()));
|
|
System.out.println(" 채널 렌더 </tspan><tspan x="24" dy="22">: " + bytes(new PubSubChannel<>(def, name, CODEC).render()) + " 바이트");
|
|
QualifiedRedisKey defTagged =
|
|
Qual</tspan><tspan x="24" dy="22">ifiedRedisKey.tagged(def, name, new RedisSlotTag(token(128)));
|
|
try {
|
|
System.out.println(" 태그 붙인 키 : " + </tspan><tspan x="24" dy="22">bytes(renderer.render(defTagged)) + " 바이트");
|
|
} catch (IllegalArgumentException e) {
|
|
System.out.println(" </tspan><tspan x="24" dy="22">태그 붙인 키 -> " + e.getMessage());
|
|
}
|
|
System.out.println();
|
|
|
|
System.out.println("[패턴] 접미가 토큰 규칙을 </tspan><tspan x="24" dy="22">받지 않는다 (이름공간은 위와 같은 최대치)");
|
|
for (int n : new int[] {64, 317, 318}) {
|
|
try {
|
|
PubSubPatt</tspan><tspan x="24" dy="22">ern<String> p = new PubSubPattern<>(ns, token(n), CODEC);
|
|
System.out.printf(" suffix %-4d -> 생성됨, 렌더 %d 바</tspan><tspan x="24" dy="22">이트%n", n, bytes(p.render()));
|
|
} catch (IllegalArgumentException e) {
|
|
System.out.printf(" suffix %-4d -></tspan><tspan x="24" dy="22"> %s%n", n, e.getMessage());
|
|
}
|
|
}
|
|
System.out.println();
|
|
|
|
System.out.println("[상한을 어디서 가져오는가]"</tspan><tspan x="24" dy="22">);
|
|
System.out.println(" RedisKeyRenderer : 생성자 인자 (1..512)");
|
|
System.out.println(" PubSubPattern : Red</tspan><tspan x="24" dy="22">isKeyRules.MAX_KEY_BYTES 상수");
|
|
RedisKeyRenderer tight = new RedisKeyRenderer(256);
|
|
try {
|
|
tight.render(Qu</tspan><tspan x="24" dy="22">alifiedRedisKey.of(ns, name));
|
|
System.out.println(" 상한 256 렌더러에 키 388 바이트 -> 통과");
|
|
} catch (Illeg</tspan><tspan x="24" dy="22">alArgumentException e) {
|
|
System.out.println(" 상한 256 렌더러에 키 -> " + e.getMessage());
|
|
}
|
|
System.out.p</tspan><tspan x="24" dy="22">rintln(" 같은 배포의 채널 " + bytes(ch) + " 바이트 -> 검사 없음");
|
|
}
|
|
}
|
|
JAVA
|
|
javac -encoding UTF-8 -cp "$JAR" -d "$D" </tspan><tspan x="24" dy="22">"$D/PubSubBoundProbe.java"
|
|
java -Dstdout.encoding=UTF-8 -cp "$JAR:$D" PubSubBoundProbe
|
|
</tspan></text>
|
|
<text x="24" y="1014" 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/adapter/outbound/cache-redis</tspan></text>
|
|
<text x="24" y="1036" 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-02T11:21:34+00:00 · exit 0</tspan></text>
|
|
<line x1="24" y1="1050" x2="1176" y2="1050" stroke="#30363d"/>
|
|
<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">MAX_KEY_BYTES = 512</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"></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">[구성 요소의 상한] 토큰 64, 식별자 128, 슬롯 태그 128</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"> namespace.prefix() 길이 : 194</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"></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">[채널] 구성 요소를 최대로 채운 렌더</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"> PubSubChannel 렌더 388 바이트 여유 124</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"> ShardedPubSubChannel 렌더 388 바이트 여유 124</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"></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">[키] 같은 규칙을 받은 조각들, 슬롯 태그 하나가 더 붙는다</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"> 태그 없음 -> 렌더 388 바이트</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"> 태그 있음 -> rendered key is 519 bytes and exceeds the configured 512</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"></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">[기본 이름공간] 설정 기본값 local:sample-service:shared</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"> prefix 길이 : 27</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"> 채널 렌더 : 221 바이트</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"> 태그 붙인 키 : 352 바이트</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">[패턴] 접미가 토큰 규칙을 받지 않는다 (이름공간은 위와 같은 최대치)</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"> suffix 64 -> 생성됨, 렌더 259 바이트</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"> suffix 317 -> 생성됨, 렌더 512 바이트</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"> suffix 318 -> rendered key is 513 bytes and exceeds the configured 512</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"></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">[상한을 어디서 가져오는가]</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"> RedisKeyRenderer : 생성자 인자 (1..512)</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"> PubSubPattern : RedisKeyRules.MAX_KEY_BYTES 상수</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"> 상한 256 렌더러에 키 -> rendered key is 388 bytes and exceeds the configured 256</tspan></text>
|
|
<text x="24" y="1684" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 같은 배포의 채널 388 바이트 -> 검사 없음</tspan></text>
|
|
</svg>
|