You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
통합 위협 인텔리전스 수집·동기화 · 블랙리스트 중앙 관리 · Fortinet 자동 배포 플랫폼Unified threat-intel aggregation, centralized blacklist management, and Fortinet deployment platform.
한 줄 요약 · One-liner
여러 외부 위협 인텔리전스 소스에서 IP·도메인·URL 을 수집·정규화해 중앙 블랙리스트로 통합한 뒤, Fortinet 같은 외부 보안 장비로 자동 배포하는 Python 기반 통합 관리 플랫폼입니다. Jinja2 웹 콘솔, REST API, WebSocket 실시간 채널을 단일 진입점으로 제공합니다.
A Python platform that aggregates external threat-intel feeds, normalizes entries into a centralized blacklist, and pushes the resulting address objects to Fortinet-style devices via REST API and WebSocket, exposed through a Jinja2 web console.
Status · 운영 한눈표
항목 / Item
값 / Value
비고 / Notes
기본 포트 / Default port
2542
PORT 환경 변수로 변경
기본 ENV / Default env
development
ENV=production 으로 전환
Python
3.11+
pyproject.toml 의 target-version = "py311"
컨테이너 / Container
Docker + Compose
deploy/docker-compose.yml
환경 변수 파일 / Env file
deploy/.env
Compose 가 자동 주입
로컬 진입점 / Local entry
app/run_app.py
python app/run_app.py
컨테이너 진입점 / Container entry
app/entrypoint.sh
app/Dockerfile 에서 호출
배포 전 검증 / Pre-deploy check
app/deployment_validation.py
make verify
라인 길이 / Line length
120
Ruff
구조화 로깅 / Structured logging
app/utils/structured_logging.py
JSON 출력
로그 회전 / Log rotation
app/utils/log_rotation_manager.py
사이즈·시간 정책
운영 단계 / Production-ready?
운영 검증 단계
사내 PoC → 단계적 확대
Compact Flow · 운영 흐름
수집 (Collection) — 외부 위협 인텔 소스에서 IP / Domain / URL 항목을 주기적·수동으로 가져옵니다. (app/core/routes/api/collection/)
정규화 (Normalization) — app/core/routes/api/blacklist/core.py 가 엔트리를 형식·중복 검사 후 중앙 블랙리스트에 머지합니다.
관리 (Management) — app/core/routes/api/blacklist/management.py 와 batch.py 가 일괄 추가·삭제·TTL 만료를 처리합니다.
배포 (Deployment) — app/core/routes/api/fortinet/core.py 가 Fortinet 장비로 주소 객체를 푸시합니다.
관측 (Observability) — app/core/monitoring/ 의 메트릭·에러 카운터와 dashboard.html 이 상태를 시각화하고 WebSocket 으로 알립니다.
인증 (Auth) — app/core/auth/ 의 JWT/데코레이터/미들웨어가 모든 라우트의 인가를 통제합니다.
English summary: collect from intel sources → normalize and merge into the central blacklist → batch-manage with TTL → push to Fortinet → observe via metrics/dashboard → enforce auth across the stack.
make setup-hooks # 1회: pre-commit + husky
make dev # 빌드 + 핫리로드 개발 환경
make dev-no-build # 기존 이미지로 빠르게 기동
make dev-prod # 운영 모드에 가까운 빌드
make logs # tail 로그
make health # 헬스 체크
4. 배포 직전 검증 / Pre-deploy verification
make verify # 전체 검증
make verify-lint # Ruff
make verify-types # mypy
make verify-secrets # 시크릿 누출 점검
make verify-pre-commit
make verify-quick
make verify-all
5. 릴리스 / Release
make release-dry # 시뮬레이션 (CHANGELOG, VERSION 확인)
make release # VERSION bump + 커밋 + 태그
Configuration · 환경 설정
.env 의 주요 키 (실제 키 목록은 app/core/config.py 가 SSoT):
Key
기본값 / Default
설명 / Description
ENV
development
development / production
PORT
2542
웹 리스너 포트
DATABASE_URL
(env)
중앙 블랙리스트 저장소
JWT_SECRET
(required in prod)
app/core/auth/jwt_service.py
FORTINET_BASE_URL
(env)
Fortinet API 엔드포인트
FORTINET_API_TOKEN
(required)
Fortinet 인증 토큰
LOG_LEVEL
INFO
구조화 로깅 레벨
LOG_ROTATE_MAX_BYTES
10485760
로그 회전 임계치
LOG_ROTATE_BACKUPS
10
보관 세대 수
운영 환경에서는 deployment_validation.py 가 누락 시크릿과 ENV 불일치를 부트스트랩 전에 차단합니다.
Commands Reference · Make 명령
Target
목적 / Purpose
make help
사용 가능한 타깃과 설명 출력
make setup-hooks
pre-commit + husky + commit-msg 훅 설치
make dev
개발 환경 up (빌드 + 핫리로드)
make dev-no-build
기존 이미지로 빠르게 기동
make dev-prod
운영 모드 빌드 (오버라이드 없음)
make dev-app
app 서비스만 재시작 (빠른 반복)
make build
이미지 빌드
make up / make down
Compose 기동/중지
make logs
로그 tail
make restart
재기동
make health
헬스 체크
make clean
로컬 산출물 정리
make test
pytest (unit / integration / security / db / api 마커)