Feature/sec#31
Merged
Merged
Conversation
- tradeApi, assetApi 그룹 모두 유지 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closed
Closed
gmltmdu
pushed a commit
that referenced
this pull request
Apr 20, 2026
* feat: Spring Security JWT 인증 필터 및 Security 설정 추가 * refactor: TradeController userId를 @AuthenticationPrincipal로 교체 * 로그인 입력값 검증 추가 * fix: BaseInitData 초기 데이터 비밀번호 BCrypt 적용 및 유효성 조건 * fix: Users 엔터티 password 컬럼 길이 255로 확장 * feat: Swagger JWT Bearer 인증 스키마 추가 * feat: 회원가입 시 예수금 5천만원 계좌 자동 생성 * refactor: AssetController userId를 @AuthenticationPrincipal로 교체 및 StockController @crossorigin 제거 * refactor: UserRes에서 refreshToken 필드 제거 (HttpOnly 쿠키 방식으로 전환 시작) * refactor: TokenReq 삭제 (refreshToken을 바디 대신 쿠키로 수신) * refactor: UsersService logout/reissueToken 파라미터를 String refreshToken으로 변경 * feat: refreshToken을 HttpOnly 쿠키 방식으로 전환 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 과제 설명
refreshToken은 HttpOnly 쿠키로 전달해 XSS 방지👩💻 요구 사항과 구현 내용
CustomAuthenticationFilterSecurityContext에 저장CustomUserDetailsServiceSecurityUser반환SecurityUserUserDetailsSecurityConfigrefreshToken을 Set-Cookie 헤더로 전달, 토큰 재발급/로그아웃 시 @CookieValue로 쿠키에서 읽음TokenReq제거,UsersRes에서refreshToken필드 제거SecurityUser로 교체✅ PR 포인트 & 궁금한 점
CustomAuthenticationFilter에서 JWT가 유효하지 않을 때 그냥 통과시키는 방식을 사용했습니다.CorsConfig를 삭제하고SecurityConfig내UrlBasedCorsConfigurationSource로 통합했습니다. Spring Security 필터 체인을 거치기 전에 CORS 처리가 되도록 했습니다.