150 lines
13 KiB
Plaintext
150 lines
13 KiB
Plaintext
<mxfile host="app.diagrams.net" modified="2026-04-28T00:00:00.000Z" agent="Mozilla/5.0" version="24.0.0" type="device">
|
|
<diagram name="02-auth-flow" id="auth">
|
|
<mxGraphModel dx="1600" dy="900" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="900" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0" />
|
|
<mxCell id="1" parent="0" />
|
|
<mxCell id="grp-edge" value="Edge: Traefik + oauth2-proxy" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFF7ED;strokeColor=#FB923C;strokeWidth=1;dashed=0;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#C2410C;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;" vertex="1" parent="1">
|
|
<mxGeometry x="280" y="180" width="700" height="280" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="grp-app" value="Application" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#EFF6FF;strokeColor=#3B82F6;strokeWidth=1;dashed=0;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;" vertex="1" parent="1">
|
|
<mxGeometry x="1020" y="180" width="280" height="280" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="grp-kc" value="OIDC Issuer" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FEF3C7;strokeColor=#D97706;strokeWidth=1;dashed=1;fontSize=11;fontStyle=2;fontFamily=Pretendard,Helvetica;fontColor=#B45309;align=left;verticalAlign=top;spacingLeft=10;spacingTop=4;" vertex="1" parent="1">
|
|
<mxGeometry x="640" y="540" width="640" height="200" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="user" value="" style="sketch=0;outlineConnect=0;fillColor=#232F3E;strokeColor=#232F3E;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;aspect=fixed;shape=mxgraph.aws4.user;" vertex="1" parent="1">
|
|
<mxGeometry x="120" y="270" width="60" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="user-lbl" value="브라우저" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=13;fontFamily=Pretendard,Helvetica;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="80" y="340" width="140" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="traefik" value="" style="shape=image;html=1;image=https://www.vectorlogo.zone/logos/traefikio/traefikio-icon.svg;imageAspect=1;" vertex="1" parent="1">
|
|
<mxGeometry x="380" y="270" width="60" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="traefik-lbl" value="Traefik" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=13;fontFamily=Pretendard,Helvetica;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="350" y="340" width="120" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="num1" value="①" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#C2410C;fontColor=#C2410C;fontSize=14;fontStyle=1;fontFamily=Pretendard,Helvetica;strokeWidth=2;" vertex="1" parent="1">
|
|
<mxGeometry x="420" y="262" width="26" height="26" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="oauth" value="" style="shape=image;html=1;image=https://raw.githubusercontent.com/kubernetes/community/master/icons/svg/resources/unlabeled/pod.svg;imageAspect=1;" vertex="1" parent="1">
|
|
<mxGeometry x="620" y="270" width="60" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="oauth-lbl" value="oauth2-proxy
ForwardAuth" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12;fontFamily=Pretendard,Helvetica;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="580" y="340" width="140" height="36" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="num2" value="②" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#C2410C;fontColor=#C2410C;fontSize=14;fontStyle=1;fontFamily=Pretendard,Helvetica;strokeWidth=2;" vertex="1" parent="1">
|
|
<mxGeometry x="660" y="262" width="26" height="26" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="app" value="" style="shape=image;html=1;image=https://www.vectorlogo.zone/logos/springio/springio-icon.svg;imageAspect=1;" vertex="1" parent="1">
|
|
<mxGeometry x="1080" y="270" width="60" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="app-lbl" value="auth-server
ResourceServer" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12;fontFamily=Pretendard,Helvetica;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="1040" y="340" width="140" height="36" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="num3" value="③" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1E40AF;fontColor=#1E40AF;fontSize=14;fontStyle=1;fontFamily=Pretendard,Helvetica;strokeWidth=2;" vertex="1" parent="1">
|
|
<mxGeometry x="1120" y="262" width="26" height="26" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="kc" value="" style="shape=image;html=1;image=https://raw.githubusercontent.com/cncf/artwork/master/projects/keycloak/icon/color/keycloak-icon-color.svg;imageAspect=1;" vertex="1" parent="1">
|
|
<mxGeometry x="900" y="610" width="60" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="kc-lbl" value="Keycloak · realm: platform" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=12;fontFamily=Pretendard,Helvetica;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="800" y="680" width="260" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e0" style="endArrow=classic;html=1;strokeColor=#57606A;strokeWidth=3;fontFamily=Pretendard,Helvetica;" edge="1" parent="1" source="user" target="traefik">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e0-lbl" value="HTTPS" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#24292F;fillColor=#FFFFFF;" vertex="1" parent="1">
|
|
<mxGeometry x="240" y="290" width="60" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e1" style="endArrow=classic;html=1;strokeColor=#FB923C;strokeWidth=3;fontFamily=Pretendard,Helvetica;" edge="1" parent="1" source="traefik" target="oauth">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e1-lbl" value="ForwardAuth" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#C2410C;fillColor=#FFFFFF;" vertex="1" parent="1">
|
|
<mxGeometry x="490" y="290" width="80" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e2" style="endArrow=classic;html=1;strokeColor=#FB923C;strokeWidth=3;fontFamily=Pretendard,Helvetica;" edge="1" parent="1" source="oauth" target="app">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e2-lbl" value="JWT (Authorization: Bearer)" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#C2410C;fillColor=#FFFFFF;" vertex="1" parent="1">
|
|
<mxGeometry x="730" y="290" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e3a" style="endArrow=classic;html=1;strokeColor=#D97706;strokeWidth=2;fontFamily=Pretendard,Helvetica;dashed=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.3;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="oauth" target="kc">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e3a-lbl" value="A. 미인증 → 302 redirect → 로그인 → 세션 발급" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#B45309;fillColor=#FFFFFF;" vertex="1" parent="1">
|
|
<mxGeometry x="500" y="490" width="320" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e3b" style="endArrow=classic;html=1;strokeColor=#1E40AF;strokeWidth=2;fontFamily=Pretendard,Helvetica;dashed=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.7;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="app" target="kc">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e3b-lbl" value="B. OIDC 메타데이터 + JWKS fetch (issuer-uri)" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;fillColor=#FFFFFF;" vertex="1" parent="1">
|
|
<mxGeometry x="970" y="490" width="180" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="rs-panel" value="ResourceServer 검증" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1E40AF;strokeWidth=2;dashed=0;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8;" vertex="1" parent="1">
|
|
<mxGeometry x="1320" y="180" width="240" height="280" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r1" value="issuer-uri" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="220" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r1d" value="환경변수 자동 적용" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontFamily=Pretendard,Helvetica;fontColor=#57606A;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="240" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r2" value="JWKS" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="270" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r2d" value="키 자동 fetch · 회전 시 재fetch" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontFamily=Pretendard,Helvetica;fontColor=#57606A;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="290" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r3" value="JwtAuthenticationConverter" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="320" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r3d" value="realm role → Spring Authority" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontFamily=Pretendard,Helvetica;fontColor=#57606A;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="340" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r4" value="인가 규칙" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#1E40AF;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="370" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="rs-r4d" value="/api/v1/auth/me → role=user" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontFamily=Pretendard,Helvetica;fontColor=#57606A;" vertex="1" parent="1">
|
|
<mxGeometry x="1340" y="390" width="200" height="20" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="io-bg" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFBEB;strokeColor=#D97706;strokeWidth=1;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="744" width="1520" height="56" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="io-in-lbl" value="Input (브라우저가 보내는 것)" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#B45309;spacingLeft=20;spacingTop=6;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="744" width="320" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="io-in-text" value="GET /api/v1/auth/me · 세션 쿠키 (있을 수도, 없을 수도)" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=11;fontFamily=monospace;fontColor=#24292F;spacingLeft=20;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="766" width="700" height="32" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="io-arrow" value="→" style="text;html=1;align=center;verticalAlign=middle;fontSize=24;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#B45309;" vertex="1" parent="1">
|
|
<mxGeometry x="760" y="754" width="40" height="40" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="io-out-lbl" value="Output (App 안에서 보이는 것)" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=12;fontStyle=1;fontFamily=Pretendard,Helvetica;fontColor=#B45309;spacingLeft=20;spacingTop=6;" vertex="1" parent="1">
|
|
<mxGeometry x="800" y="744" width="320" height="20" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="io-out-text" value="Authorization: Bearer <JWT> 헤더 + 사용자 정보·권한이 채워진 요청 객체 (Spring SecurityContext)" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=11;fontFamily=Pretendard,Helvetica;fontColor=#24292F;spacingLeft=20;" vertex="1" parent="1">
|
|
<mxGeometry x="800" y="766" width="760" height="32" as="geometry" />
|
|
</mxCell>
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|