106 lines
9.2 KiB
Plaintext
106 lines
9.2 KiB
Plaintext
<mxfile host="Claude Code" agent="ca-superpowers + diagram-standards v2 minimalist" version="24.0.0" type="device">
|
|
<diagram name="P3A-Single-EC2" id="p3a-v3">
|
|
<mxGraphModel dx="1200" dy="700" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="780" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0" />
|
|
<mxCell id="1" parent="0" />
|
|
|
|
<!-- HEADER -->
|
|
<mxCell id="title" value="P3A — Single EC2 (no Google)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1F2937;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="20" width="700" height="32" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="subtitle" value="사용자 요청이 어떤 컴포넌트를 어떤 순서로 거치며 인증되는가?" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=0;fontFamily=Pretendard,Helvetica;fontColor=#6B7280;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="52" width="900" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- TRUST BOUNDARY: Single EC2 -->
|
|
<mxCell id="grp-ec2" value="Single EC2 (localhost)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FBFCFD;strokeColor=#1F6FEB;strokeWidth=2;dashed=0;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;" vertex="1" parent="1">
|
|
<mxGeometry x="320" y="100" width="780" height="500" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- USER (외부, 회색 무채색) -->
|
|
<mxCell id="user" value="<b>User</b> Browser" style="rounded=8;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#57606A;strokeWidth=1.5;fontSize=12;fontFamily=Pretendard,Helvetica;fontColor=#24292F;align=center;verticalAlign=middle;" vertex="1" parent="1">
|
|
<mxGeometry x="120" y="310" width="140" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- NGINX (기본 회색) -->
|
|
<mxCell id="nginx" value="<b>nginx</b> SPA + reverse proxy" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#57606A;strokeWidth=1.5;fontSize=12;fontFamily=Pretendard,Helvetica;fontColor=#24292F;align=center;verticalAlign=middle;" vertex="1" parent="1">
|
|
<mxGeometry x="380" y="160" width="200" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- BACKEND (기본 회색) -->
|
|
<mxCell id="backend" value="<b>Spring Boot RS</b> JWT validator · :8080" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#57606A;strokeWidth=1.5;fontSize=12;fontFamily=Pretendard,Helvetica;fontColor=#24292F;align=center;verticalAlign=middle;" vertex="1" parent="1">
|
|
<mxGeometry x="840" y="160" width="220" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- KEYCLOAK (주인공 — 강조색 파랑) -->
|
|
<mxCell id="keycloak" value="<b>Keycloak</b> OIDC · :8180" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#EFF6FF;strokeColor=#1F6FEB;strokeWidth=2.5;fontSize=12;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;align=center;verticalAlign=middle;" vertex="1" parent="1">
|
|
<mxGeometry x="540" y="380" width="220" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- POSTGRES (cylinder, 기본 회색) -->
|
|
<mxCell id="postgres" value="<b>PostgreSQL</b>" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#FFFFFF;strokeColor=#57606A;strokeWidth=1.5;fontSize=12;fontFamily=Pretendard,Helvetica;fontColor=#24292F;align=center;verticalAlign=middle;" vertex="1" parent="1">
|
|
<mxGeometry x="870" y="500" width="160" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ================= EDGES (5개, 단순화) ================= -->
|
|
|
|
<!-- ① User → nginx (HTTPS) -->
|
|
<mxCell id="e1" value="① HTTPS GET /" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.3;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#57606A;strokeWidth=1.5;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#24292F;" edge="1" parent="1" source="user" target="nginx">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ② User → Keycloak (OIDC) — 강조 (critical path) -->
|
|
<mxCell id="e2" value="② OIDC + PKCE" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.7;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#1F6FEB;strokeWidth=2.5;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;" edge="1" parent="1" source="user" target="keycloak">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ③ User → nginx (API call) — 두 번째 호출 (단순화: 단일 라벨로) -->
|
|
<mxCell id="e3" value="③ Bearer token + /api" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.8;entryDx=0;entryDy=0;strokeColor=#57606A;strokeWidth=1.5;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#24292F;" edge="1" parent="1" source="user" target="nginx">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ④ nginx → Backend -->
|
|
<mxCell id="e4" value="④ proxy_pass" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#57606A;strokeWidth=1.5;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#24292F;" edge="1" parent="1" source="nginx" target="backend">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ⑤ Backend → Keycloak (JWKS) — 강조 (관계가 중요) -->
|
|
<mxCell id="e5" value="⑤ JWKS" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.3;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.3;entryDx=0;entryDy=0;strokeColor=#1F6FEB;strokeWidth=2;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;" edge="1" parent="1" source="backend" target="keycloak">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- Keycloak → PostgreSQL (보조, 번호 없음) -->
|
|
<mxCell id="e-kc-pg" value="JDBC" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.8;exitY=1;exitDx=0;exitDy=0;entryX=0.3;entryY=0;entryDx=0;entryDy=0;strokeColor=#57606A;strokeWidth=1;fontSize=10;fontFamily=Pretendard,Helvetica;fontColor=#6B7280;dashed=1;" edge="1" parent="1" source="keycloak" target="postgres">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ================= CALLOUT (1개만 — 핵심 함정) ================= -->
|
|
<mxCell id="callout" value="⚠️ <b>KC_HOSTNAME 함정</b> Browser는 public host, backend는 localhost로 Keycloak 호출 → JWT iss claim mismatch. ✅ KC_HOSTNAME=&lt;public-host&gt; 명시." style="rounded=8;whiteSpace=wrap;html=1;fillColor=#FEF2F2;strokeColor=#DC2626;strokeWidth=1.5;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#7F1D1D;align=left;verticalAlign=top;spacingLeft=12;spacingTop=8;" vertex="1" parent="1">
|
|
<mxGeometry x="120" y="450" width="380" height="120" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- ================= LEGEND (2 항목) ================= -->
|
|
<mxCell id="leg-title" value="Legend" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#374151;" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="650" width="100" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="leg-bnd" value="파란 실선 박스 = Trust Boundary (localhost containers)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="680" width="500" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="leg-critical" value="파란 굵은 화살표 / 파란 박스 = OIDC 핵심 경로 (주인공)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#1F6FEB;" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="700" width="500" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<!-- FOOTER -->
|
|
<mxCell id="footer" value="v3 (minimalist) · 2026-05-26" style="text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=2;fontFamily=Pretendard,Helvetica;fontColor=#9CA3AF;" vertex="1" parent="1">
|
|
<mxGeometry x="900" y="750" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|