-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor : same site session 문제 해결을 위한 쿠키 설정 변경 #289
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
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough관리자 API의 MenuImageController에서 삭제 핸들러의 @PathVariable 이름을 경로 변수와 일치하도록 변경. 사용자 API에서 CORS 자격 증명 허용을 제거. 보안 설정에서 CSRF를 Cookie 기반으로 활성화하고 특정 경로는 제외, 세션 정책을 IF_REQUIRED로 변경. OrderController는 HttpServletRequest로 세션을 조건 확인하도록 수정. 서비스 파일은 포매팅만 변경. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant OC as OrderController
participant S as OrderService
C->>OC: GET /orders/{storeId}/{tableId}/items
OC->>OC: request.getSession(false)
alt 세션 없음
OC-->>C: 200 OK ([] 빈 리스트)
else 세션 있음
OC->>S: getOrderItems(storeId, tableId, sessionId)
S-->>OC: List<OrderItemDTO>
OC-->>C: 200 OK (목록)
end
sequenceDiagram
autonumber
participant U as User Agent
participant SEC as SecurityFilterChain
participant APP as Application
U->>SEC: 요청 (예: GET /orders/...)
rect rgba(200,230,255,0.25)
note over SEC: CSRF 처리 (CookieCsrfTokenRepository)
alt 경로가 CSRF 제외(/api/**, /login/**, /oauth2/**, /swagger-ui/**, /v3/api-docs/**, /orders/**)
SEC->>APP: 요청 전달(검사 생략)
else 일반 경로
SEC->>SEC: CSRF 토큰 확인(쿠키/헤더)
SEC->>APP: 유효 시 요청 전달
SEC-->>U: 403 (유효하지 않음) 실패 시
end
end
note over SEC,APP: 세션 정책 IF_REQUIRED (필요 시 세션 생성/사용)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (5)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
작업 요약
same site session 문제 해결을 위한 쿠키 설정 변경
Issue Link
#288
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit