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>
93 lines
15 KiB
XML
93 lines
15 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1536" viewBox="0 0 1200 1536" 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="1534" 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
|
|
P=adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/plat</tspan><tspan x="24" dy="22">form/provider
|
|
W=adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web
|
|
echo "# 매퍼가 서명 대상에 넣는 값</tspan><tspan x="24" dy="22">과, 요청에 싣는 헤더"
|
|
grep -n 'String host = properties.endpoint().getHost()\|Map.of("host", host' $P/ses/SesRequestMapp</tspan><tspan x="24" dy="22">er.java
|
|
sed -n '122,126p' $P/ses/SesRequestMapper.java
|
|
echo
|
|
echo "# 게이트웨이가 host 를 거르는 자리 (공급되었을 때를 지</tspan><tspan x="24" dy="22">킨다)"
|
|
grep -n 'Set.of("connection"\|if (!RESTRICTED.contains(name))' $P/http/JdkNotificationHttpGateway.java
|
|
echo
|
|
echo </tspan><tspan x="24" dy="22">"# 엔드포인트 가드가 포트를 보는가"
|
|
{ grep -n 'getPort' $P/http/NotificationEndpoints.java || echo " (일치 0)"; }
|
|
grep </tspan><tspan x="24" dy="22">-n 'requireExternallyRoutable(endpoint, "SES endpoint"' $P/ses/SesProviderProperties.java
|
|
echo
|
|
echo "# 비기본 포트 URI </tspan><tspan x="24" dy="22">를 실제 매퍼에 먹이는 자리"
|
|
grep -rn 'URI.create("http://127.0.0.1:" + server.getAddress().getPort())' --include=*.java </tspan><tspan x="24" dy="22">adapter/outbound/notification --exclude-dir=build \
|
|
| sed -E 's#^[^:]*/src/(main|test)/[^:]*/([^:/]+):#\1 · \2:#'
|
|
gre</tspan><tspan x="24" dy="22">p -rn 'harness.baseUri()' --include=*.java adapter/outbound/notification --exclude-dir=build \
|
|
| grep -iE 'ses|webpush</tspan><tspan x="24" dy="22">|Contract' \
|
|
| sed -E 's#^[^:]*/src/(main|test)/[^:]*/([^:/]+):#\1 · \2:#'
|
|
echo
|
|
echo "# 같은 모양의 다른 서명기"
|
|
grep</tspan><tspan x="24" dy="22"> -n 'String audience = endpoint.getScheme()' $P/webpush/VapidJwtSigner.java
|
|
echo
|
|
echo "# 저장소가 이미 쓰는 수정식과 그 </tspan><tspan x="24" dy="22">이유"
|
|
sed -n '11,12p' $W/notification/platform/callback/ExternalRequestUrlResolver.java
|
|
sed -n '57,63p' $W/notification/</tspan><tspan x="24" dy="22">platform/callback/ExternalRequestUrlResolver.java
|
|
echo " — 같은 판정을 하는 자리 전부 (규칙으로 검색)"
|
|
grep -rn 'port </tspan><tspan x="24" dy="22">== 443\|port == 80' --include=*.java . --exclude-dir=build | grep '/src/main/' \
|
|
| sed -E 's#^[^:]*/src/(main|test)/[^</tspan><tspan x="24" dy="22">:]*/([^:/]+):#\1 · \2:#'
|
|
</tspan></text>
|
|
<text x="24" y="420" 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="442" 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-02T17:55:54+00:00 · exit 0</tspan></text>
|
|
<line x1="24" y1="456" x2="1176" y2="456" stroke="#30363d"/>
|
|
<text x="24" y="496" 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="518" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">103: String host = properties.endpoint().getHost();</tspan></text>
|
|
<text x="24" y="540" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">110: Map.of("host", host, "content-type", "application/json"),</tspan></text>
|
|
<text x="24" y="562" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Map.of(</tspan></text>
|
|
<text x="24" y="584" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> "content-type", "application/json",</tspan></text>
|
|
<text x="24" y="606" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> "x-amz-date", signed.amzDate(),</tspan></text>
|
|
<text x="24" y="628" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> "x-amz-content-sha256", signed.contentSha256(),</tspan></text>
|
|
<text x="24" y="650" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> "authorization", signed.authorization())),</tspan></text>
|
|
<text x="24" y="672" 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="694" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 게이트웨이가 host 를 거르는 자리 (공급되었을 때를 지킨다)</tspan></text>
|
|
<text x="24" y="716" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">27: Set.of("connection", "content-length", "expect", "host", "upgrade");</tspan></text>
|
|
<text x="24" y="738" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">54: if (!RESTRICTED.contains(name)) {</tspan></text>
|
|
<text x="24" y="760" 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="782" 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="804" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> (일치 0)</tspan></text>
|
|
<text x="24" y="826" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">27: NotificationEndpoints.requireExternallyRoutable(endpoint, "SES endpoint", true);</tspan></text>
|
|
<text x="24" y="848" 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="870" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 비기본 포트 URI 를 실제 매퍼에 먹이는 자리</tspan></text>
|
|
<text x="24" y="892" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">test · ProviderFaultHarness.java:52: return URI.create("http://127.0.0.1:" + server.getAddress().getPort());</tspan></text>
|
|
<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">test · SesNotificationProviderAdapterTest.java:254: harness.baseUri(),</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">test · WebPushProviderAdapterTest.java:173: URI.create(harness.baseUri() + "/push/subscription-1"),</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">test · ContractAdapters.java:102: harness.baseUri(),</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">test · ContractAdapters.java:139: harness.baseUri(),</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">test · ContractAdapters.java:169: harness.baseUri(),</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">test · ContractAdapters.java:234: "sub-1", harness.baseUri().resolve("/hook"), true, Optional.of("cb-1"));</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">test · ContractAdapters.java:264: URI.create(harness.baseUri() + "/push/subscription-1"),</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">50: String audience = endpoint.getScheme() + "://" + endpoint.getHost();</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"></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"># 저장소가 이미 쓰는 수정식과 그 이유</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"> * <p>Several providers sign the request URL, so getting this wrong turns every valid webhook into a</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"> * signature failure. Forwarded headers are only honoured when the immediate peer is a configured</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"> boolean defaultPort =</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"> port < 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"> || ("https".equalsIgnoreCase(scheme) && port == 443)</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"> || ("http".equalsIgnoreCase(scheme) && port == 80);</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"> if (!defaultPort) {</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"> url.append(':').append(port);</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"> — 같은 판정을 하는 자리 전부 (규칙으로 검색)</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">main · ExternalOrigin.java:43: (scheme.equals("https") && port == 443) || (scheme.equals("http") && port == 80);</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">main · ExternalRequestContext.java:57: (scheme.equals("https") && port == 443) || (scheme.equals("http") && port == 80);</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">main · ExternalRequestUrlResolver.java:59: || ("https".equalsIgnoreCase(scheme) && port == 443)</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">main · ExternalRequestUrlResolver.java:60: || ("http".equalsIgnoreCase(scheme) && port == 80);</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">main · CanonicalTarget.java:39: return ("https".equals(scheme) && port == 443) || ("http".equals(scheme) && port == 80);</tspan></text>
|
|
</svg>
|