Skip to content

feat: 보안 강화 — Rate Limiting & 인증 분리 #2

Description

@luma200ok

개요

API 보안 강화 및 인증 구조 개선

작업 내용

  • /api/auth/register ADMIN 전용 인가 분리
  • Redis 기반 로그인 Rate Limiting 추가 (15분 내 5회 실패 시 잠금)
  • /api/sensor/data X-Api-Key 헤더 인증 추가
  • AuthController에서 UserRepository 직접 주입 제거 → UserService 위임
  • GlobalExceptionHandler에 BadCredentialsException 핸들러 추가 (401/A003 반환)
  • LoginRateLimiter Redis 연결 실패 시 fail-open 처리 (경고 로그만 남김)
  • application-local.yml JWT_SECRET, DB_PASSWORD 로컬 기본값 추가

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions