Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/web-inbound-and-http-surface/case/case-analysis-finding-a14-f009.md
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

113 lines
4.6 KiB
Markdown

---
kind: CASE
slug: analysis-finding-a14-f009
title: 의미 지문이 길이 프레이밍 없이 구분자로 만들어진다
topic: web-inbound-and-http-surface
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: case:analysis-finding-a14-f009
evidenceCapturedOn: 2026-09-01
assets:
- key: analysis-finding-a14-f009
file: ../../../final/evidence/rendered/analysis-finding-a14-f009.svg
evidence:
- ../../../final/evidence/raw/analysis-finding-a14-f009.txt
source:
- 원본 분석 절은 analysis/14-adapter-inbound-web.md#L807 이다.
---
# 의미 지문이 길이 프레이밍 없이 구분자로 만들어진다
경로 변수 값과 헤더 값이 이스케이프 없이 구분자로 이어 붙는다. 값 자체에 그 구분자가 들어가면 서로 다른 두 요청이 같은 정규 문자열을 만들 수 있다. 같은 저장소가 다른 세 모듈에서 같은 문제를 길이 프레이밍으로 닫았다.
## 관계
- **멱등 실행 계층과 durable-operation 표면이 픽스처에서만 조립된다**
이 게이트가 미조립이라는 상위 사실이다.
- **구분자 이어붙이기는 길이 프레이밍으로 닫는다**
이 사례가 그 규칙의 형태다.
- **같은 문제를 다른 모듈에서는 닫았다**
기록하는 이유다.
## 문제
멱등 게이트가 요청의 의미 지문을 만든다.
경로 변수 값과 헤더 값을 이어 정규 문자열을 만드는 방식이다.
그 방식이 충돌을 만들 수 있는지 확인했다.
## 결론
만들 수 있다.
값들이 이스케이프 없이 구분자로 이어 붙는다.
값 자체에 그 구분자가 들어가면 서로 다른 두 요청이 같은 정규 문자열을 만든다.
퍼센트 인코딩된 구분자를 프레임워크가 디코딩해 경로 변수로 전달하므로 값에 구분자를 넣는 것이 가능하다.
경로 변수가 둘 이상인 연산에서 하나를 통제하면 구성할 수 있다.
악용 가치는 낮다.
멱등 기록은 주체와 소속으로 범위가 잡히므로 충돌시킬 수 있는 것은 자기 자신의 이전 요청뿐이고, 그것으로 얻는 것이 없다.
그리고 게이트 자체가 미조립이다.
기록하는 이유는 일관성이다.
이 저장소는 다른 세 모듈에서 같은 문제를 길이 프레이밍으로 닫았고 그 이유를 명시했다.
여기서는 구분자를 골랐고 그 선택에 대한 근거가 없다.
값 앞에 길이를 붙이는 형태 하나면 닫힌다.
판정은 P3 다.
## 검증 환경
Spring Boot : 4.0.8
확인 방식 : 지문 조립 코드 확인과 다른 모듈의 같은 처리 대조
소스 수정 : x
## 재현 조건
원문은 final/evidence/raw/176 계열에 있다.
1. 지문 공장이 값을 어떻게 잇는지 확인한다.
2. 이스케이프나 길이 프레이밍이 있는지 본다.
3. 구분자가 값에 들어갈 수 있는 경로를 확인한다.
4. 멱등 기록의 범위 키를 확인한다.
5. 다른 모듈이 같은 문제를 어떻게 닫았는지 확인한다.
## 본문
<!-- body:start -->
경로 변수 값과 헤더 값이 이스케이프 없이 구분자로 이어붙는다(§19.4).
## 지문이 만들어지는 방식
:::evidence key="analysis-finding-a14-f009" alt="분석 문서 analysis/14-adapter-inbound-web.md 에서 이 기록의 근거 절을 그대로 잘라낸 15줄. 코드베이스를 측정한 것이 아니라 원본 판정이 무엇을 적었는지를 보여 준다." caption="analysis/14-adapter-inbound-web.md 발췌 — 15줄" zoom="true"
:::
## 두 요청이 같은 정규 문자열을 만들 수 있다
값 자체에 그 구분자가 들어가면(퍼센트 인코딩 `%1F`를 Spring이 디코딩해 `@PathVariable`로 전달한다) 서로 다른 두 요청이 같은 정규 문자열을 만든다 — 경로 변수가 둘 이상인 연산에서 하나를 통제하면 구성 가능하다.
## 악용 가치는 낮다
멱등 레코드는 `principal` + `tenant`로 범위가 잡히므로 충돌시킬 수 있는 것은 **자기 자신의** 이전 요청뿐이고, 그것으로 얻는 것이 없다. 그리고 게이트 자체가 미조립이다(§20.1).
## 기록하는 이유는 일관성이다
이 저장소는 다른 세 모듈에서 같은 문제를 길이 프레이밍으로 닫았고 그 이유를 명시했다. 여기서는 구분자를 골랐고 그 선택에 대한 근거가 없다. 값 앞에 길이를 붙이는 형태 하나면 닫힌다. P3.
## 확인하지 못한 것
두 요청으로 같은 지문을 만드는 것을 재현하지 않았다. 게이트가 미조립이라 실행 경로가 없다.
<!-- body:end -->