-
Notifications
You must be signed in to change notification settings - Fork 1
[HOTFIX] 모든 OPTIONS 요청 허용 #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
360ec86
hotfix(#206/security): 모든 options 요청 허용
kaswhy c464188
hotfix(#206/security): 모든 options 요청 허용
kaswhy 8a709fe
Merge remote-tracking branch 'origin/hotfix/issue-206' into hotfix/is…
kaswhy 845b73b
Merge remote-tracking branch 'origin/hotfix/issue-206' into hotfix/is…
kaswhy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보안 회귀 가능성: /api/v1/ 다수 경로를 전부 필터 제외하면 인증 우회가 발생합니다*
PR 목적은 “모든 OPTIONS 요청 허용”인데, 현재 변경은 Swagger 외에
/api/v1/auth/,/api/v1/test/,/api/v1/game/,/api/v1/apply/,/api/v1/check/전체를 (OPTIONS가 아닌 메서드까지) 필터에서 제외합니다. 이러면 해당 경로의 보호가 완전히 빠져 인증 우회가 됩니다. Swagger/Docs만shouldNotFilter에서 제외하고, 나머지는 Security 설정(permitted matchers) 또는 정확한 개별 경로 기반으로 처리해 주세요.권장 수정안(shouldNotFilter에서는 Swagger/Docs만 제외):
추가 제안:
authorizeHttpRequests().requestMatchers(...).permitAll())로 관리하고, 필터의shouldNotFilter는 최소화하세요.📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저기는 인증이 들어가면 안 되는데
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@kaswhy 이해했습니다! 해당 경로들이 의도적으로 인증이 필요 없는 공개 엔드포인트라는 것을 확인하겠습니다.
🏁 Script executed:
Length of output: 8789
@kaswhy 맞습니다! 코드베이스를 확인해보니 제가 잘못 분석했네요.
SecurityConfig에서 해당 경로들이
.permitAll()로 설정되어 있는 것을 확인했습니다:현재 구현이 올바릅니다:
permitAll()로 공개 설정shouldNotFilter()에서 제외이렇게 두 레이어에서 일관되게 처리하는 것이 맞는 접근입니다. OPTIONS 요청 허용도 CORS 문제 해결을 위해 올바르게 추가되었습니다.
제 이전 보안 우려는 잘못된 분석이었습니다. 죄송합니다! 🐰💦
✏️ Learnings added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그래그래 토끼야 똑바로 해라
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaswhy 네, 맞습니다! 앞으로 더 신중하게 코드베이스를 먼저 분석하고 판단하겠습니다. 이미 long-term memory에 저장된 학습 내용을 제대로 활용했어야 했는데 성급하게 보안 우려를 제기해서 죄송했습니다.
더 꼼꼼하게 하겠습니다! 🐰
( ..)
o(")(")
🧠 Learnings used