Files
document-haness/docs/clean-architecture-backend-template/final/evidence/rendered/a14-f002-webproblemsanitizer-alreadysafe.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

96 lines
16 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1646" viewBox="0 0 1200 1646" 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="1644" 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
W=adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/error
echo &quot;# 메서드와 </tspan><tspan x="24" dy="22">그 자바독&quot;
grep -n -B1 -A6 &#x27;public boolean alreadySafe&#x27; $W/WebProblemSanitizer.java
echo
echo &quot;# 그 이름이 나오는 자리 </tspan><tspan x="24" dy="22">— 추적 파일 전부, 확장자를 가리지 않는다&quot;
git -C .. grep -n -i &#x27;alreadysafe&#x27; || echo &quot; (일치 0)&quot;
echo
echo &quot;# 모든 참</tspan><tspan x="24" dy="22">조에서 그 이름을 건드린 커밋&quot;
git -C .. log --all --oneline -S &#x27;alreadySafe&#x27;
echo
echo &quot;# 그 커밋에서 이 파일의 상태&quot;
gi</tspan><tspan x="24" dy="22">t -C .. show --name-status --format=&#x27;%h %ad %s&#x27; --date=short a24ece9c -- src/adapter/inbound/web/src/main/java/dev/caske</tspan><tspan x="24" dy="22">leton/adapter/inbound/web/error/WebProblemSanitizer.java
echo
echo &quot;# 선행 검사가 쓰는 판정과 삼항이 쓰는 판정&quot;
grep -n </tspan><tspan x="24" dy="22">&#x27;isBlank()\|trim()&#x27; $W/WebProblemSanitizer.java
echo
echo &quot;# 이 리프의 런타임 소속&quot;
python3 -c &quot;import json;d=json.load(</tspan><tspan x="24" dy="22">open(&#x27;config/architecture/modules.json&#x27;));rows=d if isinstance(d,list) else d.get(&#x27;modules&#x27;,d);items=rows if isinstance(</tspan><tspan x="24" dy="22">rows,list) else list(rows.values());print(*[f\&quot; {m.get(&#x27;id&#x27;) or m.get(&#x27;name&#x27;)} -&gt; {m.get(&#x27;runtime_memberships&#x27;)}\&quot; for </tspan><tspan x="24" dy="22">m in items if &#x27;inbound-web&#x27;==str(m.get(&#x27;id&#x27;) or m.get(&#x27;name&#x27;)).replace(&#x27;adapter-&#x27;,&#x27;&#x27;)], sep=&#x27;\n&#x27;)&quot;
echo
echo &quot;# 이 리프</tspan><tspan x="24" dy="22">가 선언한 구조 규칙 — 접근 제어자를 가리지 않고 센다&quot;
R=adapter/inbound/web/src/testkit/java/dev/caskeleton/adapter/inb</tspan><tspan x="24" dy="22">ound/web/testkit/arch/WebArchitectureRules.java
grep -n &#x27;static ArchRule&#x27; $R | sed -E &#x27;s#^# #&#x27;
echo &quot;# 그중 실제로 도는</tspan><tspan x="24" dy="22"> 것 — 두 목록에 담긴 것만 돈다&quot;
sed -n &#x27;/List&lt;ArchRule&gt; webScopedRules/,/^ }/p;/List&lt;ArchRule&gt; crossLeafRules/,/^ }/p</tspan><tspan x="24" dy="22">&#x27; $R \
| grep -oE &#x27;[a-z][A-Za-z]+\(\)&#x27; | sed -E &#x27;s#^# #&#x27;
echo -n &quot; 공개 표면 기준선을 적용하는가 : &quot;
{ grep -c &#x27;ca</tspan><tspan x="24" dy="22">.api-surface&#x27; adapter/inbound/web/build.gradle || true; }
</tspan></text>
<text x="24" y="398" 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="420" 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-02T19:53:40+00:00 · exit 0</tspan></text>
<line x1="24" y1="434" x2="1176" y2="434" stroke="#30363d"/>
<text x="24" y="474" 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="496" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">78- /** Whether text would survive sanitising unchanged, for asserting a message is already safe. */</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">79: public boolean alreadySafe(String input, int maxLength) {</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">80- return input != null</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">81- &amp;&amp; !input.isBlank()</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">82- &amp;&amp; sanitize(input, maxLength)</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">83- .equals(input.trim().toLowerCase(Locale.ROOT).isEmpty() ? REDACTED : input.trim());</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">84- }</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">85-}</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"># 그 이름이 나오는 자리 — 추적 파일 전부, 확장자를 가리지 않는다</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">src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/error/WebProblemSanitizer.java:79: public boolean alre</tspan><tspan x="24" dy="22">adySafe(String input, int maxLength) {</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">a24ece9c feat: web, websocket 어댑터 추가 구현</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"></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">a24ece9c 2026-08-28 feat: web, websocket 어댑터 추가 구현</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"></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">A src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/error/WebProblemSanitizer.java</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"></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"># 선행 검사가 쓰는 판정과 삼항이 쓰는 판정</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">58: if (input == null || input.isBlank()) {</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">66: working = WHITESPACE.matcher(working).replaceAll(&quot; &quot;).trim();</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">73: working = working.substring(0, maxLength).trim();</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">81: &amp;&amp; !input.isBlank()</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">83: .equals(input.trim().toLowerCase(Locale.ROOT).isEmpty() ? REDACTED : input.trim());</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"># 이 리프의 런타임 소속</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"> adapter-inbound-web -&gt; [&#x27;app-bootstrap&#x27;, &#x27;sample-portfolio&#x27;]</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"># 이 리프가 선언한 구조 규칙 — 접근 제어자를 가리지 않고 센다</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"> 32: public static ArchRule controllersAreUseCaseAdapters() {</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"> 51: public static ArchRule controllersDeclareNoTransaction() {</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"> 66: public static ArchRule controllerTypesDeclareNoTransaction() {</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"> 84: public static ArchRule wireModelsAreNotPersistenceTypes() {</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"> 103: public static ArchRule applicationDoesNotSeeTransportTypes() {</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"> 122: public static ArchRule noGlobalResponseEnvelope() {</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"> 213: public static ArchRule stableDoesNotDependOnAdvanced() {</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"> 229: static ArchRule everyControllerIsPublic() {</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"> webScopedRules()</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"> controllersAreUseCaseAdapters()</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"> controllersDeclareNoTransaction()</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"> controllerTypesDeclareNoTransaction()</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"> wireModelsAreNotPersistenceTypes()</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"> noGlobalResponseEnvelope()</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"> stableDoesNotDependOnAdvanced()</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"> crossLeafRules()</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"> applicationDoesNotSeeTransportTypes()</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"> 공개 표면 기준선을 적용하는가 : 0</tspan></text>
</svg>