Skip to content

feat(admin): 관리자 컨트롤러에 권한 검증 추가 - #221

Closed
seonghobae wants to merge 1 commit into
mainfrom
feat/admin-auth-validation-9367953294429373635
Closed

feat(admin): 관리자 컨트롤러에 권한 검증 추가#221
seonghobae wants to merge 1 commit into
mainfrom
feat/admin-auth-validation-9367953294429373635

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #172. Both implement the same admin endpoint authorization contract; #172 is retained as the canonical branch because its exact head has passed CI, security, SAST, and fuzz checks.

`AdminController`의 엔드포인트에 인증 및 권한(`ADMIN_READ`, `ADMIN_WRITE`) 검증 로직을 추가하여 무단 접근을 방지하도록 개선하였습니다.
- `TenantPermissions`에 `ADMIN_READ` 및 `ADMIN_WRITE` 권한 상수 추가
- `AdminController` 생성자에 `TenantAccessService` 주입
- 각 엔드포인트에 `TenantAccessService.require()` 호출 추가
- `AdminControllerTest`에 인증 서비스 Mock 및 검증 로직 추가
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings July 27, 2026 22:11
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review limits work?

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

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d1b8402-9efc-4fda-87ca-130895f28055

📥 Commits

Reviewing files that changed from the base of the PR and between ae0bc74 and 748e9fc.

📒 Files selected for processing (4)
  • commit_message.txt
  • src/main/java/com/clearfolio/viewer/auth/TenantPermissions.java
  • src/main/java/com/clearfolio/viewer/controller/AdminController.java
  • src/test/java/com/clearfolio/viewer/controller/AdminControllerTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/admin-auth-validation-9367953294429373635

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

AdminController의 관리자 전용 엔드포인트에 권한 검증을 추가해, 무단 접근을 차단하도록 보완하는 PR입니다. 기존 TenantAccessService/헤더 기반 권한 모델을 Admin API에도 동일하게 적용하는 변경으로 보입니다.

Changes:

  • TenantPermissionsADMIN_READ, ADMIN_WRITE 권한 상수 추가
  • AdminControllerTenantAccessService 주입 및 각 엔드포인트에서 권한 검증 호출 추가
  • AdminControllerTest에서 TenantAccessService mock 주입 및 권한 검증 흐름을 반영

Reviewed changes

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

File Description
src/main/java/com/clearfolio/viewer/controller/AdminController.java Admin API에 권한 검증 로직 추가 및 의존성 주입 반영
src/test/java/com/clearfolio/viewer/controller/AdminControllerTest.java AdminController 변경에 맞춰 TenantAccessService mock 주입/스텁 추가
src/main/java/com/clearfolio/viewer/auth/TenantPermissions.java 관리자 권한 상수(ADMIN_READ, ADMIN_WRITE) 추가
commit_message.txt 커밋 메시지 업데이트

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

Comment on lines +92 to 93
tenantAccessService.require(headers, TenantPermissions.ADMIN_WRITE);
RetryDeadLetterResult result = conversionService.retryDeadLettered(jobId, "admin");
Comment on lines 37 to 41
/**
* Creates a controller for admin operations.
*
* @param conversionService conversion service
*/
Comment on lines 11 to +13
import org.junit.jupiter.api.BeforeEach;
import org.springframework.http.HttpHeaders;
import com.clearfolio.viewer.auth.TenantAccessService;
@seonghobae seonghobae closed this Aug 4, 2026
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