Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/state-ownership-and-concurrency/reference/reference-messaging-security-f08.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

2.2 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, verifiedOn, source
kind slug title topic project status sourceRevision rootTreeNode verifiedOn source
REFERENCE messaging-security-f08 가변 필드로 상태 전이를 표현하면 가시성을 함께 정한다 state-ownership-and-concurrency clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 reference:messaging-security-f08
analysis/messaging/messaging-security.md#L697

가변 필드로 상태 전이를 표현하면 가시성을 함께 정한다

관계

  • 종료 시 자격증명 소거가 호출되지 않는다 이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
  • 같은 TLS posture를 두 클래스가 다른 엄격도로 검사한다 이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
  • 권한 거부가 AUTHORIZATION이 아니라 CONFIGURATION으로 기록된다 이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.

목적

정상 경로에서는 ConcurrentHashMap 의 compute 가 happens-before 를 준다. clearAll() 경로에는 그 보장이 없어서, 다른 스레드가 소거된 배열의 옛 참조를 읽을 수 있다. 방향은 안전한 쪽이다 — 비밀 유출이 아니라 0 으로 채워진 값을 읽는다.

규칙

  1. 상태 전이를 표현하는 필드의 선언을 확인한다 private char[] material 이 volatile 이 아니고 clear() 가 그것을 교체한다.

  2. 그 필드를 읽는 경로가 전부 같은 동기화 안에 있는지 본다 clearAll() 은 락 없이 순회한다. 그 경로만 보장 밖이다.

  3. 가시성을 필드나 접근 경로 중 한쪽에서 정한다 material 을 volatile 로 하거나 clearAll() 을 compute 기반으로 바꾼다.

적용 조건

소거·회전·상태 전이를 필드 교체로 표현하고, 그 필드를 여러 스레드가 읽는 모든 자리.

예외

모든 읽기와 쓰기가 같은 compute 안에서 일어나면 별도 가시성 선언이 필요 없다. 이 클래스는 그 조건을 한 경로에서만 만족한다.

예시

CredentialRuntime.java:29,129-132 와 CredentialRuntimeRegistry.java:129-132. 확인 방법은 필드 선언을 보는 것이다.