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
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="680" height="2231" viewBox="0 0 680 2231" role="img" aria-labelledby="diagram-title diagram-description">
<title id="diagram-title">Bearer JWT가 검증과 역할 변환을 지나 principal이 된다</title>
<desc id="diagram-description">왼쪽의 raw Bearer JWT가 NimbusJwtDecoder에서 JWK 서명을 확인한 뒤 issuer와 timestamp validator, 프로젝트의 AudienceValidator를 통과해 validated Jwt가 된다. 이어서 KeycloakRealmRoleConverter가 realm_access.roles를 ROLE_* authority로 바꾸고 authenticated principal이 만들어진다.</desc>
<metadata>{&quot;techviz&quot;:{&quot;spec_version&quot;:&quot;1.1&quot;,&quot;id&quot;:&quot;bearer-jwt-validation-chain&quot;,&quot;profile&quot;:&quot;component-flow&quot;},&quot;source_context&quot;:{&quot;document&quot;:&quot;docs/keycloak/final/document.md&quot;,&quot;document_sha256&quot;:&quot;ea10df24b892e2c57123a37a4b4f0d821e4f394353e6746f50df6a48342353e9&quot;,&quot;anchor&quot;:{&quot;kind&quot;:&quot;heading&quot;,&quot;value&quot;:&quot;AP1 완주: callback code가 브라우저 Bearer 요청이 되기까지&quot;,&quot;line&quot;:227}},&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" />
</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="680" height="2231" />
<polyline class="edge kind-data style-solid emphasis-normal" points="123.5,209.0 123.5,332.0 120.0,332.0 120.0,455.0" data-evidence="354-360" />
<rect class="edge-label-bg" x="92.7" y="290.0" width="58.2" height="22" rx="3" />
<text class="edge-label" x="121.8" y="305.0">decode</text>
<polyline class="edge kind-data style-solid emphasis-normal" points="120.0,526.0 120.0,645.5 118.5,645.5 118.5,765.0" data-evidence="360-361" />
<rect class="edge-label-bg" x="70.0" y="603.5" width="98.4" height="22" rx="3" />
<text class="edge-label" x="119.2" y="618.5">signature ok</text>
<polyline class="edge kind-data style-solid emphasis-normal" points="118.5,839.0 118.5,957.0 132.0,957.0 132.0,1075.0" data-evidence="361-362" />
<rect class="edge-label-bg" x="96.2" y="915.0" width="58.2" height="22" rx="3" />
<text class="edge-label" x="125.2" y="930.0">claims</text>
<polyline class="edge kind-data style-solid emphasis-primary" points="132.0,1146.0 132.0,1277.5 123.5,1277.5 123.5,1409.0" data-evidence="362-363" />
<rect class="edge-label-bg" x="71.8" y="1235.5" width="111.8" height="22" rx="3" />
<text class="edge-label" x="127.8" y="1250.5">valid audience</text>
<polyline class="edge kind-data style-solid emphasis-normal" points="123.5,1473.0 123.5,1596.0 153.0,1596.0 153.0,1719.0" data-evidence="363-364" />
<rect class="edge-label-bg" x="92.4" y="1554.0" width="91.7" height="22" rx="3" />
<text class="edge-label" x="138.2" y="1569.0">realm roles</text>
<polyline class="edge kind-data style-solid emphasis-normal" points="153.0,1790.0 153.0,1942.5 115.0,1942.5 115.0,2095.0" data-evidence="364-365" />
<rect class="edge-label-bg" x="88.2" y="1900.5" width="91.7" height="22" rx="3" />
<text class="edge-label" x="134.0" y="1915.5">authorities</text>
<g id="node-bearer-input">
<rect class="node-shape kind-data emphasis-normal role-source" data-evidence="354-359" x="48.5" y="145.0" width="150.0" height="64.0" rx="7" />
<text class="node-label" x="123.5" y="175.0">Bearer JWT</text>
</g>
<g id="node-jwt-decoder">
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="359-360" x="45.0" y="455.0" width="150.0" height="71.0" rx="7" />
<text class="node-label" x="120.0" y="482.0">NimbusJwtDecoder</text>
<line class="node-detail-divider" x1="59.0" y1="503.0" x2="181.0" y2="503.0" />
<text class="node-detail" x="61.0" y="520.0">JWK signature</text>
</g>
<g id="node-issuer-time">
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="361-361" x="43.5" y="765.0" width="150.0" height="74.0" rx="7" />
<text class="node-label" x="118.5" y="792.0">Issuer · Time</text>
<text class="node-label" x="118.5" y="810.0">validators</text>
</g>
<g id="node-audience-validator">
<rect class="node-shape kind-service emphasis-primary role-service" data-evidence="362-370" x="45.0" y="1075.0" width="174.0" height="71.0" rx="7" />
<text class="node-label" x="132.0" y="1102.0">AudienceValidator</text>
<line class="node-detail-divider" x1="59.0" y1="1123.0" x2="205.0" y2="1123.0" />
<text class="node-detail" x="61.0" y="1140.0">keycloak-pattern-api</text>
</g>
<g id="node-validated-jwt">
<rect class="node-shape kind-data emphasis-normal role-service" data-evidence="363-363" x="48.5" y="1409.0" width="150.0" height="64.0" rx="7" />
<text class="node-label" x="123.5" y="1439.0">Validated Jwt</text>
</g>
<g id="node-role-converter">
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="364-370" x="45.0" y="1719.0" width="216.0" height="71.0" rx="7" />
<text class="node-label" x="153.0" y="1746.0">Realm role converter</text>
<line class="node-detail-divider" x1="59.0" y1="1767.0" x2="247.0" y2="1767.0" />
<text class="node-detail" x="61.0" y="1784.0">KeycloakRealmRoleConverter</text>
</g>
<g id="node-principal">
<g class="actor-symbol emphasis-normal" data-evidence="365-365"><circle cx="115.0" cy="2115.0" r="11.0" /><line x1="115.0" y1="2131.0" x2="115.0" y2="2157.0" /><line x1="97.0" y1="2141.0" x2="133.0" y2="2141.0" /><line x1="115.0" y1="2157.0" x2="100.0" y2="2174.0" /><line x1="115.0" y1="2157.0" x2="130.0" y2="2174.0" /></g>
<text class="node-label" x="115.0" y="2161.0">Authenticated</text>
<text class="node-label" x="115.0" y="2179.0">principal</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.6 KiB