Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 로그인 세션 관련 문제를 해결하고 API 응답의 일관성과 보안을 강화하는 데 중점을 둡니다. 시간대 설정을 통일하여 잠재적인 시간 관련 오류를 방지하고, 사용자 ID 노출을 최소화하여 보안을 개선했습니다. 또한, 카테고리 관리 API의 응답을 사용자 역할에 따라 분리하여 데이터 접근 제어를 명확히 하고 코드의 가독성을 높였습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이번 PR은 타임존 설정을 명시적으로 지정하고 리프레시 토큰 처리 로직을 개선하여 사용자 로그인 세션 유지 문제를 해결하는 중요한 변경을 포함하고 있습니다. 또한, 여러 DTO에서 userId를 제거하고 사용자용/관리자용 DTO를 분리하여 API 응답의 보안을 강화하고 코드를 리팩토링한 점이 인상적입니다. 전반적으로 좋은 변경이지만, 리프레시 토큰 처리 로직 변경에 따른 보안적 측면과 JVM 기본 타임존 설정 방식에 대해 몇 가지 제안 사항을 리뷰 코멘트로 남겼습니다. 확인 부탁드립니다.
| if (!validSession) { | ||
| loginSessionStore.delete(sessionId) | ||
| throw unauthorizedException() | ||
| throw refreshUnauthorizedException() | ||
| } |
There was a problem hiding this comment.
리프레시 토큰 검증 실패 시 세션을 삭제하지 않도록 변경하면 여러 탭/기기에서의 사용자 경험이 향상될 수 있습니다. 하지만 이는 보안상 중요한 '리프레시 토큰 재사용 탐지' 기능을 약화시킬 수 있습니다. 토큰 회전(rotation) 전략에서 이전에 사용된 토큰이 다시 등장하는 것은 토큰 탈취의 강력한 신호로 간주됩니다. 이 경우, 보안 강화를 위해 해당 세션을 즉시 만료시키는 것이 좋습니다. 기존의 loginSessionStore.delete(sessionId) 로직이 이러한 방어적 역할을 수행했습니다. 현재 변경은 사용자 편의성을 높이지만, 잠재적인 보안 위협을 탐지하고 대응할 기회를 놓칠 수 있습니다. 사용자 경험과 보안 사이의 균형을 고려하여 이 변경 사항을 재검토해 보시길 권장합니다.
| class VlainterApplication | ||
|
|
||
| fun main(args: Array<String>) { | ||
| TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul")) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 858d7b4f6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!validSession) { | ||
| loginSessionStore.delete(sessionId) | ||
| throw unauthorizedException() | ||
| throw refreshUnauthorizedException() |
There was a problem hiding this comment.
Revoke session when refresh validation fails
When validateRefreshToken returns false, this branch now just returns 401 and leaves the Redis session alive. In the replay/hijack scenario (an old refresh token is reused after rotation, including a stolen token), the session remains valid for whoever holds the latest refresh token, so the anomaly no longer forces containment. Previously deleting sid here revoked the whole session family; removing that revocation weakens token-theft recovery behavior.
Useful? React with 👍 / 👎.
📢 기능 설명
필요시 실행결과 스크린샷 첨부
연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #{이슈넘버}
🩷 Approve 하기 전 확인해주세요!
✅ 체크리스트