Skip to content

[FEAT] 모임에서 공개할 API 설정 #79

Merged
LimdaeIl merged 1 commit intomainfrom
feat/group-open-api
Dec 11, 2025
Merged

[FEAT] 모임에서 공개할 API 설정 #79
LimdaeIl merged 1 commit intomainfrom
feat/group-open-api

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Dec 11, 2025

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

모임 목록 조회, 모임 상세 조회 API를 모두 공개로 수정합니다.
Filter와 Security Config에 공개 API를 작성했습니다.

🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

릴리즈 노트

  • 새로운 기능
    • 그룹 관련 API 엔드포인트(/api/v1/groups/**, /api/v1/groups)를 공개 접근 가능하도록 설정했습니다. 이제 인증 없이 해당 엔드포인트에 접근할 수 있습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@LimdaeIl LimdaeIl self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 07:46
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Dec 11, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

모임(그룹) 관련 API 엔드포인트들을 JWT 인증이 필요 없는 공개 엔드포인트로 설정합니다. 두 개의 보안 설정 파일에서 /api/v1/groups/**/api/v1/group 패턴을 공개 접근 목록에 추가합니다.

Changes

Cohort / File(s) Summary
JWT 인증 필터 공개 엔드포인트 추가
src/main/java/team/wego/wegobackend/common/security/JwtAuthenticationFilter.java
isPublicEndpoint 로직에 /api/v1/groups/**/api/v1/group 패턴을 공개 엔드포인트로 등록하여 이 경로들에 대한 토큰 검증 생략
보안 매처 공개 엔드포인트 추가
src/main/java/team/wego/wegobackend/common/security/SecurityConfig.java
보안 설정에 GET 요청용 공개 매처로 /api/v1/groups/**/api/v1/groups 추가하여 인증 없이 접근 가능하도록 구성

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8분

  • 보안 설정 변경 검증 필요: 추가된 엔드포인트 패턴이 의도한 API 경로와 정확히 일치하는지 확인
  • 패턴 일관성 확인: 두 파일에서 동일한 패턴이 올바르게 등록되었는지 검토

Possibly related PRs

Poem

🐰 비공개 문을 열어주는 마법,
그룹들이 모두에게 드러나니,
공개 API 경로는 반짝거리고,
누구나 모임을 찾을 수 있게 되었네! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/group-open-api

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 22fff8d and 20a84d1.

📒 Files selected for processing (2)
  • src/main/java/team/wego/wegobackend/common/security/JwtAuthenticationFilter.java (1 hunks)
  • src/main/java/team/wego/wegobackend/common/security/SecurityConfig.java (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LimdaeIl LimdaeIl merged commit bed567e into main Dec 11, 2025
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/group-open-api branch December 11, 2025 07:46
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

This PR makes group-related APIs public by adding permitAll() configurations for GET requests to /api/v1/groups/** endpoints. The changes allow unauthenticated access to group list and detail views.

  • Added public access configuration for group endpoints in Spring Security
  • Updated JWT authentication filter to skip authentication for group GET requests

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
SecurityConfig.java Added permitAll() rules for GET requests to /api/v1/groups/** and /api/v1/groups endpoints
JwtAuthenticationFilter.java Added public endpoint checks for group API paths to bypass JWT authentication

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.requestMatchers(HttpMethod.GET, "/api/v1/users/*").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/users/*").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/groups/**").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/groups").permitAll()
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern /api/v1/groups/** on line 34 already covers /api/v1/groups on line 35. The double asterisk pattern matches zero or more path segments, making line 35 redundant. You can remove line 35 to avoid duplication.

Suggested change
.requestMatchers(HttpMethod.GET, "/api/v1/groups").permitAll()

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +138
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path pattern /api/v1/group appears to be a typo and doesn't match the pattern in SecurityConfig which uses /api/v1/groups. This inconsistency means the filter logic won't align with the security configuration, potentially causing authentication issues. Change this to /api/v1/groups to match the SecurityConfig pattern, or remove this check as it would be redundant with the /** pattern on line 131.

Suggested change
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +138
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to SecurityConfig, if you correct the typo to /api/v1/groups, this check would be redundant since line 131 already covers /api/v1/groups/** which matches the base path as well. Consider removing this redundant check.

Suggested change
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임에서 공개할 API 설정

1 participant

Comments