-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/api 버전 넘버링 적용 #10
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
The head ref may contain hidden characters: "feat/api-\uBC84\uC804-\uB118\uBC84\uB9C1-\uC801\uC6A9"
Conversation
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.
Pull request overview
이 PR은 API 엔드포인트에 버전 넘버링 체계를 도입하여 API 버전 관리를 시작합니다. 기존 컨트롤러를 유지하면서 /v0 접두사가 추가된 새로운 버전의 컨트롤러들을 생성했습니다.
- 회원 및 OAuth2 컨트롤러에
/v0버전 경로를 추가 - 버전이 지정된 엔드포인트에 대한 보안 설정 업데이트
- 기존 비버전 컨트롤러는 유지하여 하위 호환성 보장
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Oauth2ControllerV0.java | /v0 경로 접두사가 추가된 OAuth2 소셜 로그인 컨트롤러의 새 버전 |
| MemberControllerV0.java | /v0 경로 접두사가 추가된 회원 인증 컨트롤러의 새 버전 |
| SecurityConfig.java | 버전이 지정된 엔드포인트(/*/login, /*/signup, /*/refresh, /*/login/**)를 인증 없이 접근 가능하도록 보안 설정 업데이트 |
| .requestMatchers("/actuator/health/liveness", "/actuator/health/readiness", | ||
| "/login", "/signup", "/refresh", "/login/**", | ||
| "/*/login", "/*/signup", "/*/refresh", "/*/login/**", | ||
| "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() |
Copilot
AI
Dec 31, 2025
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.
문제점: /*/login/** 패턴이 /v0/login/oauth2/authorize/{provider}와 /v0/login/oauth2/code/{provider} 경로를 매칭하지 못합니다. Spring Security의 AntPathMatcher에서 **는 0개 이상의 경로 세그먼트를 매칭하지만, /*/login/**는 /v0/login 다음에 바로 오는 경로만 매칭합니다.
영향: OAuth2 로그인 엔드포인트(/v0/login/oauth2/authorize/{provider}, /v0/login/oauth2/code/{provider})가 인증 없이 접근 불가능하여 소셜 로그인이 작동하지 않습니다.
수정 제안: /*/login/** 대신 /*/login/oauth2/** 패턴을 추가하거나, 더 구체적으로 /v0/login/oauth2/**를 permitAll 목록에 추가해야 합니다.
| "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() | |
| "/v0/login/oauth2/**", "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() |
| .requestMatchers("/actuator/health/liveness", "/actuator/health/readiness", | ||
| "/login", "/signup", "/refresh", "/login/**", | ||
| "/*/login", "/*/signup", "/*/refresh", "/*/login/**", | ||
| "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll() |
Copilot
AI
Dec 31, 2025
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.
문제점: /logout 엔드포인트가 permitAll 목록에 누락되어 있습니다. 기존 코드에서는 /login, /signup, /refresh가 허용되었지만, /logout은 포함되지 않았습니다.
영향: 버전이 지정되지 않은 /logout 엔드포인트와 버전이 지정된 /v0/logout 엔드포인트 모두 인증이 필요하게 됩니다. 일반적으로 로그아웃은 인증 없이 접근 가능해야 하므로 이는 의도하지 않은 동작일 수 있습니다.
수정 제안: /logout와 /*/logout를 permitAll 목록에 추가하는 것을 검토해야 합니다. 로그아웃이 인증된 사용자만 수행할 수 있도록 하려는 의도라면, 이는 설계 의도일 수 있으므로 확인이 필요합니다.
변경된 점