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>
111 lines
11 KiB
XML
111 lines
11 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1316" viewBox="0 0 1200 1316" 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="1314" 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/BudgetFillProbe.java" <<'JAVA'
|
|
import dev.cas</tspan><tspan x="24" dy="22">keleton.adapter.outbound.cache.redis.sdk.api.RedisDeploymentMode;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk</tspan><tspan x="24" dy="22">.api.command.AdvancedOperationPermit;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.command.MultiKeyPermit;</tspan><tspan x="24" dy="22">
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.command.OperationBudget;
|
|
import dev.caskeleton.adapter.outbo</tspan><tspan x="24" dy="22">und.cache.redis.sdk.api.command.PersistentKeyPermit;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.command.</tspan><tspan x="24" dy="22">RedisPermitVerifier;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.api.command.RedisPolicyAuthority;
|
|
import dev</tspan><tspan x="24" dy="22">.caskeleton.adapter.outbound.cache.redis.sdk.api.key.RedisKeyRenderer;
|
|
import dev.caskeleton.adapter.outbound.cache.redi</tspan><tspan x="24" dy="22">s.sdk.api.key.RedisNamespace;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.lettuce.operations.RedisOperationCo</tspan><tspan x="24" dy="22">ntext;
|
|
import dev.caskeleton.adapter.outbound.cache.redis.sdk.lettuce.operations.RedisOperationLimits;
|
|
|
|
public final cla</tspan><tspan x="24" dy="22">ss BudgetFillProbe {
|
|
public static void main(String[] args) {
|
|
RedisOperationLimits limits = RedisOperationLimits.d</tspan><tspan x="24" dy="22">efaults();
|
|
RedisOperationContext ctx =
|
|
new RedisOperationContext(
|
|
new RedisNamespace("prod", "or</tspan><tspan x="24" dy="22">ders", "cache"),
|
|
new RedisKeyRenderer(512),
|
|
new RedisPermitVerifier() {
|
|
public voi</tspan><tspan x="24" dy="22">d verify(AdvancedOperationPermit p, String s) {}
|
|
public void verify(MultiKeyPermit p, String s) {}
|
|
</tspan><tspan x="24" dy="22"> public void verify(PersistentKeyPermit p, String s) {}
|
|
},
|
|
new RedisPolicyAuthority() {
|
|
</tspan><tspan x="24" dy="22"> public AdvancedOperationPermit issueAdvanced(String s) { return null; }
|
|
public MultiKeyPermit </tspan><tspan x="24" dy="22">issueMultiKey(String s) { return null; }
|
|
public PersistentKeyPermit issuePersistentKey(String s) { return </tspan><tspan x="24" dy="22">null; }
|
|
},
|
|
limits,
|
|
RedisDeploymentMode.STANDALONE);
|
|
|
|
long keyCeiling = dev.caske</tspan><tspan x="24" dy="22">leton.adapter.outbound.cache.redis.sdk.api.key
|
|
.RedisKeyRules.MAX_KEY_BYTES;
|
|
long pathMax = keyCeiling * lim</tspan><tspan x="24" dy="22">its.maxCollectionElements();
|
|
|
|
System.out.println("[SDK가 채워 넣는 budget] collectionBudget(키 수, 요청 바이트)");
|
|
</tspan><tspan x="24" dy="22"> for (long bytes : new long[] {512L, 4_096L, pathMax}) {
|
|
OperationBudget b = ctx.collectionBudget(8, bytes);
|
|
</tspan><tspan x="24" dy="22"> System.out.printf(
|
|
" 요청 %-9d -> maxRequestBytes %-9d allowsRequestBytes(요청) %s%n",
|
|
bytes, b.</tspan><tspan x="24" dy="22">maxRequestBytes(), b.allowsRequestBytes(bytes));
|
|
}
|
|
System.out.printf(
|
|
" 이 경로의 요청 최대 : 렌더된 키</tspan><tspan x="24" dy="22"> %d 바이트 x 요소 천장 %d = %d 바이트%n",
|
|
keyCeiling, limits.maxCollectionElements(), pathMax);
|
|
|
|
System.out.</tspan><tspan x="24" dy="22">println();
|
|
System.out.println("[호출자가 건네는 budget] 같은 요청을 거부할 수 있다");
|
|
OperationBudget declared =</tspan><tspan x="24" dy="22"> new OperationBudget(8, 4_096L, 65_536L, java.time.Duration.ofSeconds(2));
|
|
System.out.printf(
|
|
" maxRequestB</tspan><tspan x="24" dy="22">ytes %d, 요청 8192 -> allowsRequestBytes %s%n",
|
|
declared.maxRequestBytes(), declared.allowsRequestBytes(8_192L))</tspan><tspan x="24" dy="22">;
|
|
|
|
System.out.println();
|
|
System.out.println("[채워 넣은 budget이 실제로 거부하는 것]");
|
|
OperationBudget b = </tspan><tspan x="24" dy="22">ctx.collectionBudget(limits.maxCollectionElements(), 1_024L);
|
|
System.out.printf(" 요소 %d개 -> 통과, maxReplyBytes </tspan><tspan x="24" dy="22">%d, timeout %s%n",
|
|
limits.maxCollectionElements(), b.maxReplyBytes(), b.timeout());
|
|
try {
|
|
ctx.collecti</tspan><tspan x="24" dy="22">onBudget(limits.maxCollectionElements() + 1, 1_024L);
|
|
System.out.println(" 요소 1001개 -> 통과");
|
|
} catch (Ru</tspan><tspan x="24" dy="22">ntimeException e) {
|
|
System.out.println(" 요소 1001개 -> " + e.getClass().getSimpleName() + ": " + e.getMessage())</tspan><tspan x="24" dy="22">;
|
|
}
|
|
|
|
System.out.println();
|
|
System.out.println("[PFCOUNT/PFMERGE가 선언하는 expectedReplyBytes] 0");
|
|
Syst</tspan><tspan x="24" dy="22">em.out.println(" allowsReplyBytes(0) = " + b.allowsReplyBytes(0L));
|
|
}
|
|
}
|
|
JAVA
|
|
java -version 2>&1 | head -1
|
|
javac -enco</tspan><tspan x="24" dy="22">ding UTF-8 -cp "$JAR" -d "$D" "$D/BudgetFillProbe.java"
|
|
java -Dstdout.encoding=UTF-8 -cp "$JAR:$D" BudgetFillProbe
|
|
</tspan></text>
|
|
<text x="24" y="838" 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="860" 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-02T12:53:03+00:00 · exit 0</tspan></text>
|
|
<line x1="24" y1="874" x2="1176" y2="874" stroke="#30363d"/>
|
|
<text x="24" y="914" 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="936" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">[SDK가 채워 넣는 budget] collectionBudget(키 수, 요청 바이트)</tspan></text>
|
|
<text x="24" y="958" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 요청 512 -> maxRequestBytes 512 allowsRequestBytes(요청) true</tspan></text>
|
|
<text x="24" y="980" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 요청 4096 -> maxRequestBytes 4096 allowsRequestBytes(요청) true</tspan></text>
|
|
<text x="24" y="1002" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 요청 512000 -> maxRequestBytes 512000 allowsRequestBytes(요청) true</tspan></text>
|
|
<text x="24" y="1024" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 이 경로의 요청 최대 : 렌더된 키 512 바이트 x 요소 천장 1000 = 512000 바이트</tspan></text>
|
|
<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"></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">[호출자가 건네는 budget] 같은 요청을 거부할 수 있다</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"> maxRequestBytes 4096, 요청 8192 -> allowsRequestBytes false</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">[채워 넣은 budget이 실제로 거부하는 것]</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"> 요소 1000개 -> 통과, maxReplyBytes 1048576000, timeout PT2S</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"> 요소 1001개 -> RedisCommandRejectedException: operation over 1001 elements exceeds the configured ceiling of 1000 [command=KEY</tspan><tspan x="24" dy="22">, mode=STANDALONE, ambiguous=false]</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"></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">[PFCOUNT/PFMERGE가 선언하는 expectedReplyBytes] 0</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"> allowsReplyBytes(0) = true</tspan></text>
|
|
</svg>
|