Skip to content

feat(stats): UDS 서버 보안 기능 추가 [DON-53]#34

Merged
dongwonkwak merged 5 commits intomainfrom
feat/DON-53-uds-security
Mar 5, 2026
Merged

feat(stats): UDS 서버 보안 기능 추가 [DON-53]#34
dongwonkwak merged 5 commits intomainfrom
feat/DON-53-uds-security

Conversation

@dongwonkwak
Copy link
Copy Markdown
Owner

개요

UDS(Unix Domain Socket) 서버에 보안 기능을 추가하여 비인가 접근을 방지합니다.

주요 변경사항

  • 소켓 파일 권한 고정: 0600으로 설정하여 소유자만 접근 가능 (tmpfs 환경 호환성 고려)
  • 동시 연결 수 제한: 리소스 고갈 공격 방지
  • 클라이언트 UID 검증: SO_PEERCRED를 통한 권한 검사
  • 활성 연결 추적: RAII guard 패턴으로 안전한 리소스 관리
  • 설정 메서드: timeout, max_connections, allowed_uid 등 동적 설정 가능

테스트

  • 모든 UDS 서버 보안 관련 테스트 통과 (469개 테스트 중)
  • SocketPermissions_0600, MaxConnections 제한, UID 검증 등 단위 테스트 추가

Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com

- 소켓 파일 권한 0600 고정 (fail-close)
- 동시 연결 수 제한 추가
- SO_PEERCRED를 통한 클라이언트 UID 검증
- 클라이언트 타임아웃, 최대 연결 수, 허용 UID 설정 메서드 추가
- 활성 연결 수 추적 및 RAII guard 패턴 적용

Docs-Impact: none
Docs-Impact-Reason: UDS 제어 채널의 내부 보안 강화로 공개 인터페이스 변경 없음

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@dongwonkwak dongwonkwak self-assigned this Mar 5, 2026
워크트리 생성 시 임시 파일 생성을 방지하기 위해 .claude/worktrees/ 제외

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@dongwonkwak
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac831875a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.cpp Outdated
@dongwonkwak dongwonkwak merged commit 54437d6 into main Mar 5, 2026
10 checks passed
@dongwonkwak dongwonkwak deleted the feat/DON-53-uds-security branch March 5, 2026 06:37
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