API 요청/응답 로깅 개선#245
Open
ckdals4600 wants to merge 3 commits into
Open
Conversation
📊 코드 커버리지 리포트
|
Goder-0
reviewed
Jun 21, 2026
4c061c2 to
fc597ae
Compare
Contributor
Author
|
@Goder-0 |
Goder-0
reviewed
Jun 21, 2026
fc597ae to
7b7fb0d
Compare
7b7fb0d to
81df37a
Compare
This was referenced Jun 26, 2026
Goder-0
approved these changes
Jun 28, 2026
Goder-0
left a comment
Contributor
There was a problem hiding this comment.
PR 설명에는 “응답 본문: INFO 기록”이라고 적혀 있는데, 현재 구현은 요청/응답 본문 모두 DEBUG에서만 남기고 있습니다. 구현 의도가 맞다면 PR 설명을 수정해두는 게 좋겠습니다.
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.
관련 이슈
PR 설명
배경
RequestLoggingFilter가 모든 요청의 헤더·바디를 INFO 로 통째 로깅하여authorization/cookie의 JWT 토큰, 로그인 요청의 비밀번호가 평문으로 남고 있었음.변경 사항
민감 정보 로깅 제거
method / uri / status / 소요시간 / ip / user-agent만 한 줄로 기록Authorization,Cookie,Set-Cookie등)는 값 전체 마스킹Set-Cookie)는 로깅하지 않아 토큰이 헤더로 새지 않음요청/응답 본문 로깅 (마스킹 적용)
email등)·JWT 패턴 마스킹 + 2000자 상한email/password/토큰류 필드 값 마스킹, 필드명과 무관하게eyJ...JWT 패턴은 통째로 마스킹ContentCachingResponseWrapper사용 시copyBodyToResponse()호출로 빈 응답 방지로그 노이즈 제거
RequestLoggingFilter에서 노이즈 경로(/actuator,/favicon.ico,/swagger,/v3/api-docs) 요청 로깅 제외GlobalExceptionHandler에서NoResourceFoundException(스캐너 404) ERROR → DEBUG 강등JwtTokenProvider에서 익명 요청에 대한Token not found로그 삭제