AWESOMEDEV edafae9f86
All checks were successful
CI / backend-test (push) Successful in 50s
CI / frontend-build (push) Successful in 17s
test(SEC-01): 보안·권한 계약 통합테스트 8개 (@WebMvcTest)
SecurityConfig의 URL→권한 규칙을 실제로 검증 — 규칙이 깨지면 CI에서 빨간불:
- /api/mentor/**: 비로그인→401, STUDENT→403, MENTOR→200
- /api/**(코딩): 비로그인→401, 로그인→200
- /api/auth/login·signup·find-id: permitAll(잘못된 본문 400으로 도달 증명)
- 인증은 실제 앱과 동일하게 세션에 SecurityContext를 넣어 흉내(가짜 우회 아님)
- @WebMvcTest 슬라이스 + @MockitoBean — DB 없이 웹계층+보안필터만 로드
- spring-security-test 불필요(세션 직접 주입이 더 충실) → 의존성 추가 안 함

전체 37개 테스트 통과(백엔드 29→37). 권한 규칙이 이제 자동 회귀 방지된다.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 17:33:37 +09:00
..