Conversation
Summary of ChangesHello @lingard1234, 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은 JWT 인증 필터가 refresh 엔드포인트를 처리하여 발생할 수 있는 문제를 해결합니다. 해당 경로를 제외 목록에 추가함으로써, 토큰 갱신 요청이 불필요한 인증 검사를 우회하도록 하여 토큰 갱신 흐름을 개선합니다. Highlights
Changelog
Activity
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
This PR adds the /api/v1/auth/refresh path to the JWT authentication filter's exclusion list for token reissuance. However, the current implementation introduces a critical security vulnerability: the path matching logic in the filter uses startsWith, which is insecure and can lead to authentication bypasses. Additionally, the SecurityConfig.java file has not been updated to allow public access to this endpoint, which will prevent the token refresh functionality from working as intended.
| "/swagger-resources", | ||
| "/actuator" | ||
| "/actuator", | ||
| "/api/v1/auth/refresh" |
There was a problem hiding this comment.
Adding /api/v1/auth/refresh to the EXCLUDED_PATHS list using startsWith in the shouldNotFilter method is insecure. This can lead to authentication bypasses via path traversal (e.g., /api/v1/auth/refresh/..;/protected-endpoint) or unintentionally match other endpoints (e.g., /api/v1/auth/refresh-admin). It is recommended to use exact matching or a robust path matcher like AntPathMatcher. Furthermore, this change alone is insufficient; the SecurityConfig.java file must also be updated to allow public access to this endpoint by adding "/api/v1/auth/refresh" to PERMIT_ALL_URL_ARRAY. Without this, the endpoint will be blocked by Spring Security's anyRequest().authenticated() rule, preventing token reissuance.
Summary
헤더에 refresh만 보냄
Changes
EXCLUDED_PATHS에 refresh경로 추가
Type of Change
Related Issues
참고 사항