chore: readme 수정
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
# AP3는 browser session을 BFF-owned Bearer 요청으로 바꾼다
|
||||
|
||||
## Alternative text
|
||||
|
||||
Browser session zone과 server-side BFF zone 사이에서 AP3_SESSION이 downstream Bearer 요청으로 바뀌는 BFF 아키텍처.
|
||||
|
||||
## Long description
|
||||
|
||||
왼쪽 browser session zone에는 OAuth token 없이 HttpOnly AP3_SESSION을 가진 브라우저가 있다. 오른쪽 server-side application zone에는 BFF, authorized-client store, 내부 Resource Server가 있다. 브라우저의 /bff/api/me 요청은 BFF에서 종료되고, BFF는 current authorized client를 조회해 server-held access token으로 Resource Server용 Bearer 요청을 조립한다.
|
||||
|
||||
## Elements and evidence
|
||||
|
||||
- **Boundary: Browser session boundary** (system): OAuth token 대신 HttpOnly AP3_SESSION을 보유하는 browser 경계. Evidence: L166–L168.
|
||||
- **Boundary: Server-side application path** (system): BFF, server-side authorized client와 내부 Resource Server가 연결되는 backend 경계. Evidence: L166–L170.
|
||||
- **Browser** (actor): OAuth token을 받지 않고 AP3_SESSION으로 BFF endpoint를 호출한다. Evidence: L166–L168.
|
||||
- **Spring BFF** (service): 브라우저 session을 현재 authorized client와 downstream Bearer 요청으로 변환하는 confidential client. Evidence: L166–L170.
|
||||
- **Authorized-client store** (database): BFF가 access와 refresh token을 보관하고 현재 authorized client를 조회하는 server-side state. Evidence: L166–L170.
|
||||
- **Internal Resource Server** (service): BFF가 만든 Bearer 요청을 받는 내부 보호 자원. Evidence: L168–L168.
|
||||
|
||||
## Relationships
|
||||
|
||||
- **Spring BFF → Internal Resource Server:** downstream Bearer 요청. Evidence: L168–L168.
|
||||
- **Spring BFF → Authorized-client store:** 현재 authorized client 조회. Evidence: L168–L168.
|
||||
- **Browser → Spring BFF:** AP3_SESSION · /bff/api/me. Evidence: L168–L168.
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
# AP3는 browser session을 BFF-owned Bearer 요청으로 바꾼다
|
||||
# Question: AP3에서 OAuth token 없는 브라우저 요청은 어느 경계를 지나 내부 Resource Server Bearer 요청이 되는가?
|
||||
direction: right
|
||||
g0: "Browser session boundary" {
|
||||
n0: "Browser" {
|
||||
shape: person
|
||||
}
|
||||
}
|
||||
g1: "Server-side application path" {
|
||||
n1: "Spring BFF" {
|
||||
shape: rectangle
|
||||
}
|
||||
n2: "Authorized-client store" {
|
||||
shape: sql_table
|
||||
}
|
||||
n3: "Internal Resource Server" {
|
||||
shape: rectangle
|
||||
}
|
||||
}
|
||||
g0.n0 -> g1.n1: "AP3_SESSION · /bff/api/me"
|
||||
g1.n1 -> g1.n2: "현재 authorized client 조회"
|
||||
g1.n1 -> g1.n3: "downstream Bearer 요청"
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
digraph techviz {
|
||||
graph [rankdir=LR, splines=ortho, nodesep=0.55, ranksep=0.85];
|
||||
node [fontname=Helvetica, fontsize=11, margin="0.18,0.12", style="rounded,filled", fillcolor=white, color="#2d4357", penwidth=1.5];
|
||||
edge [fontname=Helvetica, fontsize=10, color="#364b5f", penwidth=1.4, arrowsize=0.75];
|
||||
subgraph cluster_0 {
|
||||
label="Browser session boundary";
|
||||
style="rounded,dashed";
|
||||
color="#66788a";
|
||||
n0 [label="Browser", shape=box, style="rounded,dashed,filled"];
|
||||
}
|
||||
subgraph cluster_1 {
|
||||
label="Server-side application path";
|
||||
style="rounded,dashed";
|
||||
color="#66788a";
|
||||
n1 [label="Spring BFF", shape=box, style="rounded,filled"];
|
||||
n2 [label="Authorized-client store", shape=cylinder, style="rounded,filled"];
|
||||
n3 [label="Internal Resource Server", shape=box, style="rounded,filled"];
|
||||
}
|
||||
n0 -> n1 [label="AP3_SESSION · /bff/api/me", style=solid];
|
||||
n1 -> n2 [label="현재 authorized client 조회", style=solid];
|
||||
n1 -> n3 [label="downstream Bearer 요청", style=solid];
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<?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="ap3-bff-architecture" name="AP3는 browser session을 BFF-owned Bearer 요청으로 바꾼다">
|
||||
<mxGraphModel dx="1080" dy="385" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1080" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="g_browser-session-zone" value="Browser session boundary" 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="45.0" y="49.0" width="250.0" height="160.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="g_server-application-zone" value="Server-side application path" 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="565.0" y="49.0" width="470.0" height="291.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="n_browser" value="Browser<br/>HttpOnly AP3_SESSION<br/>OAuth token 없음" tooltip="OAuth token을 받지 않고 AP3_SESSION으로 BFF endpoint를 호출한다. | Evidence: L166-L168" 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="75.0" y="95.0" width="190.0" height="88.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="n_bff" value="Spring BFF<br/>bff-confidential<br/>oauth2Login" tooltip="브라우저 session을 현재 authorized client와 downstream Bearer 요청으로 변환하는 confidential client. | Evidence: L166-L170" 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="595.0" y="95.0" width="190.0" height="88.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="n_authorized-client-store" value="Authorized-client store<br/>access token<br/>refresh token" tooltip="BFF가 access와 refresh token을 보관하고 현재 authorized client를 조회하는 server-side state. | Evidence: L166-L170" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;shape=cylinder3;boundedLbl=1;backgroundOutline=1;fillColor=#eef6fb;" vertex="1" parent="1">
|
||||
<mxGeometry x="815.0" y="95.0" width="190.0" height="108.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="n_resource-server" value="Internal Resource Server" tooltip="BFF가 만든 Bearer 요청을 받는 내부 보호 자원. | Evidence: L168-L168" 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="595.0" y="240.0" width="190.0" height="74.0" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="e_bff-to-resource-server" value="downstream Bearer 요청" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_bff" target="n_resource-server">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="714.0" y="212.5" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="e_bff-to-store" value="현재 authorized client 조회" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_bff" target="n_authorized-client-store">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="790.5" y="31.0" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="e_browser-to-bff" value="AP3_SESSION · /bff/api/me" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_browser" target="n_bff">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="430.0" y="111.0" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
+732
@@ -0,0 +1,732 @@
|
||||
{
|
||||
"type": "excalidraw",
|
||||
"version": 2,
|
||||
"source": "techviz-harness",
|
||||
"elements": [
|
||||
{
|
||||
"id": "group-browser-session-zone",
|
||||
"type": "rectangle",
|
||||
"x": 45.0,
|
||||
"y": 49.0,
|
||||
"width": 250.0,
|
||||
"height": 160.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#f8f9fa",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "dashed",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 289565397,
|
||||
"version": 1,
|
||||
"versionNonce": 858827588,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "group-label-browser-session-zone",
|
||||
"type": "text",
|
||||
"x": 61.0,
|
||||
"y": 55.0,
|
||||
"width": 216,
|
||||
"height": 24,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1429919230,
|
||||
"version": 1,
|
||||
"versionNonce": 786395767,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 14,
|
||||
"fontFamily": 5,
|
||||
"text": "Browser session boundary",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Browser session boundary",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "group-server-application-zone",
|
||||
"type": "rectangle",
|
||||
"x": 565.0,
|
||||
"y": 49.0,
|
||||
"width": 470.0,
|
||||
"height": 291.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#f8f9fa",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "dashed",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1445595128,
|
||||
"version": 1,
|
||||
"versionNonce": 1494971669,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "group-label-server-application-zone",
|
||||
"type": "text",
|
||||
"x": 581.0,
|
||||
"y": 55.0,
|
||||
"width": 252,
|
||||
"height": 24,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1844725802,
|
||||
"version": 1,
|
||||
"versionNonce": 1914753065,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 14,
|
||||
"fontFamily": 5,
|
||||
"text": "Server-side application path",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Server-side application path",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "edge-bff-to-resource-server",
|
||||
"type": "arrow",
|
||||
"x": 595.0,
|
||||
"y": 148.0,
|
||||
"width": 190.0,
|
||||
"height": 129.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": null,
|
||||
"seed": 308435246,
|
||||
"version": 1,
|
||||
"versionNonce": 268045461,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
190.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
95.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
95.0,
|
||||
129.0
|
||||
],
|
||||
[
|
||||
0.0,
|
||||
129.0
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "node-bff",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "node-resource-server",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow",
|
||||
"elbowed": true
|
||||
},
|
||||
{
|
||||
"id": "edge-label-bff-to-resource-server",
|
||||
"type": "text",
|
||||
"x": 634.0,
|
||||
"y": 200.5,
|
||||
"width": 160,
|
||||
"height": 24,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 40927203,
|
||||
"version": 1,
|
||||
"versionNonce": 1470596567,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 13,
|
||||
"fontFamily": 5,
|
||||
"text": "downstream Bearer 요청",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "downstream Bearer 요청",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "edge-bff-to-store",
|
||||
"type": "arrow",
|
||||
"x": 785.0,
|
||||
"y": 59.0,
|
||||
"width": 30.0,
|
||||
"height": 90.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": null,
|
||||
"seed": 866282748,
|
||||
"version": 1,
|
||||
"versionNonce": 697646849,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0.0,
|
||||
71.0
|
||||
],
|
||||
[
|
||||
30.0,
|
||||
71.0
|
||||
],
|
||||
[
|
||||
30.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
0.0,
|
||||
90.0
|
||||
],
|
||||
[
|
||||
30.0,
|
||||
90.0
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "node-bff",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "node-authorized-client-store",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow",
|
||||
"elbowed": true
|
||||
},
|
||||
{
|
||||
"id": "edge-label-bff-to-store",
|
||||
"type": "text",
|
||||
"x": 698.5,
|
||||
"y": 19.0,
|
||||
"width": 184,
|
||||
"height": 24,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1596876379,
|
||||
"version": 1,
|
||||
"versionNonce": 1494847814,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 13,
|
||||
"fontFamily": 5,
|
||||
"text": "현재 authorized client 조회",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "현재 authorized client 조회",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "edge-browser-to-bff",
|
||||
"type": "arrow",
|
||||
"x": 265.0,
|
||||
"y": 139.0,
|
||||
"width": 330.0,
|
||||
"height": 0.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": null,
|
||||
"seed": 269513575,
|
||||
"version": 1,
|
||||
"versionNonce": 1064149919,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
165.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
165.0,
|
||||
0.0
|
||||
],
|
||||
[
|
||||
330.0,
|
||||
0.0
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "node-browser",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "node-bff",
|
||||
"focus": 0,
|
||||
"gap": 4
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow",
|
||||
"elbowed": true
|
||||
},
|
||||
{
|
||||
"id": "edge-label-browser-to-bff",
|
||||
"type": "text",
|
||||
"x": 330.0,
|
||||
"y": 99.0,
|
||||
"width": 200,
|
||||
"height": 24,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1975756781,
|
||||
"version": 1,
|
||||
"versionNonce": 1233422614,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 13,
|
||||
"fontFamily": 5,
|
||||
"text": "AP3_SESSION · /bff/api/me",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "AP3_SESSION · /bff/api/me",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "node-browser",
|
||||
"type": "rectangle",
|
||||
"x": 75.0,
|
||||
"y": 95.0,
|
||||
"width": 190.0,
|
||||
"height": 88.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#ffffff",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "dashed",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1549664096,
|
||||
"version": 1,
|
||||
"versionNonce": 397227867,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "node-label-browser",
|
||||
"type": "text",
|
||||
"x": 85.0,
|
||||
"y": 105.0,
|
||||
"width": 170.0,
|
||||
"height": 68.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 225442297,
|
||||
"version": 1,
|
||||
"versionNonce": 1441680053,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 15,
|
||||
"fontFamily": 5,
|
||||
"text": "Browser\nHttpOnly AP3_SESSION\nOAuth token 없음",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Browser\nHttpOnly AP3_SESSION\nOAuth token 없음",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "node-bff",
|
||||
"type": "rectangle",
|
||||
"x": 595.0,
|
||||
"y": 95.0,
|
||||
"width": 190.0,
|
||||
"height": 88.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#ffffff",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 734504749,
|
||||
"version": 1,
|
||||
"versionNonce": 817081613,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "node-label-bff",
|
||||
"type": "text",
|
||||
"x": 605.0,
|
||||
"y": 105.0,
|
||||
"width": 170.0,
|
||||
"height": 68.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 950295209,
|
||||
"version": 1,
|
||||
"versionNonce": 1878756486,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 15,
|
||||
"fontFamily": 5,
|
||||
"text": "Spring BFF\nbff-confidential\noauth2Login",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Spring BFF\nbff-confidential\noauth2Login",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "node-authorized-client-store",
|
||||
"type": "rectangle",
|
||||
"x": 815.0,
|
||||
"y": 95.0,
|
||||
"width": 190.0,
|
||||
"height": 108.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#e7f5ff",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1233315239,
|
||||
"version": 1,
|
||||
"versionNonce": 1888174234,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "node-label-authorized-client-store",
|
||||
"type": "text",
|
||||
"x": 825.0,
|
||||
"y": 105.0,
|
||||
"width": 170.0,
|
||||
"height": 88.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 448517001,
|
||||
"version": 1,
|
||||
"versionNonce": 123295628,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 15,
|
||||
"fontFamily": 5,
|
||||
"text": "Authorized-client store\naccess token\nrefresh token",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Authorized-client store\naccess token\nrefresh token",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "node-resource-server",
|
||||
"type": "rectangle",
|
||||
"x": 595.0,
|
||||
"y": 240.0,
|
||||
"width": 190.0,
|
||||
"height": 74.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "#ffffff",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 972285001,
|
||||
"version": 1,
|
||||
"versionNonce": 1174270881,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "node-label-resource-server",
|
||||
"type": "text",
|
||||
"x": 605.0,
|
||||
"y": 250.0,
|
||||
"width": 170.0,
|
||||
"height": 54.0,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 1,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 0,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1517556067,
|
||||
"version": 1,
|
||||
"versionNonce": 178679525,
|
||||
"isDeleted": false,
|
||||
"boundElements": [],
|
||||
"updated": 0,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 15,
|
||||
"fontFamily": 5,
|
||||
"text": "Internal Resource Server",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": null,
|
||||
"originalText": "Internal Resource Server",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
}
|
||||
],
|
||||
"appState": {
|
||||
"gridSize": 10,
|
||||
"viewBackgroundColor": "#ffffff",
|
||||
"currentItemFontFamily": 5
|
||||
},
|
||||
"files": {}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"harness_version": "0.2.0",
|
||||
"spec_id": "ap3-bff-architecture",
|
||||
"spec_version": "1.1",
|
||||
"spec_sha256": "20ed427be186390406589d69a75b848def944906ab94ff5b7448ead627b95bb2",
|
||||
"source_context": {
|
||||
"document": "document.md",
|
||||
"document_sha256": "df4d1a604c74e756672b5b40510abfedb8c67b39af280a5f51985ea9972f5371",
|
||||
"anchor": {
|
||||
"kind": "marker",
|
||||
"value": "ap3-bff-architecture",
|
||||
"line": 172
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
"ap3-bff-architecture.svg",
|
||||
"ap3-bff-architecture.drawio",
|
||||
"ap3-bff-architecture.mmd",
|
||||
"ap3-bff-architecture.d2",
|
||||
"ap3-bff-architecture.dot",
|
||||
"ap3-bff-architecture.excalidraw",
|
||||
"ap3-bff-architecture.alt.md"
|
||||
],
|
||||
"lint_issue_count": 0,
|
||||
"assumption_count": 0,
|
||||
"assumptions_allowed": false,
|
||||
"composition_profile": "two-zone-pipeline",
|
||||
"reference_ids": [
|
||||
"localization-pipeline"
|
||||
],
|
||||
"diagram_only": true
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
%% AP3는 browser session을 BFF-owned Bearer 요청으로 바꾼다
|
||||
%% question: AP3에서 OAuth token 없는 브라우저 요청은 어느 경계를 지나 내부 Resource Server Bearer 요청이 되는가?
|
||||
flowchart LR
|
||||
subgraph g_browser_session_zone["Browser session boundary"]
|
||||
n0(["Browser"])
|
||||
end
|
||||
subgraph g_server_application_zone["Server-side application path"]
|
||||
n1["Spring BFF"]
|
||||
n2[("Authorized-client store")]
|
||||
n3["Internal Resource Server"]
|
||||
end
|
||||
n0 -->|"AP3_SESSION · /bff/api/me"| n1
|
||||
n1 -->|"현재 authorized client 조회"| n2
|
||||
n1 -->|"downstream Bearer 요청"| n3
|
||||
classDef external stroke-dasharray: 6 4
|
||||
class n0 external
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1080" height="385" viewBox="0 0 1080 385" role="img" aria-labelledby="diagram-title diagram-description">
|
||||
<title id="diagram-title">AP3는 browser session을 BFF-owned Bearer 요청으로 바꾼다</title>
|
||||
<desc id="diagram-description">왼쪽 browser session zone에는 OAuth token 없이 HttpOnly AP3_SESSION을 가진 브라우저가 있다. 오른쪽 server-side application zone에는 BFF, authorized-client store, 내부 Resource Server가 있다. 브라우저의 /bff/api/me 요청은 BFF에서 종료되고, BFF는 current authorized client를 조회해 server-held access token으로 Resource Server용 Bearer 요청을 조립한다.</desc>
|
||||
<metadata>{"techviz":{"spec_version":"1.1","id":"ap3-bff-architecture","profile":"two-zone-pipeline"},"source_context":{"document":"document.md","document_sha256":"df4d1a604c74e756672b5b40510abfedb8c67b39af280a5f51985ea9972f5371","anchor":{"kind":"marker","value":"ap3-bff-architecture","line":172}},"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="1080" height="385" />
|
||||
<rect class="group-box" x="45.0" y="49.0" width="250.0" height="160.0" rx="8" />
|
||||
<rect class="group-label-bg" x="59.0" y="39.0" width="190.0" height="22" />
|
||||
<text class="group-label" x="69.0" y="54.0">Browser session boundary</text>
|
||||
<rect class="group-box" x="565.0" y="49.0" width="470.0" height="291.0" rx="8" />
|
||||
<rect class="group-label-bg" x="579.0" y="39.0" width="218.0" height="22" />
|
||||
<text class="group-label" x="589.0" y="54.0">Server-side application path</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-primary" points="785.0,148.0 690.0,148.0 690.0,277.0 595.0,277.0" data-evidence="168-168" />
|
||||
<rect class="edge-label-bg" x="638.0" y="198.5" width="152.0" height="22" rx="3" />
|
||||
<text class="edge-label" x="714.0" y="213.5">downstream Bearer 요청</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="785.0,130.0 815.0,130.0 815.0,59.0 785.0,59.0 785.0,149.0 815.0,149.0" data-evidence="168-168" />
|
||||
<rect class="edge-label-bg" x="704.5" y="17.0" width="172.1" height="22" rx="3" />
|
||||
<text class="edge-label" x="790.5" y="32.0">현재 authorized client 조회</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="265.0,139.0 430.0,139.0 430.0,139.0 595.0,139.0" data-evidence="168-168" />
|
||||
<rect class="edge-label-bg" x="337.2" y="97.0" width="185.5" height="22" rx="3" />
|
||||
<text class="edge-label" x="430.0" y="112.0">AP3_SESSION · /bff/api/me</text>
|
||||
<g id="node-browser">
|
||||
<g class="actor-symbol emphasis-normal" data-evidence="166-168"><circle cx="170.0" cy="115.0" r="11.0" /><line x1="170.0" y1="131.0" x2="170.0" y2="154.0" /><line x1="152.0" y1="141.0" x2="188.0" y2="141.0" /><line x1="170.0" y1="154.0" x2="155.0" y2="171.0" /><line x1="170.0" y1="154.0" x2="185.0" y2="171.0" /></g>
|
||||
<text class="node-label" x="170.0" y="176.0">Browser</text>
|
||||
</g>
|
||||
<g id="node-bff">
|
||||
<rect class="node-shape kind-service emphasis-primary role-service" data-evidence="166-170" x="595.0" y="95.0" width="190.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="690.0" y="122.0">Spring BFF</text>
|
||||
<line class="node-detail-divider" x1="609.0" y1="143.0" x2="771.0" y2="143.0" />
|
||||
<text class="node-detail" x="611.0" y="160.0">bff-confidential</text>
|
||||
<text class="node-detail" x="611.0" y="176.0">oauth2Login</text>
|
||||
</g>
|
||||
<g id="node-authorized-client-store">
|
||||
<rect class="node-shape kind-database emphasis-normal role-store" data-evidence="166-170" x="815.0" y="108.0" width="190.0" height="82.0" /><ellipse class="node-shape kind-database emphasis-normal role-store" cx="910.0" cy="108.0" rx="95.0" ry="13.0" /><path class="storage-bottom" d="M 815.0 190.0 A 95.0 13.0 0 0 0 1005.0 190.0" />
|
||||
<text class="node-label" x="910.0" y="122.0">Authorized-client</text>
|
||||
<text class="node-label" x="910.0" y="140.0">store</text>
|
||||
<line class="node-detail-divider" x1="829.0" y1="161.0" x2="991.0" y2="161.0" />
|
||||
<text class="node-detail" x="831.0" y="178.0">access token</text>
|
||||
<text class="node-detail" x="831.0" y="194.0">refresh token</text>
|
||||
</g>
|
||||
<g id="node-resource-server">
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="168-168" x="595.0" y="240.0" width="190.0" height="74.0" rx="7" />
|
||||
<text class="node-label" x="690.0" y="267.0">Internal Resource</text>
|
||||
<text class="node-label" x="690.0" y="285.0">Server</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.7 KiB |
Reference in New Issue
Block a user