Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/runtime-reachability-and-composition/case/case-messaging-security-f04.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

3.5 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module, priority
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module priority
CASE messaging-security-f04 종료 시 자격증명 소거가 호출되지 않는다 runtime-reachability-and-composition clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 case:messaging-security-f04 2026-09-01
key file
messaging-security-f04 ../../../final/evidence/rendered/messaging-security-f04.svg
../../../final/evidence/raw/messaging-security-f04.txt
원본 분석 절은 analysis/messaging/messaging-security.md#L661 이다.
messaging-security P3

종료 시 자격증명 소거가 호출되지 않는다

CredentialRuntimeRegistry.clearAll()의 javadoc이 "Clears every held credential, for shutdown"이라고 하고, 호출자가 저장소에 없다. 이 leaf 전체가 "비밀이 힙에 남지 않게 한다"를 목적으로 하고(char[], clear(), 회전 시 즉시 소거), 종료 경로에서 그 마지막 단계가 빠져 있다.

관계

  • 배선된 게이트는 자기 leaf 레인에서 검증한다 같은 분석 리프에서 끌어낸 규칙이다.
  • 같은 술어가 두 타입에 있으면 하나가 다른 하나를 부른다 같은 분석 리프에서 끌어낸 규칙이다.
  • 가변 필드로 상태 전이를 표현하면 가시성을 함께 정한다 같은 분석 리프에서 끌어낸 규칙이다.
  • 맵 갱신 함수 안에서 I/O를 하면 그 지연이 락 범위가 된다 같은 분석 리프에서 끌어낸 규칙이다.

문제

CredentialRuntimeRegistry.clearAll()의 javadoc이 "Clears every held credential, for shutdown"이라고 하고, 호출자가 저장소에 없다.

이 leaf 전체가 "비밀이 힙에 남지 않게 한다"를 목적으로 하고(char[], clear(), 회전 시 즉시 소거), 종료 경로에서 그 마지막 단계가 빠져 있다.

결론

프로세스가 끝나면 힙도 사라지지만, 종료가 느리거나 힙 덤프가 뜨는 경우가 정확히 이 통제가 노리는 상황이다.

검증 환경

OpenJDK : 21.0.12 java -version 으로 확인 Gradle : 9.0.0 src/gradle/wrapper/gradle-wrapper.properties 의 distributionUrl 로 확인 확인 방식 : clearAll 호출자 전수 검색과 종료 계약의 자격증명 소거 단계 대조 소스 수정 : x

재현 조건

원문은 analysis/messaging/messaging-security.md#L661 에 있다.

본문

CredentialRuntimeRegistry.clearAll()의 javadoc이 "Clears every held credential, for shutdown"이라고 하고, 호출자가 저장소에 없다.

clearAll() 의 javadoc 과 호출자 수

:::evidence key="messaging-security-f04" alt="분석 문서 analysis/messaging/messaging-security.md 에서 이 기록의 근거 절을 그대로 잘라낸 15줄. 코드베이스를 측정한 것이 아니라 원본 판정이 무엇을 적었는지를 보여 준다." caption="analysis/messaging/messaging-security.md 발췌 — 15줄" zoom="true" :::

이 leaf 전체의 목적에서 마지막 단계가 빠졌다

"비밀이 힙에 남지 않게 한다"를 위해 char[], clear(), 회전 시 즉시 소거를 두었는데 종료 경로가 비어 있다.

프로세스가 끝나면 힙도 사라지지만

종료가 느리거나 힙 덤프가 뜨는 경우가 정확히 이 통제가 노리는 상황이다.

확인하지 못한 것

힙 덤프로 자격증명 잔존을 확인하지 않았다. 호출자 부재로 판정했다.