Skip to content

fix(auth): 남의 리소스에 403 vs 404 — 결정 C(개인 소유 404·그룹 403) 박제와 적용 - #811

Open
Khyojae wants to merge 2 commits into
mainfrom
docs/ownership-403-vs-404
Open

Khyojae wants to merge 2 commits into
mainfrom
docs/ownership-403-vs-404

Conversation

@Khyojae

@Khyojae Khyojae commented Sep 23, 2026

Copy link
Copy Markdown
Member

요약

남의 리소스 id로 요청했을 때 403과 404 중 무엇을 줄지를 다루는 분기점 문서다. 코드는 바꾸지 않는다. 결정은 사용자 몫이다.

  • 현황(전수 grep): 개인 소유 리소스 8곳 중 5곳은 404(소유권을 WHERE에 넣음). 3곳은 403이다(세션 종료, 세션 피드백, 초대 수락·거절 — 조회한 뒤 소유자를 비교). 403인 곳에서는 id가 존재하는지 드러난다.
  • 원인: 같은 날(07-15) api-improvement-opportunities.md와 report-read-path.md가 서로 반대쪽을 «올바른 패턴»이라 적었다.
  • 후보: A 404로 통일 / B 403으로 통일 / C 개인 소유는 404, 그룹은 403 유지(추천)
  • C로 가면 바뀌는 곳: main 3곳, 테스트 5개 파일의 단언 6곳, 프론트는 변경 없음으로 판단(근거는 문서 §5)
  • 결정 대기 항목 3개: 후보 선택, 404일 때 서버 로그에 «남의 것»을 구분해 남길지, 그룹 존재 오라클을 수용할지

docs/decisions/README.md 인덱스에 한 줄을 추가했다.

🤖 Generated with Claude Code

개인 소유 리소스 8곳 중 5곳은 WHERE 소유권(404), 3곳(세션 종료·세션 피드백·초대 수락/거절)은
조회 후 비교(403)라 존재 오라클이 남는다. 같은 날(07-15) 두 문서가 반대쪽을 올바르다고 적은 것이
원인. A 404 통일 / B 403 통일 / C 개인 소유 404·그룹 403 — 추천 C, 결정은 사용자 대기.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Khyojae Khyojae added the 📝 Docs 📝 Docs label Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: Shadowfit/init/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 276bb3d4-c467-4a54-bf42-ab8e0150c1c2


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.

@Khyojae

Khyojae commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- SessionService.endSession: findById+비교(403) → findByIdAndMemberId(404)
- SessionFeedbackQueryService: existsByIdAndMemberId(신설) — 세션 행을 안 쓰므로 존재만 본다
- GroupInvitationService: findByIdAndInviteeId(신설) + INVITATION_NOT_FOUND
- 테스트: 403 단언 → 404, 신규 SessionOwnershipNotFoundTest(실 DB·HTTP 로 남의 세션 응답 == 없는 세션 응답)
- 결정 박제(C 채택·로그 구분 안 함), 17-error-codes §3 판정 문장, api-improvement §2 정정 주석

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Khyojae Khyojae changed the title docs(decisions): 남의 리소스에 403 인가 404 인가 — 분기점과 후보 3개 fix(auth): 남의 리소스에 403 vs 404 — 결정 C(개인 소유 404·그룹 403) 박제와 적용 Sep 23, 2026
@Khyojae

Khyojae commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

결정 C(개인 소유 404·그룹 403 유지)와 «로그 구분 안 함»(2026-09-23 사용자 confirm)을 반영했습니다. 적용 커밋이 추가됐습니다: 세션 종료·세션 피드백·초대 수락/거절이 404로 바뀌었고, 테스트 SessionOwnershipNotFoundTest(남의 세션 응답 == 없는 세션 응답)를 새로 넣었습니다. ./gradlew test 결과는 956 tests, 실패 0, 6 skipped입니다.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Docs 📝 Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant