Repository navigation
feat(admin): 관리자 로그인/로그아웃 및 인증 boundary 구현 - #112
Merged
Merged
Conversation
Member
|
제목 수정하세요 |
Member
|
/review |
There was a problem hiding this comment.
리뷰 결과
변경된 35개 파일을 검토했으며, 수정이 필요한 문제 3개를 발견했습니다.
| 심각도 | 개수 |
|---|---|
| Critical | 0 |
| High | 2 |
| Medium | 1 |
| Low | 0 |
주요 내용
- HIGH · SECURITY — SameSite=None 설정 시 관리자 API가 CSRF에 노출됩니다
- HIGH · SECURITY — 리버스 프록시 환경에서는 한 공격자가 모든 관리자 로그인을 차단할 수 있습니다
- MEDIUM · SECURITY — 다중 인스턴스에서 로그인 제한을 우회할 수 있습니다
재리뷰 비교
| 구분 | 개수 |
|---|---|
| 새로운 Finding | 3 |
| 계속 확인된 Finding | 0 |
| 이번 리뷰에서 다시 발견되지 않음 | 2 |
이번 리뷰에서 다시 발견되지 않았다는 것이 해결을 확정하는 것은 아닙니다.
재실행한 검토 결과입니다.
검토한 head: 5281740c3da6
exijn
approved these changes
Sep 23, 2026
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 Issue
Closes #111
작업 내용
POST /api/v1/admin/auth/login: env 기반 관리자 계정 BCrypt 검증, 성공 시 HttpOnly 세션 쿠키 발급POST /api/v1/admin/auth/logout: 현재 세션 무효화, 쿠키 삭제, 204admin_sessions테이블(V18): 토큰은 SHA-256 다이제스트만 저장, 로그인 시점 기준 고정 TTLAdminAuthenticationInterceptor:/api/v1/admin/**인증 boundary (login만 제외), Agent 인증과 같은 구조AdminLoginAttemptRateLimiter: IP + username 기준 고정 윈도우ADMIN_CREDENTIAL_INVALID,ADMIN_LOGIN_RATE_LIMITED,ADMIN_LOGIN_FAILED,ADMIN_SESSION_INVALID,ADMIN_LOGOUT_FAILED기존
/api/v1/admin/robots도 새 boundary에 포함되어 이제 관리자 로그인이 필요합니다.이 API를 호출하는 클라이언트는 로그인 후 세션 쿠키를 함께 보내야 합니다.
(
RobotManagementIntegrationTest는 세션 쿠키를 붙이도록 수정)보안
새 환경변수
POPPY_ADMIN_USERNAMEPOPPY_ADMIN_PASSWORD_HASHPOPPY_ADMIN_SESSION_TTLPT8HPOPPY_ADMIN_LOGIN_ATTEMPT_WINDOWPT1MPOPPY_ADMIN_LOGIN_MAX_ATTEMPTS5POPPY_ADMIN_COOKIE_SAME_SITEStrictPOPPY_ADMIN_COOKIE_SECUREtruePOPPY_ADMIN_SESSION_CLEANUP_INTERVAL_MILLISECONDSPOPPY_ADMIN_LOGIN_ATTEMPT_CLEANUP_INTERVAL_MILLISECONDSPOPPY_ADMIN_LOGIN_IP_MAX_ATTEMPTS20해시 생성 방법은
docs/configuration.md참고. 배포 전 실제 값 주입 필요.테스트
./gradlew build통과 (318 tests, 실패 0)scripts/test-systemd-deployment.sh는 Windows CRLF로 로컬 실패 (develop 원본도 동일, 무관)후속 과제
POPPY_ADMIN_COOKIE_SECURE=false명시