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>
59 lines
2.7 KiB
Markdown
59 lines
2.7 KiB
Markdown
---
|
|
kind: CONCEPT
|
|
slug: adapter-inbound-web-c03
|
|
title: security 패키지가 자기 안에서만 서로를 부른다
|
|
topic: security-and-trust-boundaries
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: concept:adapter-inbound-web-c03
|
|
evidenceCapturedOn: 2026-09-01
|
|
assets:
|
|
- key: adapter-inbound-web-c03
|
|
file: ../../../final/evidence/rendered/adapter-inbound-web-c03.svg
|
|
- key: adapter-inbound-web-c03-diagram
|
|
file: ../../../final/assets/diagrams/adapter-inbound-web-c03.svg
|
|
evidence:
|
|
- ../../../final/evidence/raw/adapter-inbound-web-c03.txt
|
|
source:
|
|
- 원본 분석 절은 analysis/14-adapter-inbound-web.md#L426 이다.
|
|
module: adapter-inbound-web
|
|
---
|
|
|
|
# security 패키지가 자기 안에서만 서로를 부른다
|
|
|
|
신원 모델 타입들의 프로덕션 참조를 전수 세면 서로를 가리키는 것뿐이고 패키지 바깥에서 들어오는 화살표가 없다. 교차 테넌트 가드 `rejectTenantInput`도 그 섬 안에만 있다.
|
|
|
|
## 본문
|
|
|
|
<!-- body:start -->
|
|
|
|
신원 모델 타입들의 프로덕션 참조를 전수 세면 이렇다.
|
|
|
|
```text
|
|
WebSecurityContextBridge : main_refs=0 test_refs=1
|
|
WebActorContextResolver : main_refs=1 test_refs=0 ← 참조자는 WebSecurityContextBridge 하나
|
|
WebTenantContextResolver : main_refs=1 test_refs=1 ← 같음
|
|
AuthenticationView : main_refs=3 test_refs=1 ← 전부 위 세 파일
|
|
SecurityIdentity : main_refs=1 test_refs=1
|
|
rejectTenantInput : main_refs=2 test_refs=1 ← 선언 + 브리지 오버로드. 세 번째 호출자 없음
|
|
WebCorsPolicyValidator : main_refs=0 test_refs=1
|
|
WebCsrfPolicyResolver : main_refs=0 test_refs=1
|
|
```
|
|
|
|
`AuthenticationView`를 만드는 코드도 테스트뿐이다 — `WebSecurityContextBridgeTest`의 다섯 줄이 전부다.
|
|
|
|
## 신원 모델이 닿는 범위
|
|
|
|
:::evidence key="adapter-inbound-web-c03-diagram" alt="security 패키지 경계 안에 세 타입이 들어 있고 바깥 프로덕션 호출자 상자가 빗금으로 경계 밖에 놓인 구조" caption="신원 모델이 닿는 범위" zoom="false"
|
|
:::
|
|
|
|
즉 `security` 패키지 전체가 **자기 안에서만 서로를 부르는 닫힌 섬**이고, 바깥에서 들어오는 화살표가 없다. 교차 테넌트 가드 `rejectTenantInput`은 그 섬 안에만 있다.
|
|
|
|
## AuthenticationView 참조 위치
|
|
|
|
:::evidence key="adapter-inbound-web-c03" alt="코드베이스에서 AuthenticationView 를 검색한 출력 21줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="AuthenticationView 코드베이스 검색 — 21줄 · exit 0" zoom="true"
|
|
:::
|
|
|
|
<!-- body:end -->
|