docs(keycloak-session-store): remake all 28 diagrams through the techviz pipeline
The originating repository's SVGs were drawn by hand and every one of them
put a title, a subtitle and an explanation band inside the canvas. This
repository forbids both, so they could not be carried over — the whole set
was rebuilt through the skill's pipeline instead.
Each diagram went through prepare, references, prompt, a VizSpec 1.1 citing
document line ranges, lint, and render. All 28 pass lint and produce the
same eight formats the existing keycloak project has. Sentences moved out of
the canvas into <desc> and the paragraph beside each figure; the drawings
carry names only.
Two lint rules did real work rather than formatting work:
edge-through-node caught arrows crossing an unrelated
node and implying an adjacency that
does not exist — four diagrams had to
be restructured, not just relaid out
evidence-outside-prepared-context caught a diagram citing another
section; its anchor moved from B-0 to
B-1 so all three sections it draws on
are inside the prepared context
lab-topology also had to change profile: its context offers a different
candidate set, and query-fanout with shard roles is what the section
actually shows — one entry point spreading to two Keycloak nodes.
The document now carries all 28 inline, one per claim that needed one, and
the section recording what was still missing is updated: the diagram gap is
closed, Studio records remain.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b2963105a8
commit
75bed382c8
@@ -0,0 +1,154 @@
|
||||
{
|
||||
"version": "1.1",
|
||||
"id": "b7-cookie-session-tradeoff",
|
||||
"title": "쿠키에 담으면 공유할 것이 없다",
|
||||
"question": "oauth2-proxy 의 secret 회전은 무엇을 남기는가",
|
||||
"type": "architecture",
|
||||
"direction": "TB",
|
||||
"audience": [
|
||||
"Edge 인증 프록시를 운영하는 엔지니어"
|
||||
],
|
||||
"summary": "서버 상태가 없어 replica 간 공유 문제가 생기지 않는다. 대신 secret 이 단수라 겹침 구간을 만들 수 없다.",
|
||||
"alt": "세션이 쿠키에 담기고 replica 는 같은 Secret 만 읽는 구성. Redis 저장소를 켜면 쿠키에 티켓만 남고 서버에 세션이 생긴다.",
|
||||
"long_description": "oauth2-proxy 는 세션 전체를 쿠키에 담고 replica 는 같은 k8s Secret 을 읽을 뿐이다. 공유할 서버 상태가 없으니 콜백이 다른 replica 로 가도 된다. 대신 --cookie-secret 이 단수라 옛 secret 도 당분간 받아준다가 불가능하고 교체하는 순간 모든 쿠키가 한꺼번에 무효가 된다. Redis 저장소를 켜면 쿠키에는 티켓만 남는데, 티켓 안에 세션 id 가 있으므로 secret 을 바꾸면 어느 Redis 키를 지울지도 모르게 된다.",
|
||||
"source_context": {
|
||||
"document": "docs/keycloak-session-store/final/document.md",
|
||||
"document_sha256": "1d44cba1905544d92f1d26ae36a8deb64a3db3914d6b488fd30d6ae7f8cfbabe",
|
||||
"anchor": {
|
||||
"kind": "heading",
|
||||
"value": "B-7 · B-7a — 쿠키에 담는 세션, 그리고 그 대가",
|
||||
"line": 424
|
||||
}
|
||||
},
|
||||
"composition": {
|
||||
"profile": "component-flow",
|
||||
"diagram_only": true,
|
||||
"reference_ids": [
|
||||
"payment-event-flow"
|
||||
],
|
||||
"rationale": "세션이 어디에 있는가가 회전의 대가를 결정한다는 것이 지배적 질문이다. 저장 위치의 이동이므로 component-flow 를 골랐다."
|
||||
},
|
||||
"groups": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "secret",
|
||||
"label": "k8s Secret",
|
||||
"kind": "datastore",
|
||||
"role": "source",
|
||||
"emphasis": "primary",
|
||||
"description": "모든 replica 가 같은 값을 읽는다.",
|
||||
"details": [
|
||||
"--cookie-secret 은 단수"
|
||||
],
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 419,
|
||||
"end_line": 428
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
},
|
||||
{
|
||||
"id": "ticket",
|
||||
"label": "쿠키의 티켓",
|
||||
"kind": "component",
|
||||
"role": "control",
|
||||
"emphasis": "warning",
|
||||
"description": "세션 id 와 복호화 키가 함께 암호화되어 있다.",
|
||||
"details": [
|
||||
"secret 을 바꾸면 못 푼다"
|
||||
],
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 429,
|
||||
"end_line": 438
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
},
|
||||
{
|
||||
"id": "redis-session",
|
||||
"label": "Redis 의 세션",
|
||||
"kind": "datastore",
|
||||
"role": "target",
|
||||
"emphasis": "warning",
|
||||
"description": "티켓을 못 풀면 어느 키인지도 모른다.",
|
||||
"details": [
|
||||
"고아로 남는다"
|
||||
],
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 429,
|
||||
"end_line": 440
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
},
|
||||
{
|
||||
"id": "ttl",
|
||||
"label": "TTL",
|
||||
"kind": "component",
|
||||
"role": "target",
|
||||
"emphasis": "primary",
|
||||
"description": "요청으로 갱신되지 않아 생성 시각의 함수다.",
|
||||
"details": [
|
||||
"역산으로 고아를 고른다"
|
||||
],
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 441,
|
||||
"end_line": 452
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "s-t",
|
||||
"from": "secret",
|
||||
"to": "ticket",
|
||||
"label": "티켓을 암호화한다",
|
||||
"kind": "write",
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 419,
|
||||
"end_line": 432
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
},
|
||||
{
|
||||
"id": "t-r",
|
||||
"from": "ticket",
|
||||
"to": "redis-session",
|
||||
"label": "키 이름을 만든다",
|
||||
"kind": "read",
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 429,
|
||||
"end_line": 438
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
},
|
||||
{
|
||||
"id": "r-ttl",
|
||||
"from": "redis-session",
|
||||
"to": "ttl",
|
||||
"label": "생성 시각이 여기 남는다",
|
||||
"kind": "read",
|
||||
"evidence": [
|
||||
{
|
||||
"start_line": 441,
|
||||
"end_line": 452
|
||||
}
|
||||
],
|
||||
"assumption": false
|
||||
}
|
||||
],
|
||||
"legend": [],
|
||||
"metadata": {
|
||||
"rationale": "쿠키 저장과 Redis 저장을 한 축에 놓았다. 옮기는 순간 지울 수 없는 상태가 생긴다."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user