Files
keycloak-pattern/docs/evidence/b4-edge-authorization
DongHyeonkaandClaude Opus 5 7dc0a3e5da docs: B-4 — the edge does not overwrite the headers it never sets
Two headers of the same name both arrive rather than one overwriting the other, because nginx only replaces headers it sets with proxy_set_header. A comma inside a role name is indistinguishable from the delimiter, and the size limit is a cliff: Tomcat returns 400 around 8KB and the connection dies around 16KB, so the same cause produces two different-looking failures.

Forged identity headers reach the upstream untouched while the JWT-protected paths return 401, which is Q4's own point that a header-fed upstream has nothing to verify against. By Q4's checklist that answer alone points at the BFF structure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 14:23:41 +09:00
..

B-4 — Edge 인가 범위 증거

2026-09-04 15:2515:35 KST 해설: docs/experiment-b4-edge-authorization-scope.md

파일 무엇을 보여주는가
01-header-handling.txt ① 동명 헤더가 둘 다 도착(['admin','editor'])하고 값 안의 쉼표를 구분자와 구별할 수 없다 · ② 8KB 에서 Tomcat 400, 16KB 에서 연결 끊김 — 자르지 않고 거부 · ④ 위조 신원 헤더가 그대로 도착, JWT 경로는 401

핵심 세 줄

  1. Q4 의 「nginx 가 동명 헤더를 덮어쓴다」는 조건부다. nginx 는 자기가 proxy_set_header 한 헤더만 덮어쓰고, 나머지는 통과시킨다 — 지금 X-Auth-Request-* 는 통과한다.
  2. 크기는 절벽이다. 점진적으로 나빠지지 않고 8KB 에서 전면 400 이 되며, role 이 많은 사용자만 깨진다.
  3. 헤더를 인가 근거로 쓰면 위조 가능성이 곧 권한 상승이다. 2홉 실험의 결론이 여기서는 신원 자체에 적용된다.