The skill says drawings carry names and sentences go in <desc> and the paragraph beside the figure. I put sentences in node details and edge labels instead, and 27 of the 28 diagrams shipped with prose inside the canvas — "예측 다섯 개가 틀렸다", "아홉 번 조용히 실패했다", "막혀서 닿지 않는다". Only label and details render on the canvas; description does not. So every sentence moved to a noun phrase and the meaning stays in description, which was already carrying it. 막혀서 닿지 않는다 -> 차단 아홉 번 조용히 실패했다 -> 조용한 실패 9건 예측 다섯 개가 틀렸다 -> 틀린 예측 5건 로그아웃이 정리하지 않는다 -> 로그아웃 미정리 볼륨이 없으면 여기까지다 -> 볼륨 없음 Three node labels were sentences too and became names: 세션 스냅샷, 예측 선기록, 대조군 확보. What stays is what the rules protect — identifiers, commands and measured values: PRIMARY KEY (client_registration_id, principal_name), ValidationFailedException: 1 changesets check sum, nginx -t && nginx -s reload, SET LOCAL synchronous_commit TO OFF. Those are names of things, not prose about them. 294 canvas strings across 28 diagrams, none matching a sentence ending, average 11 characters. All 28 still lint clean and re-rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
154 lines
4.4 KiB
JSON
154 lines
4.4 KiB
JSON
{
|
|
"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 저장을 한 축에 놓았다. 옮기는 순간 지울 수 없는 상태가 생긴다."
|
|
}
|
|
} |