Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/result-and-failure-algebra/concept/concept-adapter-inbound-grpc-c01.md
T
DongHyeonkaandClaude Fable 5.1 b25357c48a docs(clean-architecture-backend-template): fold analysis into final and re-select one topic
- analysis/·source-index·state.json 을 final/document.md 제2부·제3부로 접었다. SSOT 는 하나다
- 파일럿 — commit-ambiguity-as-a-result 를 새 기준으로 재선별. 후보 14 → 글감 5
  (PROMOTE 5 · MERGE_INTO 3 · KEEP_IN_SSOT 4 · 보류 2). 기록 5건을 다시 썼고 그림 1개를
  techviz 로 만들었다
- 재선별이 잡은 것: 제1부 §6.2·§11.1 이 자기 §13.2 와 어긋나 있었다(레인을 안 돌렸다 vs
  돌렸다) — 정정. 이미 답이 나와 있던 Question 을 HEAD 재실행 질문으로 다시 세웠다.
  Concept 이 인용한 코드가 SSOT 에 없어 뺐다
- candidateScope·sourceRepository 기록. 나머지 43개 주제는 재선별 대기(PENDING 905)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-07 12:39:20 +09:00

2.8 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module
CONCEPT adapter-inbound-grpc-c01 인증이 예외 변환 바깥에 있어도 진단이 새지 않는다 result-and-failure-algebra clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 concept:adapter-inbound-grpc-c01 2026-09-01
key file
adapter-inbound-grpc-c01 ../../../final/evidence/rendered/adapter-inbound-grpc-c01.svg
key file
adapter-inbound-grpc-c01-diagram ../../../final/assets/diagrams/adapter-inbound-grpc-c01.svg
../../../final/evidence/raw/adapter-inbound-grpc-c01.txt
원본 분석 절은 final/document.md#a15#L140 이다.
adapter-inbound-grpc

인증이 예외 변환 바깥에 있어도 진단이 새지 않는다

ServerInterceptors.intercept(service, exceptionInterceptor, authenticationInterceptor)는 인증을 예외 변환보다 바깥에 놓는다. 그런데도 인증 실패가 변환되지 않은 예외로 새지 않는 이유는 인증 인터셉터가 자기 예외를 스스로 삼키기 때문이다.

본문

ServerInterceptors.intercept(service, exceptionInterceptor, authenticationInterceptor) — gRPC 규약상 마지막 인터셉터의 interceptCall이 먼저 호출되므로 인증이 바깥, 예외 처리가 안쪽이다. 등록할 때 적은 순서와 실제로 요청을 감싸는 순서가 뒤집혀 있다.

바깥에서 안으로 놓이는 순서

:::evidence key="adapter-inbound-grpc-c01-diagram" alt="인증과 업무 처리와 예외 변환이 위에서 아래로 이어지는 구조" caption="인터셉터의 순서" zoom="false" :::

인증이 예외 변환 바깥에 있어도 되는 이유

인증 인터셉터가 예외 처리 바깥에 있는데도 안전한 이유는 그것이 스스로 예외를 삼키기 때문이다. CLAUDE.md의 약속("정책이 false를 반환하거나 예외를 던진 요청은 ... 안정적인 UNAUTHENTICATED status/code/category로 종료된다")이 코드와 일치하고, 정책이 false를 돌려준 경우와 예외를 던진 경우가 모두 같은 call.close(Status.UNAUTHENTICATED.withDescription(OperationalError.UNAUTHENTICATED.code()), trailersFor(...))로 끝난다. 정책 진단은 클라이언트에 닿지 않는다.

두 인터셉터가 같은 일을 두 번 하는 구조가 아니다. 중복 아님.

분석 원문이 적은 순서 판정

:::evidence key="adapter-inbound-grpc-c01" alt="분석 문서 final/document.md#a15 에서 이 기록의 근거 절을 그대로 잘라낸 15줄. 코드베이스를 측정한 것이 아니라 원본 판정이 무엇을 적었는지를 보여 준다." caption="final/document.md#a15 발췌 — 15줄" zoom="true" :::