Skip to content

X-Forwarded-For IP 스푸핑 방지 처리 #109

@Kimgyuilli

Description

@Kimgyuilli

📋 설명

MdcLoggingFilter.getClientIp()에서 X-Forwarded-For, X-Real-IP 헤더를 무조건 신뢰하고 있어 IP 스푸핑 가능성 존재

🔒 보안 위험

  • 악의적 클라이언트가 헤더 조작으로 IP 위조 가능
  • Rate Limiting, IP 기반 차단 우회 가능

📍 위치

  • src/main/java/com/sopt/cherrish/global/logging/filter/MdcLoggingFilter.java:61-71

✅ 해결 방안

AWS ALB 도입 시 아래 설정 적용:

application-prod.yaml

server:
forward-headers-strategy: native # 또는 framework

📌 우선순위

Low (AWS ALB 전환 시점에 처리)

Metadata

Metadata

Assignees

No one assigned

    Labels

    도메인: 인프라⚙CI/CD, 배포, 모니터링, DB 마이그레이션우선순위: P2일정 여유 시 처리, 개선 사항 및 minor 버그

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions