refactor: 문서 개선 중

This commit is contained in:
donghyeon-ka
2026-09-21 14:30:55 +09:00
parent c93cdea150
commit 805a18f486
1497 changed files with 525837 additions and 59152 deletions
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1038" height="371" viewBox="0 0 1038 371" role="img" aria-labelledby="diagram-title diagram-description">
<svg xmlns="http://www.w3.org/2000/svg" width="1038" height="319" viewBox="0 0 1038 319" role="img" aria-labelledby="diagram-title diagram-description">
<title id="diagram-title">BFF 가 저장하는 두 가지와 그 조회 키</title>
<desc id="diagram-description">Spring Security 의 자동 구성은 세션을 서블릿 컨테이너 메모리에, authorized client 를 InMemoryOAuth2AuthorizedClientService 에 둔다. 조회 경로가 다른데 이름이 비슷해 하나로 오해하기 쉽다. AuthenticatedPrincipalOAuth2AuthorizedClientRepository 는 principal 이름으로 찾고 조회 키에 session id 가 없다. 그래서 SPRING_SESSION_STORE_TYPE 을 redis 로 바꿔 세션을 옮겨도 토큰은 인스턴스 메모리에 남는다.</desc>
<metadata>{&quot;techviz&quot;:{&quot;spec_version&quot;:&quot;1.1&quot;,&quot;id&quot;:&quot;bff-store-lookup-keys&quot;,&quot;profile&quot;:&quot;component-flow&quot;},&quot;source_context&quot;:{&quot;document&quot;:&quot;docs/keycloak-session-store/final/document.md&quot;,&quot;document_sha256&quot;:&quot;609353e10bfd37a9bbb6a79ecf2a32f3d3c02d5d161879a14ad4713e49e7e5e8&quot;,&quot;anchor&quot;:{&quot;kind&quot;:&quot;heading&quot;,&quot;value&quot;:&quot;B-1 · 세션만 Redis 로 옮기면 — 반쪽만 옮겨진다&quot;,&quot;line&quot;:345}},&quot;evidence_policy&quot;:&quot;Each factual element cites source lines or is marked assumption.&quot;,&quot;diagram_only&quot;:true}</metadata>
<metadata>{&quot;techviz&quot;:{&quot;spec_version&quot;:&quot;1.1&quot;,&quot;id&quot;:&quot;bff-store-lookup-keys&quot;,&quot;profile&quot;:&quot;component-flow&quot;},&quot;source_context&quot;:{&quot;document&quot;:&quot;docs/keycloak-session-store/final/document.md&quot;,&quot;document_sha256&quot;:&quot;28aef96a2bbb94fbb10ade26a71238fee62a5a4d9fa6e7749ae98cfd0a65e560&quot;,&quot;anchor&quot;:{&quot;kind&quot;:&quot;heading&quot;,&quot;value&quot;:&quot;B-1 · 세션만 Redis 로 옮기면 — 반쪽만 옮겨진다&quot;,&quot;line&quot;:742}},&quot;evidence_policy&quot;:&quot;Each factual element cites source lines or is marked assumption.&quot;,&quot;diagram_only&quot;: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" />
@@ -49,45 +49,45 @@
.timeline-detail { font-size: 11px; fill: #4b5563; text-anchor: middle; }
</style>
</defs>
<rect class="canvas" width="1038" height="371" />
<polyline class="edge kind-write style-solid emphasis-normal" points="568.0,264.5 648.0,264.5 648.0,277.5 728.0,277.5" data-evidence="355-358" />
<rect class="edge-label-bg" x="650.0" y="257.0" width="44.0" height="22" rx="3" />
<text class="edge-label" x="672.0" y="272.0">저장</text>
<polyline class="edge kind-read style-solid emphasis-normal" points="220.0,202.0 300.0,202.0 300.0,264.5 380.0,264.5" data-evidence="332-341" />
<rect class="edge-label-bg" x="302.0" y="219.2" width="44.0" height="22" rx="3" />
<text class="edge-label" x="324.0" y="234.2">조회</text>
<polyline class="edge kind-read style-solid emphasis-normal" points="220.0,184.0 305.2,184.0 305.2,121.5 390.5,121.5" data-evidence="326-331" />
<rect class="edge-label-bg" x="307.2" y="138.8" width="44.0" height="22" rx="3" />
<text class="edge-label" x="329.2" y="153.8">조회</text>
<polyline class="edge kind-write style-solid emphasis-normal" points="557.5,121.5 646.2,121.5 646.2,108.5 735.0,108.5" data-evidence="347-351" />
<rect class="edge-label-bg" x="648.2" y="101.0" width="44.0" height="22" rx="3" />
<text class="edge-label" x="670.2" y="116.0">저장</text>
<rect class="canvas" width="1038" height="319" />
<polyline class="edge kind-write style-solid emphasis-normal" points="568.0,238.5 648.0,238.5 648.0,238.5 728.0,238.5" data-evidence="773-776" />
<rect class="edge-label-bg" x="626.0" y="196.5" width="44.0" height="22" rx="3" />
<text class="edge-label" x="648.0" y="211.5">저장</text>
<polyline class="edge kind-read style-solid emphasis-normal" points="220.0,176.0 300.0,176.0 300.0,238.5 380.0,238.5" data-evidence="725-732" />
<rect class="edge-label-bg" x="302.0" y="193.2" width="44.0" height="22" rx="3" />
<text class="edge-label" x="324.0" y="208.2">조회</text>
<polyline class="edge kind-read style-solid emphasis-normal" points="220.0,158.0 305.2,158.0 305.2,95.5 390.5,95.5" data-evidence="719-722" />
<rect class="edge-label-bg" x="307.2" y="112.8" width="44.0" height="22" rx="3" />
<text class="edge-label" x="329.2" y="127.8">조회</text>
<polyline class="edge kind-write style-solid emphasis-normal" points="557.5,95.5 646.2,95.5 646.2,95.5 735.0,95.5" data-evidence="744-747" />
<rect class="edge-label-bg" x="624.2" y="53.5" width="44.0" height="22" rx="3" />
<text class="edge-label" x="646.2" y="68.5">저장</text>
<g id="node-request">
<g class="actor-symbol emphasis-primary" data-evidence="326-331"><circle cx="145.0" cy="171.0" r="11.0" /><line x1="145.0" y1="187.0" x2="145.0" y2="196.0" /><line x1="127.0" y1="197.0" x2="163.0" y2="197.0" /><line x1="145.0" y1="196.0" x2="130.0" y2="213.0" /><line x1="145.0" y1="196.0" x2="160.0" y2="213.0" /></g>
<text class="node-label" x="145.0" y="228.0">브라우저 요청</text>
<g class="actor-symbol emphasis-primary" data-evidence="719-722"><circle cx="145.0" cy="145.0" r="11.0" /><line x1="145.0" y1="161.0" x2="145.0" y2="180.0" /><line x1="127.0" y1="171.0" x2="163.0" y2="171.0" /><line x1="145.0" y1="180.0" x2="130.0" y2="197.0" /><line x1="145.0" y1="180.0" x2="160.0" y2="197.0" /></g>
<text class="node-label" x="145.0" y="202.0">브라우저 요청</text>
</g>
<g id="node-app-session">
<rect class="node-shape kind-component emphasis-primary role-store" data-evidence="335-341" x="390.5" y="86.0" width="167.0" height="71.0" rx="7" />
<text class="node-label" x="474.0" y="113.0">Application Session</text>
<line class="node-detail-divider" x1="404.5" y1="134.0" x2="543.5" y2="134.0" />
<text class="node-detail" x="406.5" y="151.0">조회 키: 세션 id</text>
<rect class="node-shape kind-component emphasis-primary role-store" data-evidence="727-732" x="390.5" y="60.0" width="167.0" height="71.0" rx="7" />
<text class="node-label" x="474.0" y="87.0">Application Session</text>
<line class="node-detail-divider" x1="404.5" y1="108.0" x2="543.5" y2="108.0" />
<text class="node-detail" x="406.5" y="125.0">조회 키: 세션 id</text>
</g>
<g id="node-authorized-client">
<rect class="node-shape kind-component emphasis-warning role-store" data-evidence="335-341" x="380.0" y="229.0" width="188.0" height="71.0" rx="7" />
<text class="node-label" x="474.0" y="256.0">OAuth2AuthorizedClient</text>
<line class="node-detail-divider" x1="394.0" y1="277.0" x2="554.0" y2="277.0" />
<text class="node-detail" x="396.0" y="294.0">조회 키: principal 이름</text>
<rect class="node-shape kind-component emphasis-warning role-store" data-evidence="727-732" x="380.0" y="203.0" width="188.0" height="71.0" rx="7" />
<text class="node-label" x="474.0" y="230.0">OAuth2AuthorizedClient</text>
<line class="node-detail-divider" x1="394.0" y1="251.0" x2="554.0" y2="251.0" />
<text class="node-detail" x="396.0" y="268.0">조회 키: principal 이름</text>
</g>
<g id="node-redis">
<rect class="node-shape kind-datastore emphasis-primary role-target" data-evidence="347-351" x="735.0" y="73.0" width="251.0" height="71.0" /><ellipse class="node-shape kind-datastore emphasis-primary role-target" cx="860.5" cy="73.0" rx="125.5" ry="13.0" /><path class="storage-bottom" d="M 735.0 144.0 A 125.5 13.0 0 0 0 986.0 144.0" />
<text class="node-label" x="860.5" y="100.0">Redis</text>
<line class="node-detail-divider" x1="749.0" y1="121.0" x2="972.0" y2="121.0" />
<text class="node-detail" x="751.0" y="138.0">SPRING_SESSION_STORE_TYPE=redis</text>
<rect class="node-shape kind-datastore emphasis-primary role-target" data-evidence="744-747" x="735.0" y="71.8" width="251.0" height="47.3" /><ellipse class="node-shape kind-datastore emphasis-primary role-target" cx="860.5" cy="71.8" rx="125.5" ry="11.8" /><path class="storage-bottom" d="M 735.0 119.2 A 125.5 11.8 0 0 0 986.0 119.2" />
<text class="node-label" x="860.5" y="87.0">Redis</text>
<line class="node-detail-divider" x1="749.0" y1="108.0" x2="972.0" y2="108.0" />
<text class="node-detail" x="751.0" y="125.0">SPRING_SESSION_STORE_TYPE=redis</text>
</g>
<g id="node-postgres">
<rect class="node-shape kind-datastore emphasis-primary role-target" data-evidence="355-358" x="728.0" y="242.0" width="265.0" height="71.0" /><ellipse class="node-shape kind-datastore emphasis-primary role-target" cx="860.5" cy="242.0" rx="132.5" ry="13.0" /><path class="storage-bottom" d="M 728.0 313.0 A 132.5 13.0 0 0 0 993.0 313.0" />
<text class="node-label" x="860.5" y="269.0">PostgreSQL</text>
<line class="node-detail-divider" x1="742.0" y1="290.0" x2="979.0" y2="290.0" />
<text class="node-detail" x="744.0" y="307.0">JdbcOAuth2AuthorizedClientService</text>
<rect class="node-shape kind-datastore emphasis-primary role-target" data-evidence="773-776" x="728.0" y="214.8" width="265.0" height="47.3" /><ellipse class="node-shape kind-datastore emphasis-primary role-target" cx="860.5" cy="214.8" rx="132.5" ry="11.8" /><path class="storage-bottom" d="M 728.0 262.2 A 132.5 11.8 0 0 0 993.0 262.2" />
<text class="node-label" x="860.5" y="230.0">PostgreSQL</text>
<line class="node-detail-divider" x1="742.0" y1="251.0" x2="979.0" y2="251.0" />
<text class="node-detail" x="744.0" y="268.0">JdbcOAuth2AuthorizedClientService</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB