Skip to content

fix: /notice/keywords 엔드포인트를 USER 권한으로 제한 - #335

Merged
rdyjun merged 2 commits into
mainfrom
fix/notice-keywords-auth
Jun 17, 2026
Merged

fix: /notice/keywords 엔드포인트를 USER 권한으로 제한#335
rdyjun merged 2 commits into
mainfrom
fix/notice-keywords-auth

Conversation

@rdyjun

@rdyjun rdyjun commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • permitAll에 등록된 /notice/**가 JWT 필터 ignore 목록에도 포함되어, Bearer 토큰을 전송해도 SecurityContext에 인증 정보가 설정되지 않는 문제 수정
  • /notice/keywords (GET/POST/DELETE) 를 USER 권한 경로로 이동하여 토큰 기반 인증이 정상 동작하도록 수정

Changes

  • authentication.path.all에서 /notice/** 제거
  • authentication.filter.ignore.paths에서 /notice/** 제거
  • authentication.path.user/notice/keywords, /notice/keywords/** 추가

Test plan

  • Bearer 토큰 없이 GET /notice/keywords 호출 → 401 응답 확인
  • 유효한 Bearer 토큰으로 GET /notice/keywords 호출 → 200 + 본인 키워드 목록 반환 확인
  • 유효한 Bearer 토큰으로 POST /notice/keywords 호출 → 201 응답 확인
  • 유효한 Bearer 토큰으로 DELETE /notice/keywords/{id} 호출 → 204 응답 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 공지사항 관련 엔드포인트의 접근 제어 설정을 조정했습니다. 키워드 기능 관련 경로의 인증 요구사항이 업데이트되었습니다.

- permitAll에서 /notice/** 제거
- JWT 필터 ignore 목록에서 /notice/** 제거
- /notice/keywords, /notice/keywords/** 를 user 권한 경로로 이동
  (토큰 없이 호출 시 SecurityContext 미설정으로 인증 실패하던 문제 수정)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rdyjun, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 30 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53f16ec1-fa51-4a64-bd39-8a46e0dd541d

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab9a2f and bac8d63.

📒 Files selected for processing (1)
  • src/main/resources/application.yml
📝 Walkthrough

Walkthrough

application.yml에서 /notice/** 경로를 공개 허용 목록(authentication.path.all) 및 필터 무시 목록에서 제거하고, 대신 /notice/keywords/notice/keywords/**를 사용자 인증 필요 경로(authentication.path.user)에 추가했습니다.

Changes

공지 경로 인증 정책 변경

Layer / File(s) Summary
공지 경로 인증 정책 재설정
src/main/resources/application.yml
authentication.path.allfilter.ignore.paths에서 /notice/**를 제거하고, authentication.path.user/notice/keywords/notice/keywords/**를 추가하여 해당 경로를 사용자 인증 필요 경로로 변경합니다.

추정 코드 리뷰 노력

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 토끼가 문을 잠그네,
/notice/** 열린 문 닫히고,
keywords 길엔 열쇠가 생겼어요.
인증된 친구만 들어오세요~
🔑 안전한 공지 나라로!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive PR 설명이 문제 상황, 변경 사항, 테스트 계획을 포함하고 있으나, 저장소의 필수 템플릿 섹션(관련 이슈, 배경, 주요 내용)이 구조화되지 않았습니다. 저장소 템플릿에 맞게 재구성하세요: 관련 이슈 번호, 배경(why), 주요 내용(what), 테스트 계획을 명확한 섹션으로 분리하여 기록하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경의 핵심 내용을 명확하게 요약하고 있습니다. /notice/keywords 엔드포인트를 USER 권한으로 제한하는 것이 주요 변경사항이며, 제목이 이를 정확히 반영합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/notice-keywords-auth

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.

- /notice/{departmentType} (공지 목록) 은 비인증 접근이 필요하므로 /notice/** 를 permitAll에 유지
- Security 매칭 순서상 /notice/keywords 가 userAllowedPaths에서 먼저 잡히므로 의도대로 동작

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rdyjun
rdyjun merged commit f9ebc47 into main Jun 17, 2026
2 checks passed
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.

1 participant