Files
document-haness/.run/keycloak-four-patterns/final/assets/login-api-phase-split/login-api-phase-split.drawio
T

87 lines
8.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2026-07-23T00:00:00.000Z" agent="techviz-harness" version="24.7.17" type="device">
<diagram id="login-api-phase-split" name="로그인 credential owner와 API caller는 같은 축이 아니다">
<mxGraphModel dx="1235" dy="539" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1235" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="g_login-phase" value="로그인 구간" style="swimlane;html=1;rounded=1;startSize=30;horizontal=1;dashed=1;strokeWidth=1.5;fillColor=#f7f9fb;strokeColor=#66788a;fontStyle=1;fontSize=13;" vertex="1" parent="1">
<mxGeometry x="40.0" y="41.5" width="520.0" height="446.0" as="geometry"/>
</mxCell>
<mxCell id="g_application-request-phase" value="애플리케이션 요청 구간" style="swimlane;html=1;rounded=1;startSize=30;horizontal=1;dashed=1;strokeWidth=1.5;fillColor=#f7f9fb;strokeColor=#66788a;fontStyle=1;fontSize=13;" vertex="1" parent="1">
<mxGeometry x="660.0" y="35.0" width="530.0" height="459.0" as="geometry"/>
</mxCell>
<mxCell id="n_keycloak" value="Keycloak" tooltip="Authorization request를 받고 authorization code를 OAuth client에 돌려준다. | Evidence: L33-L33" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="70.0" y="242.5" width="150.0" height="64.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap2-mediator-login" value="AP2 mediator&lt;br/&gt;token 발급 주체" tooltip="AP2에서 token을 발급받는 주체. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="380.0" y="87.5" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap3-bff-login" value="AP3 BFF · 로그인&lt;br/&gt;token 발급 주체" tooltip="AP3에서 token을 발급받는 BFF의 로그인 책임. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="380.0" y="230.5" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap4-oauth2-proxy" value="AP4 oauth2-proxy&lt;br/&gt;OIDC code 교환&lt;br/&gt;AP4_SESSION 검증" tooltip="AP4에서 OIDC code 교환과 proxy session 검증을 맡는다. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="380.0" y="373.5" width="150.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap2-browser-caller" value="AP2 브라우저&lt;br/&gt;API 호출 주체" tooltip="AP2에서 token 발급 주체와 달리 실제 API를 호출한다. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;dashed=1;fillColor=#f5f7fa;" vertex="1" parent="1">
<mxGeometry x="695.0" y="81.0" width="150.0" height="84.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap3-bff-caller" value="AP3 BFF · API&lt;br/&gt;API 호출 주체" tooltip="AP3에서 token을 발급받은 같은 BFF가 API도 호출한다. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="695.0" y="237.0" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="n_ap4-nginx-caller" value="AP4 Nginx&lt;br/&gt;upstream 요청 연결&lt;br/&gt;identity header 조립" tooltip="AP4에서 upstream 요청을 연결하고 identity header를 조립한다. | Evidence: L35-L35" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="690.0" y="380.0" width="160.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_protected-resource" value="보호 자원" tooltip="애플리케이션 요청 구간에서 전달된 credential을 검증하고 최종 응답을 만든다. | Evidence: L40-L40" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;strokeColor=#2563eb;strokeWidth=2;" vertex="1" parent="1">
<mxGeometry x="1010.0" y="242.5" width="150.0" height="64.0" as="geometry"/>
</mxCell>
<mxCell id="e_ap2-api-request" value="/api/me · Bearer" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap2-browser-caller" target="n_protected-resource">
<mxGeometry relative="1" as="geometry">
<mxPoint x="951.5" y="189.8" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_ap2-owner-split" value="owner 분리" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap2-mediator-login" target="n_ap2-browser-caller">
<mxGeometry relative="1" as="geometry">
<mxPoint x="612.5" y="95.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_ap3-api-request" value="/api/me · Bearer" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap3-bff-caller" target="n_protected-resource">
<mxGeometry relative="1" as="geometry">
<mxPoint x="951.5" y="273.5" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_ap3-same-owner" value="동일 BFF" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap3-bff-login" target="n_ap3-bff-caller">
<mxGeometry relative="1" as="geometry">
<mxPoint x="636.5" y="269.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_ap4-owner-handoff" value="auth 결과" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap4-oauth2-proxy" target="n_ap4-nginx-caller">
<mxGeometry relative="1" as="geometry">
<mxPoint x="634.0" y="420.8" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_ap4-upstream-request" value="/edge/me · identity" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_ap4-nginx-caller" target="n_protected-resource">
<mxGeometry relative="1" as="geometry">
<mxPoint x="954.0" y="358.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_keycloak-to-ap2" value="code → token" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_keycloak" target="n_ap2-mediator-login">
<mxGeometry relative="1" as="geometry">
<mxPoint x="324.0" y="189.8" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_keycloak-to-ap3" value="code → token" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_keycloak" target="n_ap3-bff-login">
<mxGeometry relative="1" as="geometry">
<mxPoint x="324.0" y="270.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_keycloak-to-ap4" value="OIDC code 교환" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_keycloak" target="n_ap4-oauth2-proxy">
<mxGeometry relative="1" as="geometry">
<mxPoint x="324.0" y="355.0" as="offset"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>