feat(auth): X-Service-Token 헤더로 서비스 간 호출 우회 허용

OMS 의 반품 신청 같은 서버-서버 호출은 사용자 세션이 없으므로 AuthGuard 가
401 로 막아왔다. INTERNAL_SERVICE_TOKEN env 가 설정돼 있고 요청 헤더
X-Service-Token 이 같은 값이면 세션 검사를 우회한다.

보안: NPM 의 /corm/ location 블록에서 외부에서 들어온 X-Service-Token 헤더를
proxy_set_header X-Service-Token ""; 로 strip 해야 외부에서 토큰 추측 공격 방지.
This commit is contained in:
2026-05-24 18:15:00 +09:00
parent 6288716992
commit c4973224aa
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -54,6 +54,13 @@ SESSION_NAME_KEY=user_name
MAIN_LOGIN_URL=https://dbx.no1king.freeddns.org/login
MAIN_LOGOUT_URL=https://dbx.no1king.freeddns.org/logout
# ===== 서비스 간 호출 인증 =====
# OMS 가 반품 신청을 보낼 때 X-Service-Token 헤더로 이 값을 보낸다.
# CORM 의 AuthGuard 가 해당 헤더가 이 값과 일치하면 세션 검사 우회.
# OMS 의 .env 와 동일한 값으로 박을 것.
# NPM 은 외부에서 들어온 이 헤더를 strip 해야 한다 (보안).
INTERNAL_SERVICE_TOKEN=__paste-same-value-as-dbx-orderlist__
# ============================================
# Docker network
# ============================================