Skip to content

Conversation

@GoGradually
Copy link
Collaborator

변경된 점

  • API에 대한 버전 넘버링을 path 앞부분에 추가

Copilot AI review requested due to automatic review settings December 31, 2025 08:37
Copy link

Copilot AI left a 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()
Copy link

Copilot AI Dec 31, 2025

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 목록에 추가해야 합니다.

Suggested change
"/v3/**", "/swagger-ui/**", "/async-api/**").permitAll()
"/v0/login/oauth2/**", "/v3/**", "/swagger-ui/**", "/async-api/**").permitAll()

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +52
.requestMatchers("/actuator/health/liveness", "/actuator/health/readiness",
"/login", "/signup", "/refresh", "/login/**",
"/*/login", "/*/signup", "/*/refresh", "/*/login/**",
"/v3/**", "/swagger-ui/**", "/async-api/**").permitAll()
Copy link

Copilot AI Dec 31, 2025

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 목록에 추가하는 것을 검토해야 합니다. 로그아웃이 인증된 사용자만 수행할 수 있도록 하려는 의도라면, 이는 설계 의도일 수 있으므로 확인이 필요합니다.

Copilot uses AI. Check for mistakes.
@GoGradually GoGradually merged commit 76278e6 into master Dec 31, 2025
1 check passed
@GoGradually GoGradually deleted the feat/api-버전-넘버링-적용 branch December 31, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants