Files
document-haness/docs/clean-architecture-backend-template/final/evidence/rendered/a13-f008-host.svg
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
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>
2026-09-04 22:51:59 +09:00

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 &quot;# 매퍼가 서명 대상에 넣는 값</tspan><tspan x="24" dy="22">과, 요청에 싣는 헤더&quot;
grep -n &#x27;String host = properties.endpoint().getHost()\|Map.of(&quot;host&quot;, host&#x27; $P/ses/SesRequestMapp</tspan><tspan x="24" dy="22">er.java
sed -n &#x27;122,126p&#x27; $P/ses/SesRequestMapper.java
echo
echo &quot;# 게이트웨이가 host 를 거르는 자리 (공급되었을 때를 지</tspan><tspan x="24" dy="22">킨다)&quot;
grep -n &#x27;Set.of(&quot;connection&quot;\|if (!RESTRICTED.contains(name))&#x27; $P/http/JdkNotificationHttpGateway.java
echo
echo </tspan><tspan x="24" dy="22">&quot;# 엔드포인트 가드가 포트를 보는가&quot;
{ grep -n &#x27;getPort&#x27; $P/http/NotificationEndpoints.java || echo &quot; (일치 0)&quot;; }
grep </tspan><tspan x="24" dy="22">-n &#x27;requireExternallyRoutable(endpoint, &quot;SES endpoint&quot;&#x27; $P/ses/SesProviderProperties.java
echo
echo &quot;# 비기본 포트 URI </tspan><tspan x="24" dy="22">를 실제 매퍼에 먹이는 자리&quot;
grep -rn &#x27;URI.create(&quot;http://127.0.0.1:&quot; + server.getAddress().getPort())&#x27; --include=*.java </tspan><tspan x="24" dy="22">adapter/outbound/notification --exclude-dir=build \
| sed -E &#x27;s#^[^:]*/src/(main|test)/[^:]*/([^:/]+):#\1 · \2:#&#x27;
gre</tspan><tspan x="24" dy="22">p -rn &#x27;harness.baseUri()&#x27; --include=*.java adapter/outbound/notification --exclude-dir=build \
| grep -iE &#x27;ses|webpush</tspan><tspan x="24" dy="22">|Contract&#x27; \
| sed -E &#x27;s#^[^:]*/src/(main|test)/[^:]*/([^:/]+):#\1 · \2:#&#x27;
echo
echo &quot;# 같은 모양의 다른 서명기&quot;
grep</tspan><tspan x="24" dy="22"> -n &#x27;String audience = endpoint.getScheme()&#x27; $P/webpush/VapidJwtSigner.java
echo
echo &quot;# 저장소가 이미 쓰는 수정식과 그 </tspan><tspan x="24" dy="22">이유&quot;
sed -n &#x27;11,12p&#x27; $W/notification/platform/callback/ExternalRequestUrlResolver.java
sed -n &#x27;57,63p&#x27; $W/notification/</tspan><tspan x="24" dy="22">platform/callback/ExternalRequestUrlResolver.java
echo &quot; — 같은 판정을 하는 자리 전부 (규칙으로 검색)&quot;
grep -rn &#x27;port </tspan><tspan x="24" dy="22">== 443\|port == 80&#x27; --include=*.java . --exclude-dir=build | grep &#x27;/src/main/&#x27; \
| sed -E &#x27;s#^[^:]*/src/(main|test)/[^</tspan><tspan x="24" dy="22">:]*/([^:/]+):#\1 · \2:#&#x27;
</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(&quot;host&quot;, host, &quot;content-type&quot;, &quot;application/json&quot;),</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"> &quot;content-type&quot;, &quot;application/json&quot;,</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"> &quot;x-amz-date&quot;, 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"> &quot;x-amz-content-sha256&quot;, 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"> &quot;authorization&quot;, 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(&quot;connection&quot;, &quot;content-length&quot;, &quot;expect&quot;, &quot;host&quot;, &quot;upgrade&quot;);</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, &quot;SES endpoint&quot;, 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(&quot;http://127.0.0.1:&quot; + 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() + &quot;/push/subscription-1&quot;),</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: &quot;sub-1&quot;, harness.baseUri().resolve(&quot;/hook&quot;), true, Optional.of(&quot;cb-1&quot;));</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() + &quot;/push/subscription-1&quot;),</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() + &quot;://&quot; + 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"> * &lt;p&gt;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 &lt; 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"> || (&quot;https&quot;.equalsIgnoreCase(scheme) &amp;&amp; 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"> || (&quot;http&quot;.equalsIgnoreCase(scheme) &amp;&amp; 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(&#x27;:&#x27;).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(&quot;https&quot;) &amp;&amp; port == 443) || (scheme.equals(&quot;http&quot;) &amp;&amp; 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(&quot;https&quot;) &amp;&amp; port == 443) || (scheme.equals(&quot;http&quot;) &amp;&amp; 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: || (&quot;https&quot;.equalsIgnoreCase(scheme) &amp;&amp; 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: || (&quot;http&quot;.equalsIgnoreCase(scheme) &amp;&amp; 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 (&quot;https&quot;.equals(scheme) &amp;&amp; port == 443) || (&quot;http&quot;.equals(scheme) &amp;&amp; port == 80);</tspan></text>
</svg>