Conversation
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
Walkthrough이 변경 사항은 Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller(UsersApiController)
participant CookieUtils
participant Response
Client->>Controller: refreshToken 요청
Controller->>CookieUtils: setTokenCookies(response, token, refreshToken)
CookieUtils->>Response: 쿠키 속성 설정 (secure, same-site 등)
Controller-->>Client: 응답 반환
sequenceDiagram
participant Client
participant LoginFilter
participant CookieUtils
participant Response
Client->>LoginFilter: 로그인 요청
LoginFilter->>CookieUtils: setTokenCookies(response, token, refreshToken)
CookieUtils->>Response: 쿠키 속성 설정
LoginFilter-->>Client: 인증 성공 응답
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
📜 PR 내용 요약
Secure,SameSite)을 다르게 적용할 수 있도록 관련 코드를 수정했습니다.CookieUtils클래스를 스프링 컴포넌트로 관리하도록 변경하고, 환경별 설정을 주입받아 사용하도록 개선했습니다.CookieUtils를 주입받아 사용하도록 수정했습니다.⚒️ 작업 및 변경 내용(상세하게)
CookieUtils클래스 수정:@Component) 로 변경했습니다.application.yml또는 환경별 설정 파일(application-prod.yml)에서security.cookie.secure및security.cookie.same-site속성 값을 주입받도록 필드를 추가 했습니다.setTokenCookies메서드를 인스턴스 메서드로 변경하고, 주입받은cookieSecure값을 사용하여 쿠키의setSecure속성을 설정하도록 수정했습니다.LoginFilter,OAuth2SuccessHandler,UsersApiController,SecurityConfig수정:CookieUtils빈을 주입받도록 추가했습니다.CookieUtils.setTokenCookies와 같이 정적으로 호출하던 부분을 주입받은cookieUtils인스턴스를 통해 호출하도록 변경했습니다.application-prod.yml추가/수정:prod)에서 쿠키의Secure속성을true로 설정하기 위해security.cookie.secure: true속성을 추가했습니다.security.cookie.same-site: Lax속성도 함께 추가했습니다.📚 기타 참고 사항
Secure쿠키 속성을 배포 환경에서만 적용하고, HTTP 환경인 개발 환경에서는 적용하지 않도록 분리하여 유연성을 확보했습니다.application-prod.yml)을 통해 관리되므로 환경에 따른 설정 변경이 용이해졌습니다.