Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/caching-and-redis/case/case-analysis-finding-a10-f008.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

111 lines
4.9 KiB
Markdown

---
kind: CASE
slug: analysis-finding-a10-f008
title: permit 정책 이름이 세 곳에 문자열로 존재하고 교차 검사가 없다
topic: caching-and-redis
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: case:analysis-finding-a10-f008
evidenceCapturedOn: 2026-09-01
body: case-analysis-finding-a10-f008.body.md
assets:
- key: analysis-finding-a10-f008
file: ../../../final/evidence/rendered/analysis-finding-a10-f008.svg
evidence:
- ../../../final/evidence/raw/analysis-finding-a10-f008.txt
source:
- 원본 분석 절은 analysis/10-adapter-outbound-cache-redis.md#L502 이다.
---
# permit 정책 이름이 세 곳에 문자열로 존재하고 교차 검사가 없다
허가 정책 이름의 출처가 셋이다. 두 집합의 차분은 정확히 둘이고 양쪽 다 설명이 있다. 문제는 차분이 아니라 차분을 감지하는 장치가 없다는 것이다. 어느 쪽 오타도 빌드를 깨지 않는다.
## 관계
- **패턴 구독의 승인만 호출자가 아니라 배포에 대해 이루어진다**
같은 리프의 허가 체계 사례다.
- **문자열로 이어진 두 세계는 오타에서 조용히 갈라진다**
이 사례가 그 규칙의 형태다.
- **catalog drift gate는 서버 메타데이터와 대조하지 Java 상수와 대조하지 않는다**
감지 장치가 없는 이유다.
## 문제
허가 정책 이름의 출처가 셋이다.
연산 문맥의 공개 상수 열여덟 개, 명령 정책 설정 파일의 필수 정책 값 열여덟 개, 검색 확장의 비공개 상수 하나다.
두 집합이 일치하는지 확인했다.
## 결론
두 집합의 차분은 정확히 둘이고 양쪽 다 설명이 있다.
지속 키 정책은 자바에만 있다. 해당 명령들이 하위 등급이라 목록의 필수 정책이 아니라 연산 문맥의 전용 요구 메서드가 강제한다.
검색 인덱스 정책은 설정에만 있다. 색인 생성 명령의 필수 정책이고, 자바 쪽 짝은 연산 문맥이 아니라 검색 확장 패키지의 비공개 상수다.
즉 차분 자체는 설명된다.
문제는 다른 데 있다. 차분을 감지하는 장치가 없다.
설정에 오타가 들어가면 그 명령은 아무도 발급받을 수 없는 정책을 요구하게 된다.
자바 상수 쪽에 오타가 들어가면 발급 구현이 정책이 활성화되지 않았다고 던진다.
어느 쪽도 빌드를 깨지 않는다.
목록 표류 게이트는 설정을 서버 메타데이터와 대조한다. 자바 상수 집합과 대조하지 않는다.
판정은 P3 다.
확정은 다음 하위 범위로 이월한다. 정책 적재기 테스트가 정책 이름 집합을 검사하는지 그 범위에서 확인한다.
## 검증 환경
확인 방식 : 세 출처의 문자열 집합 대조
소스 수정 : x
## 재현 조건
원문은 final/evidence/raw/162 계열에 있다.
1. 연산 문맥의 정책 상수를 모은다.
2. 명령 정책 설정 파일의 필수 정책 값을 모은다.
3. 두 집합의 차분을 계산한다.
4. 각 차분 항목의 이유를 확인한다.
5. 목록 표류 게이트가 무엇과 무엇을 대조하는지 확인한다.
## 본문
<!-- body:start -->
정책 이름의 출처가 셋이다.
| 출처 | 개수 |
|---|---|
| `RedisOperationContext``public static final String` 상수 | 18 |
| `redis-command-policy.yml``required-policy:` 값 | 18 |
| `LettuceRedisSearchOperations:31`의 private 상수 `SEARCH_INDEX` | 1 |
## RedisCommandPolicyLoaderTest 참조 위치
:::evidence key="analysis-finding-a10-f008" alt="코드베이스에서 RedisCommandPolicyLoaderTest 를 검색한 출력 1줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="RedisCommandPolicyLoaderTest 코드베이스 검색 — 1줄 · exit 0" zoom="true"
:::
## 두 집합의 차분에는 설명이 있다
`162-...` §8.3 — `persistent-key`는 Java에만 있다(해당 명령들이 R1이라 catalog의 `required-policy`가 아니라 `RedisOperationContext.requirePersistentKeyPermit`이 강제한다, §34). `search-index`는 YAML에만 있다(`FT.CREATE``required-policy`이고, Java 쪽 짝은 `sdk/extensions/search`의 private 상수다).
## 문제는 차분이 아니라 감지 장치의 부재다
YAML에 `required-policy: bounded-collectoin-read`처럼 오타가 들어가면 그 명령은 아무도 발급받을 수 없는 정책을 요구하게 되고, Java 상수 쪽에 오타가 들어가면 `issueAdvanced`가 "policy is not enabled"로 던진다. 어느 쪽도 빌드를 깨지 않는다. catalog drift gate는 YAML을 **서버 메타데이터**와 대조하지, Java 상수 집합과 대조하지 않는다. P3 — 확정은 sub-scope 05로 이월한다.
## 확인하지 못한 것
정책 적재기 테스트가 이름 집합을 검사하는지 확인하지 않았다. 다음 하위 범위로 이월한다.
<!-- body:end -->