98 lines
8.1 KiB
XML
98 lines
8.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="1039" height="451" viewBox="0 0 1039 451" role="img" aria-labelledby="diagram-title diagram-description">
|
|
<title id="diagram-title">AP4는 공개 edge에서 session을 정제된 upstream identity로 바꾼다</title>
|
|
<desc id="diagram-description">왼쪽 외부 브라우저가 AP4_SESSION과 함께 AP4 deployment path의 공개 Nginx entry point를 호출한다. 같은 deployment path에서 Nginx는 host 비공개 oauth2-proxy의 internal /oauth2/auth endpoint에 subrequest를 보내 session을 검증하고 user와 email 결과를 받는다. 이어서 client가 보낸 동명 header를 덮어쓰고 Nginx-owned identity header와 internal token을 host 비공개 Spring upstream의 /edge/me로 전달한다. Upstream은 user header와 internal token을 함께 확인하며 JWT를 직접 입력으로 받지 않는다.</desc>
|
|
<metadata>{"techviz":{"spec_version":"1.1","id":"ap4-edge-trust-architecture","profile":"component-flow"},"source_context":{"document":"document.md","document_sha256":"e2cc061f683294c937f089ad874cbf7a617f7313c07a92c2148fb11287a0da37","anchor":{"kind":"heading","value":"AP4: OAuth를 모르는 upstream 앞에서 신뢰 경로를 만든다","line":202}},"evidence_policy":"Each factual element cites source lines or is marked assumption.","diagram_only":true}</metadata>
|
|
<defs>
|
|
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
<path d="M 0 0 L 10 5 L 0 10 z" />
|
|
</marker>
|
|
<style>
|
|
:root { color-scheme: light; }
|
|
text { font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #111827; }
|
|
.canvas { fill: #ffffff; }
|
|
.group-box { fill: #ffffff; stroke: #9ca3af; stroke-width: 1.4; stroke-dasharray: 7 5; }
|
|
.group-label-bg { fill: #ffffff; }
|
|
.group-label { font-size: 13px; font-weight: 650; fill: #374151; }
|
|
.edge { fill: none; stroke: #374151; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; marker-end: url(#arrow); }
|
|
.edge.style-dashed, .edge.semantic-dashed, .edge.assumption { stroke-dasharray: 7 5; }
|
|
.edge.style-dotted { stroke-dasharray: 2 5; }
|
|
.edge.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.edge.emphasis-muted { stroke: #9ca3af; }
|
|
.edge.emphasis-warning, .edge.kind-failure, .edge.kind-error { stroke: #dc2626; stroke-width: 2.2; }
|
|
.edge-label-bg { fill: #ffffff; }
|
|
.edge-label { font-size: 12px; font-weight: 560; text-anchor: middle; }
|
|
.node-shape { fill: #ffffff; stroke: #4b5563; stroke-width: 1.7; }
|
|
.node-shape.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.node-shape.emphasis-muted { stroke: #9ca3af; fill: #f9fafb; }
|
|
.node-shape.emphasis-warning { stroke: #d97706; stroke-width: 2; fill: #fffdf5; }
|
|
.node-shape.kind-database, .node-shape.kind-datastore, .node-shape.kind-storage { fill: #f8fafc; }
|
|
.node-shape.kind-queue, .node-shape.kind-event, .node-shape.kind-topic { fill: #fafafa; }
|
|
.node-shape.assumption { stroke-dasharray: 4 4; }
|
|
.storage-bottom, .controller-divider { fill: none; stroke: #4b5563; stroke-width: 1.4; }
|
|
.controller-led { fill: #4b5563; }
|
|
.actor-symbol { fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; }
|
|
.actor-symbol.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
|
|
.node-label { font-size: 14px; font-weight: 650; text-anchor: middle; }
|
|
.node-role { font-size: 10px; letter-spacing: 0.04em; text-anchor: middle; fill: #6b7280; }
|
|
.node-detail-divider { stroke: #d1d5db; stroke-width: 1; }
|
|
.node-detail { font-size: 11px; fill: #374151; }
|
|
.assumption-badge { font-size: 9px; font-weight: 700; fill: #92400e; }
|
|
.failure-mark { stroke: #dc2626; stroke-width: 4; stroke-linecap: round; }
|
|
.lifeline { stroke: #9ca3af; stroke-width: 1.2; stroke-dasharray: 5 5; }
|
|
.timeline-axis { stroke: #374151; stroke-width: 1.8; marker-end: url(#arrow); }
|
|
.timeline-stem { stroke: #6b7280; stroke-width: 1.3; }
|
|
.timeline-marker { fill: #ffffff; stroke: #374151; stroke-width: 1.7; }
|
|
.timeline-marker.primary { fill: #2563eb; stroke: #2563eb; }
|
|
.timeline-marker.warning { fill: #dc2626; stroke: #dc2626; }
|
|
.timeline-label { font-size: 13px; font-weight: 650; text-anchor: middle; }
|
|
.timeline-detail { font-size: 11px; fill: #4b5563; text-anchor: middle; }
|
|
</style>
|
|
</defs>
|
|
<rect class="canvas" width="1039" height="451" />
|
|
<rect class="group-box" x="40.0" y="142.5" width="230.0" height="156.0" rx="8" />
|
|
<rect class="group-label-bg" x="54.0" y="132.5" width="134.0" height="22" />
|
|
<text class="group-label" x="64.0" y="147.5">External browser</text>
|
|
<rect class="group-box" x="370.0" y="35.0" width="624.0" height="371.0" rx="8" />
|
|
<rect class="group-label-bg" x="384.0" y="25.0" width="155.0" height="22" />
|
|
<text class="group-label" x="394.0" y="40.0">AP4 deployment path</text>
|
|
<polyline class="edge kind-request style-solid emphasis-normal" points="240.0,230.5 320.0,230.5 320.0,230.5 400.0,230.5" data-evidence="1034-1039" />
|
|
<rect class="edge-label-bg" x="274.1" y="188.5" width="91.7" height="22" rx="3" />
|
|
<text class="edge-label" x="320.0" y="203.5">AP4_SESSION</text>
|
|
<polyline class="edge kind-request style-solid emphasis-normal" points="595.0,221.5 680.2,221.5 680.2,133.5 765.5,133.5" data-evidence="960-966,1049-1049" />
|
|
<rect class="edge-label-bg" x="645.0" y="163.5" width="118.5" height="22" rx="3" />
|
|
<text class="edge-label" x="704.2" y="178.5">auth subrequest</text>
|
|
<polyline class="edge kind-data style-solid emphasis-primary" points="595.0,239.5 675.0,239.5 675.0,319.0 755.0,319.0" data-evidence="1057-1066,1105-1118" />
|
|
<rect class="edge-label-bg" x="663.2" y="265.2" width="71.6" height="22" rx="3" />
|
|
<text class="edge-label" x="699.0" y="280.2">identity</text>
|
|
<g id="node-browser">
|
|
<g class="actor-symbol emphasis-normal" data-evidence="1018-1039"><circle cx="155.0" cy="208.5" r="11.0" /><line x1="155.0" y1="224.5" x2="155.0" y2="233.5" /><line x1="137.0" y1="234.5" x2="173.0" y2="234.5" /><line x1="155.0" y1="233.5" x2="140.0" y2="250.5" /><line x1="155.0" y1="233.5" x2="170.0" y2="250.5" /></g>
|
|
<text class="node-label" x="155.0" y="265.5">Browser</text>
|
|
</g>
|
|
<g id="node-nginx">
|
|
<rect class="node-shape kind-service emphasis-primary role-service" data-evidence="952-966,1049-1068" x="400.0" y="178.0" width="195.0" height="105.0" rx="7" />
|
|
<text class="node-label" x="497.5" y="205.0">Nginx edge</text>
|
|
<line class="node-detail-divider" x1="414.0" y1="226.0" x2="581.0" y2="226.0" />
|
|
<text class="node-detail" x="416.0" y="243.0">/api/edge</text>
|
|
<text class="node-detail" x="416.0" y="259.0">auth_request</text>
|
|
<text class="node-detail" x="416.0" y="275.0">client header overwrite</text>
|
|
</g>
|
|
<g id="node-oauth2-proxy">
|
|
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="978-1028,1049-1054" x="765.5" y="81.0" width="188.0" height="105.0" rx="7" />
|
|
<text class="node-label" x="859.5" y="108.0">oauth2-proxy</text>
|
|
<line class="node-detail-divider" x1="779.5" y1="129.0" x2="939.5" y2="129.0" />
|
|
<text class="node-detail" x="781.5" y="146.0">edge-proxy client</text>
|
|
<text class="node-detail" x="781.5" y="162.0">minimal cookie session</text>
|
|
<text class="node-detail" x="781.5" y="178.0">returns user · email</text>
|
|
</g>
|
|
<g id="node-spring-upstream">
|
|
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="1057-1077,1105-1118" x="755.0" y="258.0" width="209.0" height="122.0" rx="7" />
|
|
<text class="node-label" x="859.5" y="285.0">Spring upstream</text>
|
|
<line class="node-detail-divider" x1="769.0" y1="306.0" x2="950.0" y2="306.0" />
|
|
<text class="node-detail" x="771.0" y="323.0">X-Auth-Request-User</text>
|
|
<text class="node-detail" x="771.0" y="339.0">X-Auth-Request-Email</text>
|
|
<text class="node-detail" x="771.0" y="355.0">X-Internal-Auth-Token</text>
|
|
<text class="node-detail" x="771.0" y="371.0">/edge/me controller check</text>
|
|
</g>
|
|
</svg>
|